BoundaryEdge Class Reference

The Edge type for a BoundaryMesh. More...

#include </usr1/tp517/Tumble/trunk/src/tumble/cell.h>

Inheritance diagram for BoundaryEdge:

[legend]
Collaboration diagram for BoundaryEdge:
[legend]
List of all members.

Public Types

typedef EdgeCell super

Public Member Functions

 BoundaryEdge (PersistantStore &, BoundaryVertex *v0, BoundaryVertex *v1, const std::vector< ControlPoint > &deboor, const std::vector< double > &knots, DataStore *_data_store)
 Create an empty BoundaryEdge.
virtual ~BoundaryEdge ()
 Destructor.
void set_fixed (Movement fixed)
 Set movement restrictions.
void set_color (int _color)
 Set the type of edge this Cell represents.
void set_restlength (double _restlength)
 Set initial length of edge.
const BoundaryVertexget_vertex (int i) const
 Get the BoundaryVertexs that are sub-cells of this edge.
BoundaryVertexget_vertex (int i)
const BezierVertexget_d0_vertex (int i) const
 Get the D0 vertexs of the edge, in order of spline parametrization.
BezierVertexget_d0_vertex (int i)
const BezierVertexget_d1_vertex (int i) const
 Get a D1 vertex of this edge.
BezierVertexget_d1_vertex (int i)
const BezierVertexget_bezier_vertex (int i) const
 Get the D0 or D1 vertex in the splines parametic ordering.
BezierVertexget_bezier_vertex (int i)
int get_num_d1_vertexs () const
 Return the number of D1 vertexs along this edge.
const QBSplineget_spline () const
QBSplineget_spline ()
Movement get_fixed () const
int get_color () const
void print () const
 Print info.
 declare_iterators_canon (vertex, vertices, BoundaryVertex)
 declare_iterators_any (face, faces, BoundaryFace)

Private Member Functions

 BoundaryEdge (const BoundaryEdge &o)
BoundaryEdgeoperator= (const BoundaryEdge &o)

Private Attributes

QBSplinespline_
 The spline which is the geometric representation of this edge.
Movement fixed_
 The amount of freedom of movment.
int color_
 An integer specifing which type of boundary this is (application determined).

Detailed Description

The Edge type for a BoundaryMesh.

The clas contains a fixed flag which determines how much freedom of movement the edge has. This should be kept in sync with the BoundaryVertexs that are sub-cells of this edge. This can be accomplished by using the set_fixed() method.

BoundaryEdge's also contain a color. This is an integer used to specify the type of edge represented by this cell. Its value is determined by the application.

BoundaryEdges contain a spline of type QBSpline which represents the geometric representation of this edge.

Todo:
Add new spline types written by Todd

Definition at line 376 of file cell.h.


Member Typedef Documentation

typedef EdgeCell BoundaryEdge::super

Definition at line 378 of file cell.h.


Constructor & Destructor Documentation

BoundaryEdge::BoundaryEdge ( PersistantStore store,
BoundaryVertex v0,
BoundaryVertex v1,
const std::vector< ControlPoint > &  deboor,
const std::vector< double > &  knots,
DataStore datastore 
)

Create an empty BoundaryEdge.

The spline should have already been created. This sets fixed to Movement::FixedNone. The fixed member should be set with set_fixed() after the BoundaryVertex's have been specified.

Parameters:
_spline A QBSpline which has already been created/initialized
_color An integer determining which type of Edge this is (default to 0)

Definition at line 458 of file cell.C.

BoundaryEdge::~BoundaryEdge (  )  [virtual]

Destructor.

Definition at line 472 of file cell.C.

References spline_.

BoundaryEdge::BoundaryEdge ( const BoundaryEdge o  )  [private]


Member Function Documentation

void BoundaryEdge::set_fixed ( Movement  fixed  ) 

Set movement restrictions.

This determines how this edge is allowed to move, if at all. This function will automatically set the appropriate Movement values on the BoundaryVertex's of this edge. Thus if a BoundaryVertex has one edge with Movement::FixedHorizontal and one edge with Movement::FixedVertical, the BoundaryVertex will be Movement::FixedAll.

Parameters:
_fixed The movement restriction for this edge

Definition at line 596 of file cell.C.

References fixed_, get_vertex(), and BoundaryVertex::increase_fixed().

Here is the call graph for this function:

void BoundaryEdge::set_color ( int  color  ) 

Set the type of edge this Cell represents.

Colors are used to set a type for a boundary edge. The values are determined by the application. This is usefull as many applications need to treat certain edges in special ways.

Parameters:
_color The type of edge

Definition at line 611 of file cell.C.

References color_.

void BoundaryEdge::set_restlength ( double  restlength  ) 

Set initial length of edge.

Parameters:
_restlength The initial length of the spline representing this edge

Definition at line 620 of file cell.C.

References get_spline(), and QBSpline::restlength.

Here is the call graph for this function:

const BoundaryVertex * BoundaryEdge::get_vertex ( int  i  )  const

Get the BoundaryVertexs that are sub-cells of this edge.

There are always exactly two BoundaryVertexs of a BoundaryEdge. If the BoundaryEdge is a self-loop then both BoundaryVertexs are the same.

Parameters:
i The index of the requested BoundaryVertex (0 or 1)
Returns:
The specified BoundaryVertex

Reimplemented from EdgeCell.

Definition at line 633 of file cell.C.

References EdgeCell::get_vertex().

Referenced by get_d0_vertex(), MeshInput::read(), and set_fixed().

