Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::BSPTreePoly::Edge Struct Reference
+ Collaboration diagram for moab::BSPTreePoly::Edge:

Public Member Functions

 Edge (Vertex *vstart, Vertex *vend)
 
 ~Edge ()
 
BSPTreePoly::Vertexstart () const
 
BSPTreePoly::Vertexend () const
 
BSPTreePoly::Faceforward () const
 
BSPTreePoly::Facereverse () const
 
BSPTreePoly::VertexUseuse (BSPTreePoly::Vertex *vtx) const
 
BSPTreePoly::Edgenext (BSPTreePoly::Vertex *about) const
 
BSPTreePoly::Edgeprev (BSPTreePoly::Vertex *about) const
 
BSPTreePoly::EdgeUseuse (BSPTreePoly::Face *face) const
 
BSPTreePoly::Edgenext (BSPTreePoly::Face *about) const
 
BSPTreePoly::Edgeprev (BSPTreePoly::Face *about) const
 
BSPTreePoly::VertexUseother (BSPTreePoly::VertexUse *vuse) const
 
BSPTreePoly::EdgeUseother (BSPTreePoly::EdgeUse *vuse) const
 
BSPTreePoly::Vertexother (BSPTreePoly::Vertex *vtx) const
 
BSPTreePoly::Vertexcommon (BSPTreePoly::Edge *eother) const
 
int sense (BSPTreePoly::Face *face) const
 
void remove_from_vertex (BSPTreePoly::Vertex *&vtx_ptr)
 
void remove_from_face (BSPTreePoly::Face *&face_ptr)
 
void add_to_vertex (BSPTreePoly::Vertex *vtx_ptr)
 

Public Attributes

BSPTreePoly::VertexUsestartPtr
 
BSPTreePoly::VertexUseendPtr
 
BSPTreePoly::EdgeUseforwardPtr
 
BSPTreePoly::EdgeUsereversePtr
 

Detailed Description

Definition at line 64 of file BSPTreePoly.cpp.

Constructor & Destructor Documentation

◆ Edge()

moab::BSPTreePoly::Edge::Edge ( Vertex vstart,
Vertex vend 
)
inline

Definition at line 73 of file BSPTreePoly.cpp.

74  : forwardPtr( 0 ), reversePtr( 0 )
75 #ifdef DEBUG_IDS
76  ,
77  id( nextID++ )
78 #endif
79  {
80  startPtr = new VertexUse( this, vstart );
81  endPtr = new VertexUse( this, vend );
82  }

References endPtr, and startPtr.

◆ ~Edge()

moab::BSPTreePoly::Edge::~Edge ( )

Definition at line 356 of file BSPTreePoly.cpp.

357 {
358  delete startPtr;
359  delete endPtr;
360  delete forwardPtr;
361  delete reversePtr;
362 }

Member Function Documentation

◆ add_to_vertex()

void moab::BSPTreePoly::Edge::add_to_vertex ( BSPTreePoly::Vertex vtx_ptr)

◆ common()

BSPTreePoly::Vertex* moab::BSPTreePoly::Edge::common ( BSPTreePoly::Edge eother) const
inline

Definition at line 142 of file BSPTreePoly.cpp.

143  {
144  return start() == eother->start() || start() == eother->end() ? start()
145  : end() == eother->start() || end() == eother->end() ? end()
146  : 0;
147  }

References end(), and start().

◆ end()

BSPTreePoly::Vertex* moab::BSPTreePoly::Edge::end ( ) const
inline

Definition at line 90 of file BSPTreePoly.cpp.

91  {
92  return endPtr->vtxPtr;
93  }

References endPtr, and moab::BSPTreePoly::VertexUse::vtxPtr.

Referenced by common(), moab::BSPTreePoly::cut_polyhedron(), and moab::split_edge().

◆ forward()

BSPTreePoly::Face* moab::BSPTreePoly::Edge::forward ( ) const
inline

Definition at line 95 of file BSPTreePoly.cpp.

96  {
97  return forwardPtr ? forwardPtr->facePtr : 0;
98  }

References moab::BSPTreePoly::EdgeUse::facePtr, and forwardPtr.

◆ next() [1/2]

BSPTreePoly::Edge* moab::BSPTreePoly::Edge::next ( BSPTreePoly::Face about) const
inline

Definition at line 121 of file BSPTreePoly.cpp.

122  {
123  return use( about )->nextPtr->edgePtr;
124  }

References about(), moab::BSPTreePoly::VertexUse::edgePtr, moab::BSPTreePoly::VertexUse::nextPtr, and use().

◆ next() [2/2]

BSPTreePoly::Edge* moab::BSPTreePoly::Edge::next ( BSPTreePoly::Vertex about) const
inline

Definition at line 108 of file BSPTreePoly.cpp.

109  {
110  return use( about )->nextPtr->edgePtr;
111  }

References about(), moab::BSPTreePoly::VertexUse::edgePtr, moab::BSPTreePoly::VertexUse::nextPtr, and use().

◆ other() [1/3]

BSPTreePoly::EdgeUse* moab::BSPTreePoly::Edge::other ( BSPTreePoly::EdgeUse vuse) const
inline

Definition at line 134 of file BSPTreePoly.cpp.

