hed::Edge Class Reference

Edge class in the in the half-edge data structure. More...

#include <ttl/halfedge/HeTriang.h>

List of all members.

Public Member Functions

 Edge ()
 Constructor.
 ~Edge ()
 Destructor.
void setSourceNode (Node *node)
 Sets the source node.
void setNextEdgeInFace (Edge *edge)
 Sets the next edge in face.
void setTwinEdge (Edge *edge)
 Sets the twin edge.
void setAsLeadingEdge (bool val=true)
 Sets the edge as a leading edge.
bool isLeadingEdge () const
 Checks if an edge is a leading edge.
void setConstrained (bool val=true)
 Sets the edge as a constrained edge.
bool isConstrained () const
 Checks if an edge is constrained.
EdgegetTwinEdge () const
 Returns the twin edge.
EdgegetNextEdgeInFace () const
 Returns the next edge in face.
NodegetSourceNode ()
 Retuns the source node.
NodegetTargetNode ()
 Returns the target node.

Private Attributes

Handle< NodesourceNode_
EdgetwinEdge_
EdgenextEdgeInFace_
struct {
   unsigned char   isLeadingEdge_: 1
   unsigned char   isConstrained_: 1
flags_

Detailed Description

Edge class in the in the half-edge data structure.

Definition at line 138 of file HeTriang.h.


Constructor & Destructor Documentation

hed::Edge::Edge (  )  [inline]

Constructor.

Definition at line 151 of file HeTriang.h.

References flags_, nextEdgeInFace_, sourceNode_, and twinEdge_.

00151            { sourceNode_ = NULL; twinEdge_ = NULL; nextEdgeInFace_ = NULL; 
00152       flags_.isLeadingEdge_ = 0; flags_.isConstrained_ = 0; }

hed::Edge::~Edge (  )  [inline]

Destructor.

Definition at line 155 of file HeTriang.h.

References setTwinEdge(), and twinEdge_.

00155 { if(twinEdge_) twinEdge_->setTwinEdge(NULL); }


Member Function Documentation

Edge* hed::Edge::getNextEdgeInFace (  )  const [inline]

Returns the next edge in face.

Definition at line 183 of file HeTriang.h.

References nextEdgeInFace_.

Referenced by hed::Dart::alpha1(), and getTargetNode().

00183 { return nextEdgeInFace_; }

Node* hed::Edge::getSourceNode (  )  [inline]

Retuns the source node.

Definition at line 186 of file HeTriang.h.

References Handle< T >::getPtr(), and sourceNode_.

Referenced by hed::Dart::getNode(), hed::Dart::getOppositeNode(), and getTargetNode().

00186 { return sourceNode_.getPtr(); }

Node* hed::Edge::getTargetNode (  )  [inline]

Returns the target node.

Definition at line 189 of file HeTriang.h.

References getNextEdgeInFace(), and getSourceNode().

Referenced by hed::Dart::getNode(), and hed::Dart::getOppositeNode().

00189 { return getNextEdgeInFace()->getSourceNode(); }

Edge* hed::Edge::getTwinEdge (  )  const [inline]

Returns the twin edge.

Definition at line 180 of file HeTriang.h.

References twinEdge_.

Referenced by hed::Dart::alpha2().

00180 { return twinEdge_; };

bool hed::Edge::isConstrained (  )  const [inline]

Checks if an edge is constrained.

Definition at line 177 of file HeTriang.h.

References flags_.

Referenced by hed::TTLtraits::swapEdge().

00177 { return flags_.isConstrained_ == 1 ? true : false; }

bool hed::Edge::isLeadingEdge (  )  const [inline]

Checks if an edge is a leading edge.

Definition at line 170 of file HeTriang.h.

References flags_.

00170 { return flags_.isLeadingEdge_ == 1 ? true : false; }

void hed::Edge::setAsLeadingEdge ( bool  val = true  )  [inline]

Sets the edge as a leading edge.

Definition at line 167 of file HeTriang.h.

References flags_.

Referenced by hed::Triangulation::addLeadingEdge().

00167 { flags_.isLeadingEdge_ = (val == true ? 1 : 0); }

void hed::Edge::setConstrained ( bool  val = true  )  [inline]

Sets the edge as a constrained edge.

Definition at line 173 of file HeTriang.h.

References flags_, isConstrained_, and twinEdge_.

00173                                       { unsigned char cstr = (val == true ? 1 : 0); 
00174       flags_.isConstrained_ = cstr; if (twinEdge_) twinEdge_->flags_.isConstrained_ = cstr; }

void hed::Edge::setNextEdgeInFace ( Edge edge  )  [inline]

Sets the next edge in face.

Definition at line 161 of file HeTriang.h.

References nextEdgeInFace_.

00161 { nextEdgeInFace_ = edge; }

void hed::Edge::setSourceNode ( Node node  )  [inline]

Sets the source node.

Definition at line 158 of file HeTriang.h.

References sourceNode_.

00158 { sourceNode_ = node; }

void hed::Edge::setTwinEdge ( Edge edge  )  [inline]

Sets the twin edge.

Definition at line 164 of file HeTriang.h.

References twinEdge_.

Referenced by ~Edge().

00164 { twinEdge_ = edge; }


Member Data Documentation

struct { ... } hed::Edge::flags_ [private]

Definition at line 146 of file HeTriang.h.

Referenced by setConstrained().

Definition at line 145 of file HeTriang.h.

Definition at line 142 of file HeTriang.h.

Referenced by Edge(), getNextEdgeInFace(), and setNextEdgeInFace().

Definition at line 140 of file HeTriang.h.

Referenced by Edge(), getSourceNode(), and setSourceNode().

Definition at line 141 of file HeTriang.h.

Referenced by Edge(), getTwinEdge(), setConstrained(), setTwinEdge(), and ~Edge().


The documentation for this class was generated from the following file:

Generated on Wed Nov 17 17:44:28 2010 for TTL by  doxygen 1.6.1