Here is the call graph for this function:

BoundaryVertex * BoundaryEdge::get_vertex ( int  i  ) 

Reimplemented from EdgeCell.

Definition at line 637 of file cell.C.

References EdgeCell::get_vertex().

Here is the call graph for this function:

const BezierVertex * BoundaryEdge::get_d0_vertex ( int  i  )  const

Get the D0 vertexs of the edge, in order of spline parametrization.

Note:
This function assumes that the BezierVertex's and QBSpline share the correct ControlPoints.
If the index is out of range NULL is returned. If there is no spline, the D0 vertexs are in an arbiraty order.

Otherwise, when i==0 is given, this returns the D0 vertx coorsponding to the begining of the spline, and when i==0 it returns the D0 vertex at the end.

Parameters:
i The index (0<= i <=1)
Returns:
The correct D0 BezierVertex

Definition at line 492 of file cell.C.

References QBSpline::b, EdgeCell::begin_vertices(), EdgeCell::end_vertices(), BoundaryVertex::get_bezier(), get_spline(), and get_vertex().

Referenced by get_bezier_vertex(), and get_d0_vertex().

Here is the call graph for this function:

BezierVertex * BoundaryEdge::get_d0_vertex ( int  i  ) 

Definition at line 518 of file cell.C.

References get_d0_vertex().

Here is the call graph for this function:

const BezierVertex * BoundaryEdge::get_d1_vertex ( int  i  )  const

Get a D1 vertex of this edge.

This uses the QBSpline::vertexs array. The odering starts at 0.

If there is no spline, or no D1 verticies, or the i is out of range, this returns NULL.

Parameters:
i The index of the D1 point
Returns:
The D1 point, or NULL on error

Definition at line 543 of file cell.C.

References get_num_d1_vertexs(), get_spline(), and QBSpline::vertexs.

Referenced by get_bezier_vertex(), and get_d1_vertex().

Here is the call graph for this function:

BezierVertex * BoundaryEdge::get_d1_vertex ( int  i  ) 

Definition at line 548 of file cell.C.

References get_d1_vertex().

Here is the call graph for this function:

const BezierVertex * BoundaryEdge::get_bezier_vertex ( int  i  )  const

Get the D0 or D1 vertex in the splines parametic ordering.

This gives back the D0 or D1 vertxs in the parametric order that the spline assigns them. The ordering starts at 0.

Note:
This function assumes that the mesh is well defined, and that the QBSpline, and the D0 points share the correct control points.
This function will return NULL when given a bad index, or when the QBSpline and the BoundaryVertexs do not share the correct ControlPoints.

Parameters:
i Index of the point, in the parameteic ordering (begining at 0)
Returns:
The D0 or D1 vertex

Definition at line 567 of file cell.C.

References get_d0_vertex(), get_d1_vertex(), and get_num_d1_vertexs().

Referenced by get_bezier_vertex().

Here is the call graph for this function:

BezierVertex * BoundaryEdge::get_bezier_vertex ( int  i  ) 

Definition at line 582 of file cell.C.

References get_bezier_vertex().

Here is the call graph for this function:

int BoundaryEdge::get_num_d1_vertexs (  )  const

Return the number of D1 vertexs along this edge.

This uses the QBSpline::vertexs array

Returns:
Number of D1 vertexs

Definition at line 529 of file cell.C.

References get_spline(), and QBSpline::vertexs.

Referenced by get_bezier_vertex(), and get_d1_vertex().

Here is the call graph for this function:

const QBSpline * BoundaryEdge::get_spline (  )  const

Definition at line 642 of file cell.C.

References spline_.

Referenced by BoundaryMesh::delete_edge(), Visualization::draw_boundary_edge(), Visualization::draw_boundary_edge_debug(), get_d0_vertex(), get_d1_vertex(), get_num_d1_vertexs(), BezierVertex::get_u(), BezierMesh::insert_edge_midpoint(), MeshBinaryInput::read(), MeshInput::read(), BezierMesh::remove_vertex(), BezierVertex::set_bdry(), and set_restlength().

QBSpline * BoundaryEdge::get_spline (  ) 

Definition at line 647 of file cell.C.

References spline_.

Movement BoundaryEdge::get_fixed (  )  const

Definition at line 652 of file cell.C.

References fixed_.

Referenced by operator<<().

int BoundaryEdge::get_color (  )  const

Definition at line 657 of file cell.C.

References color_.

void BoundaryEdge::print (  )  const

Print info.

Definition at line 663 of file cell.C.

BoundaryEdge::declare_iterators_canon ( vertex  ,
vertices  ,
BoundaryVertex   
)

BoundaryEdge::declare_iterators_any ( face  ,
faces  ,
BoundaryFace   
)

BoundaryEdge& BoundaryEdge::operator= ( const BoundaryEdge o  )  [private]


Member Data Documentation

QBSpline* BoundaryEdge::spline_ [private]

The spline which is the geometric representation of this edge.

Definition at line 420 of file cell.h.

Referenced by get_spline(), and ~BoundaryEdge().

Movement BoundaryEdge::fixed_ [private]

The amount of freedom of movment.

Definition at line 421 of file cell.h.

Referenced by get_fixed(), and set_fixed().

int BoundaryEdge::color_ [private]

An integer specifing which type of boundary this is (application determined).

Definition at line 422 of file cell.h.

Referenced by get_color(), and set_color().


The documentation for this class was generated from the following files:
Generated on Mon May 24 09:53:33 2010 for TUMBLE by  doxygen 1.5.2