135  {
136  return vuse == forwardPtr ? reversePtr : vuse == reversePtr ? forwardPtr : 0;
137  }

References forwardPtr, and reversePtr.

◆ other() [2/3]

BSPTreePoly::Vertex* moab::BSPTreePoly::Edge::other ( BSPTreePoly::Vertex vtx) const
inline

Definition at line 138 of file BSPTreePoly.cpp.

139  {
140  return vtx == startPtr->vtxPtr ? endPtr->vtxPtr : vtx == endPtr->vtxPtr ? startPtr->vtxPtr : 0;
141  }

References endPtr, startPtr, and moab::BSPTreePoly::VertexUse::vtxPtr.

◆ other() [3/3]

BSPTreePoly::VertexUse* moab::BSPTreePoly::Edge::other ( BSPTreePoly::VertexUse vuse) const
inline

Definition at line 130 of file BSPTreePoly.cpp.

131  {
132  return vuse == startPtr ? endPtr : vuse == endPtr ? startPtr : 0;
133  }

References endPtr, and startPtr.

Referenced by moab::BSPTreePoly::cut_polyhedron().

◆ prev() [1/2]

BSPTreePoly::Edge* moab::BSPTreePoly::Edge::prev ( BSPTreePoly::Face about) const
inline

Definition at line 125 of file BSPTreePoly.cpp.

126  {
127  return use( about )->prevPtr->edgePtr;
128  }

References about(), moab::BSPTreePoly::VertexUse::edgePtr, moab::BSPTreePoly::VertexUse::prevPtr, and use().

◆ prev() [2/2]

BSPTreePoly::Edge* moab::BSPTreePoly::Edge::prev ( BSPTreePoly::Vertex about) const
inline

Definition at line 112 of file BSPTreePoly.cpp.

113  {
114  return use( about )->prevPtr->edgePtr;
115  }

References about(), moab::BSPTreePoly::VertexUse::edgePtr, moab::BSPTreePoly::VertexUse::prevPtr, and use().

◆ remove_from_face()

void moab::BSPTreePoly::Edge::remove_from_face ( BSPTreePoly::Face *&  face_ptr)

◆ remove_from_vertex()

void moab::BSPTreePoly::Edge::remove_from_vertex ( BSPTreePoly::Vertex *&  vtx_ptr)

◆ reverse()

BSPTreePoly::Face* moab::BSPTreePoly::Edge::reverse ( ) const
inline

Definition at line 99 of file BSPTreePoly.cpp.

100  {
101  return reversePtr ? reversePtr->facePtr : 0;
102  }

References moab::BSPTreePoly::EdgeUse::facePtr, and reversePtr.

◆ sense()

int moab::BSPTreePoly::Edge::sense ( BSPTreePoly::Face face) const

Definition at line 364 of file BSPTreePoly.cpp.

365 {
366  if( forwardPtr && forwardPtr->facePtr == face )
367  return 1;
368  else if( reversePtr && reversePtr->facePtr == face )
369  return -1;
370  else
371  return 0;
372 }

◆ start()

BSPTreePoly::Vertex* moab::BSPTreePoly::Edge::start ( ) const
inline

Definition at line 86 of file BSPTreePoly.cpp.

87  {
88  return startPtr->vtxPtr;
89  }

References startPtr, and moab::BSPTreePoly::VertexUse::vtxPtr.

Referenced by common(), and moab::BSPTreePoly::cut_polyhedron().

◆ use() [1/2]

BSPTreePoly::EdgeUse* moab::BSPTreePoly::Edge::use ( BSPTreePoly::Face face) const
inline

Definition at line 117 of file BSPTreePoly.cpp.

118  {
119  return ( face == forwardPtr->facePtr ) ? forwardPtr : ( face == reversePtr->facePtr ) ? reversePtr : 0;
120  }

References moab::BSPTreePoly::EdgeUse::facePtr, forwardPtr, and reversePtr.

◆ use() [2/2]

BSPTreePoly::VertexUse* moab::BSPTreePoly::Edge::use ( BSPTreePoly::Vertex vtx) const
inline

Definition at line 104 of file BSPTreePoly.cpp.

105  {
106  return ( vtx == startPtr->vtxPtr ) ? startPtr : ( vtx == endPtr->vtxPtr ) ? endPtr : 0;
107  }

References endPtr, startPtr, and moab::BSPTreePoly::VertexUse::vtxPtr.

Referenced by moab::BSPTreePoly::cut_polyhedron(), next(), and prev().

Member Data Documentation

◆ endPtr

BSPTreePoly::VertexUse * moab::BSPTreePoly::Edge::endPtr

Definition at line 66 of file BSPTreePoly.cpp.

Referenced by Edge(), end(), other(), moab::split_edge(), and use().

◆ forwardPtr

BSPTreePoly::EdgeUse* moab::BSPTreePoly::Edge::forwardPtr

◆ reversePtr

BSPTreePoly::EdgeUse * moab::BSPTreePoly::Edge::reversePtr

◆ startPtr

BSPTreePoly::VertexUse* moab::BSPTreePoly::Edge::startPtr

Definition at line 66 of file BSPTreePoly.cpp.

Referenced by Edge(), other(), start(), and use().


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