#include <BALL/STRUCTURE/graphVertex.h>
Public Types | |
Type definitions | |
typedef HashSet< Edge * >::Iterator | EdgeIterator |
typedef HashSet< Edge * > ::ConstIterator | ConstEdgeIterator |
typedef HashSet< Face * >::Iterator | FaceIterator |
typedef HashSet< Face * > ::ConstIterator | ConstFaceIterator |
Public Member Functions | |
Constructors and Destructors | |
GraphVertex () | |
GraphVertex (const GraphVertex< Vertex, Edge, Face > &vertex, bool deep=false) | |
virtual | ~GraphVertex () |
Assignment | |
void | set (const GraphVertex< Vertex, Edge, Face > &vertex, bool deep=false) |
GraphVertex< Vertex, Edge, Face > & | operator= (const GraphVertex< Vertex, Edge, Face > &vertex) |
Accessors | |
void | insert (Edge *edge) |
void | insert (Face *face) |
void | remove (Edge *edge) |
void | remove (Face *face) |
Position | numberOfEdges () const |
Position | numberOfFaces () const |
void | setIndex (Index index) |
Index | getIndex () const |
bool | join (const Vertex &vertex) |
bool | substitute (Vertex *vertex) |
Predicates | |
virtual bool | operator== (const Vertex &) const |
virtual bool | operator!= (const Vertex &) const |
virtual bool | operator*= (const Vertex &) const |
Face * | has (Face *face) const |
Edge * | has (Edge *edge) const |
bool | hasEdges () const |
bool | hasFaces () const |
External Iterators | |
EdgeIterator | beginEdge () |
ConstEdgeIterator | beginEdge () const |
EdgeIterator | endEdge () |
ConstEdgeIterator | endEdge () const |
FaceIterator | beginFace () |
ConstFaceIterator | beginFace () const |
FaceIterator | endFace () |
ConstFaceIterator | endFace () const |
Protected Attributes | |
External Iterators | |
HashSet< Edge * > | edges_ |
HashSet< Face * > | faces_ |
Index | index_ |
Friends | |
Class friends | |
| |
class | GraphEdge< Vertex, Edge, Face > |
class | GraphFace< Vertex, Edge, Face > |
class | GraphTriangle< Vertex, Edge, Face > |
Generic GraphVertex Class.
typedef HashSet<Edge*>::ConstIterator BALL::GraphVertex< Vertex, Edge, Face >::ConstEdgeIterator |
typedef HashSet<Face*>::ConstIterator BALL::GraphVertex< Vertex, Edge, Face >::ConstFaceIterator |
typedef HashSet<Edge*>::Iterator BALL::GraphVertex< Vertex, Edge, Face >::EdgeIterator |
typedef HashSet<Face*>::Iterator BALL::GraphVertex< Vertex, Edge, Face >::FaceIterator |
BALL::GraphVertex< Vertex, Edge, Face >::GraphVertex | ( | ) | [inline] |
Default constructor. This method creates a new GraphVertex object.
BALL::GraphVertex< Vertex, Edge, Face >::GraphVertex | ( | const GraphVertex< Vertex, Edge, Face > & | vertex, | |
bool | deep = false | |||
) | [inline] |
Copy constructor. Create a new GraphVertex object from another.
vertex | the GraphVertex object to be copied | |
deep | if deep = false, all pointers are set to NULL (default). Otherwise the new GraphVertex object is linked to the neighbours of the old GraphVertex object. |
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, and BALL::GraphVertex< Vertex, Edge, Face >::faces_.
BALL::GraphVertex< Vertex, Edge, Face >::~GraphVertex | ( | ) | [inline, virtual] |
Destructor. Destructs the GraphVertex object.
GraphVertex< Vertex, Edge, Face >::ConstEdgeIterator BALL::GraphVertex< Vertex, Edge, Face >::beginEdge | ( | ) | const [inline] |
GraphVertex< Vertex, Edge, Face >::EdgeIterator BALL::GraphVertex< Vertex, Edge, Face >::beginEdge | ( | ) | [inline] |
GraphVertex< Vertex, Edge, Face >::ConstFaceIterator BALL::GraphVertex< Vertex, Edge, Face >::beginFace | ( | ) | const [inline] |
GraphVertex< Vertex, Edge, Face >::FaceIterator BALL::GraphVertex< Vertex, Edge, Face >::beginFace | ( | ) | [inline] |
GraphVertex< Vertex, Edge, Face >::ConstEdgeIterator BALL::GraphVertex< Vertex, Edge, Face >::endEdge | ( | ) | const [inline] |
GraphVertex< Vertex, Edge, Face >::EdgeIterator BALL::GraphVertex< Vertex, Edge, Face >::endEdge | ( | ) | [inline] |
GraphVertex< Vertex, Edge, Face >::ConstFaceIterator BALL::GraphVertex< Vertex, Edge, Face >::endFace | ( | ) | const [inline] |
GraphVertex< Vertex, Edge, Face >::FaceIterator BALL::GraphVertex< Vertex, Edge, Face >::endFace | ( | ) | [inline] |
Index BALL::GraphVertex< Vertex, Edge, Face >::getIndex | ( | ) | const [inline] |
Return the index of the vertex.
References BALL::GraphVertex< Vertex, Edge, Face >::index_.
Edge * BALL::GraphVertex< Vertex, Edge, Face >::has | ( | Edge * | edge | ) | const [inline] |
Test whether the vertex is meber of a given edge.
edge | a pointer to the edge to be tested |
References BALL::HashSet< Key >::begin(), BALL::GraphVertex< Vertex, Edge, Face >::edges_, and BALL::HashSet< Key >::end().
Face * BALL::GraphVertex< Vertex, Edge, Face >::has | ( | Face * | face | ) | const [inline] |
Test whether the vertex is meber of a given face.
face | a pointer to the the face to be tested |
References BALL::HashSet< Key >::begin(), BALL::HashSet< Key >::end(), and BALL::GraphVertex< Vertex, Edge, Face >::faces_.
bool BALL::GraphVertex< Vertex, Edge, Face >::hasEdges | ( | ) | const [inline] |
Test whether the vertex has edges.
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, and BALL::HashSet< Key >::isEmpty().
bool BALL::GraphVertex< Vertex, Edge, Face >::hasFaces | ( | ) | const [inline] |
Test whether the vertex has faces.
References BALL::GraphVertex< Vertex, Edge, Face >::faces_, and BALL::HashSet< Key >::isEmpty().
void BALL::GraphVertex< Vertex, Edge, Face >::insert | ( | Face * | face | ) | [inline] |
Insert a new face into the HashSet of faces the GraphVertex belongs to.
face | a pointer to the new face |
References BALL::GraphVertex< Vertex, Edge, Face >::faces_, and BALL::HashSet< Key >::insert().
void BALL::GraphVertex< Vertex, Edge, Face >::insert | ( | Edge * | edge | ) | [inline] |
Insert a new edge into the HashSet of edges the GraphVertex belongs to.
edge | a pointer to the new edge |
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, and BALL::HashSet< Key >::insert().
bool BALL::GraphVertex< Vertex, Edge, Face >::join | ( | const Vertex & | vertex | ) | [inline] |
Join two GraphVertices if they are similar. All edges and faces of the given Vertex are inserted.
vertex | the Vertex to join with |
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, BALL::GraphVertex< Vertex, Edge, Face >::faces_, and BALL::HashSet< Key >::insert().
Position BALL::GraphVertex< Vertex, Edge, Face >::numberOfEdges | ( | ) | const [inline] |
Return the number of edges the GraphVertex belongs to.
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, and BALL::HashSet< Key >::size().
Position BALL::GraphVertex< Vertex, Edge, Face >::numberOfFaces | ( | ) | const [inline] |
Return the number of faces the GraphVertex belongs to.
References BALL::GraphVertex< Vertex, Edge, Face >::faces_, and BALL::HashSet< Key >::size().
bool BALL::GraphVertex< Vertex, Edge, Face >::operator!= | ( | const Vertex & | ) | const [inline, virtual] |
Inequality operator.
Reimplemented in BALL::RSVertex, BALL::SASVertex, BALL::SESVertex, and BALL::TrianglePoint.
bool BALL::GraphVertex< Vertex, Edge, Face >::operator*= | ( | const Vertex & | ) | const [inline, virtual] |
Similarity operator.
Reimplemented in BALL::RSVertex, BALL::SASVertex, BALL::SESVertex, and BALL::TrianglePoint.
GraphVertex< Vertex, Edge, Face > & BALL::GraphVertex< Vertex, Edge, Face >::operator= | ( | const GraphVertex< Vertex, Edge, Face > & | vertex | ) | [inline] |
Assign from another GraphVertex. The GraphVertex object is linked to the neighbours of the GraphVertex object to assign from.
vertex | the GraphVertex object to assign from |
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, BALL::GraphVertex< Vertex, Edge, Face >::faces_, and BALL::GraphVertex< Vertex, Edge, Face >::index_.
bool BALL::GraphVertex< Vertex, Edge, Face >::operator== | ( | const Vertex & | ) | const [inline, virtual] |
Equality operator.
Reimplemented in BALL::RSVertex, BALL::SASVertex, BALL::SESVertex, and BALL::TrianglePoint.
void BALL::GraphVertex< Vertex, Edge, Face >::remove | ( | Face * | face | ) | [inline] |
Remove a face from the HashSet of faces the GraphVertex belongs to.
face | a pointer to the face to remove |
References BALL::HashSet< Key >::erase(), and BALL::GraphVertex< Vertex, Edge, Face >::faces_.
void BALL::GraphVertex< Vertex, Edge, Face >::remove | ( | Edge * | edge | ) | [inline] |
Remove an edge from the HashSet of edges the GraphVertex belongs to.
edge | a pointer to the edge to remove |
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, and BALL::HashSet< Key >::erase().
void BALL::GraphVertex< Vertex, Edge, Face >::set | ( | const GraphVertex< Vertex, Edge, Face > & | vertex, | |
bool | deep = false | |||
) | [inline] |
Assign from another GraphVertex.
vertex | the GraphVertex object to assign from | |
deep | if deep = false, all pointers are set to NULL (default). Otherwise the GraphVertex object is linked to the neighbours of the GraphVertex object to assign from. |
References BALL::GraphVertex< Vertex, Edge, Face >::edges_, BALL::GraphVertex< Vertex, Edge, Face >::faces_, and BALL::GraphVertex< Vertex, Edge, Face >::index_.
void BALL::GraphVertex< Vertex, Edge, Face >::setIndex | ( | Index | index | ) | [inline] |
Set the index of the vertex.
index | the new index |
References BALL::GraphVertex< Vertex, Edge, Face >::index_.
bool BALL::GraphVertex< Vertex, Edge, Face >::substitute | ( | Vertex * | vertex | ) | [inline] |
Subsitute the GraphVertex by a similar one. The GraphVertex is substituted in all his Edges and Faces.
vertex | a pointer to the vertex to substitute |
References BALL::HashSet< Key >::begin(), BALL::GraphVertex< Vertex, Edge, Face >::edges_, BALL::HashSet< Key >::end(), and BALL::GraphVertex< Vertex, Edge, Face >::faces_.
friend class GraphEdge< Vertex, Edge, Face > [friend] |
friend class GraphFace< Vertex, Edge, Face > [friend] |
friend class GraphTriangle< Vertex, Edge, Face > [friend] |
HashSet<Edge*> BALL::GraphVertex< Vertex, Edge, Face >::edges_ [protected] |
Referenced by BALL::GraphVertex< Vertex, Edge, Face >::beginEdge(), BALL::GraphVertex< Vertex, Edge, Face >::endEdge(), BALL::GraphVertex< Vertex, Edge, Face >::GraphVertex(), BALL::GraphVertex< Vertex, Edge, Face >::has(), BALL::GraphVertex< Vertex, Edge, Face >::hasEdges(), BALL::GraphVertex< Vertex, Edge, Face >::insert(), BALL::GraphVertex< Vertex, Edge, Face >::join(), BALL::GraphVertex< Vertex, Edge, Face >::numberOfEdges(), BALL::GraphVertex< Vertex, Edge, Face >::operator=(), BALL::GraphVertex< Vertex, Edge, Face >::remove(), BALL::GraphVertex< Vertex, Edge, Face >::set(), and BALL::GraphVertex< Vertex, Edge, Face >::substitute().
HashSet<Face*> BALL::GraphVertex< Vertex, Edge, Face >::faces_ [protected] |
Referenced by BALL::GraphVertex< Vertex, Edge, Face >::beginFace(), BALL::GraphVertex< Vertex, Edge, Face >::endFace(), BALL::GraphVertex< Vertex, Edge, Face >::GraphVertex(), BALL::GraphVertex< Vertex, Edge, Face >::has(), BALL::GraphVertex< Vertex, Edge, Face >::hasFaces(), BALL::GraphVertex< Vertex, Edge, Face >::insert(), BALL::GraphVertex< Vertex, Edge, Face >::join(), BALL::GraphVertex< Vertex, Edge, Face >::numberOfFaces(), BALL::GraphVertex< Vertex, Edge, Face >::operator=(), BALL::GraphVertex< Vertex, Edge, Face >::remove(), BALL::GraphVertex< Vertex, Edge, Face >::set(), and BALL::GraphVertex< Vertex, Edge, Face >::substitute().
Index BALL::GraphVertex< Vertex, Edge, Face >::index_ [protected] |