#include <BALL/STRUCTURE/graphEdge.h>
Public Member Functions | |
Constructors and Destructors | |
GraphEdge () | |
GraphEdge (const GraphEdge< Vertex, Edge, Face > &edge, bool deep=false) | |
GraphEdge (Vertex *vertex1, Vertex *vertex2, Face *face1, Face *face2, Index index) | |
virtual | ~GraphEdge () |
Assignment | |
void | set (const GraphEdge< Vertex, Edge, Face > &edge, bool deep=false) |
GraphEdge< Vertex, Edge, Face > & | operator= (const GraphEdge< Vertex, Edge, Face > &edge) |
void | set (Vertex *vertex0, Vertex *vertex1, Face *face0, Face *face1, Index index) |
Accessors | |
void | setVertex (Position i, Vertex *vertex) |
Vertex * | getVertex (Position i) const |
void | setFace (Position i, Face *face) |
Face * | getFace (Position i) const |
void | setIndex (Index index) |
Index | getIndex () const |
Vertex * | other (const Vertex *vertex) const throw (Exception::GeneralException) |
Face * | other (const Face *face) const throw (Exception::GeneralException) |
bool | substitute (const Vertex *old_vertex, Vertex *new_vertex) |
bool | substitute (const Face *old_vertex, Face *new_vertex) |
Face * | remove (const Face *face) |
void | revert () |
Predicates | |
virtual bool | operator== (const Edge &) const |
virtual bool | operator!= (const Edge &) const |
virtual bool | operator*= (const Edge &) const |
Protected Attributes | |
Vertex * | vertex_ [2] |
Face * | face_ [2] |
Index | index_ |
Friends | |
Class friends | |
| |
class | GraphVertex< Vertex, Edge, Face > |
class | GraphFace< Vertex, Edge, Face > |
class | GraphTriangle< Vertex, Edge, Face > |
Generic GraphEdge Class.
BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge | ( | ) | [inline] |
Default constructor. This method creates a new GraphEdge object.
BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge | ( | const GraphEdge< Vertex, Edge, Face > & | edge, | |
bool | deep = false | |||
) | [inline] |
Copy constructor. Create a new GraphEdge object from another.
edge | the GraphEdge object to be copied | |
deep | if deep = false, all pointers are set to NULL (default). Otherwise the new GraphEdge object is linked to the neighbours of the old GraphEdge object. |
References BALL::GraphEdge< Vertex, Edge, Face >::face_, and BALL::GraphEdge< Vertex, Edge, Face >::vertex_.
BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge | ( | Vertex * | vertex1, | |
Vertex * | vertex2, | |||
Face * | face1, | |||
Face * | face2, | |||
Index | index | |||
) | [inline] |
Detailled constructor. Create a new GraphEdge object from a lot of nice objects
vertex1 | assigned to the first vertex | |
vertex2 | assigned to the second vertex | |
face1 | assigned to the first face | |
face2 | assigned to the second face | |
index | assigned to the index |
BALL::GraphEdge< Vertex, Edge, Face >::~GraphEdge | ( | ) | [inline, virtual] |
Destructor. Destructs the GraphEdge object. The neighboured faces and vertices are {/bf not} destructed.
Face * BALL::GraphEdge< Vertex, Edge, Face >::getFace | ( | Position | i | ) | const [inline] |
Return one of the two faces of the GraphEdge.
i |
References BALL::GraphEdge< Vertex, Edge, Face >::face_.
Index BALL::GraphEdge< Vertex, Edge, Face >::getIndex | ( | ) | const [inline] |
Return the index of the GraphEdge.
References BALL::GraphEdge< Vertex, Edge, Face >::index_.
Vertex * BALL::GraphEdge< Vertex, Edge, Face >::getVertex | ( | Position | i | ) | const [inline] |
Return one of the two vertices of the GraphEdge.
i |
References BALL::GraphEdge< Vertex, Edge, Face >::vertex_.
bool BALL::GraphEdge< Vertex, Edge, Face >::operator!= | ( | const Edge & | ) | const [inline, virtual] |
Inequality operator.
Reimplemented in BALL::RSEdge, BALL::SASEdge, BALL::SESEdge, and BALL::TriangleEdge.
bool BALL::GraphEdge< Vertex, Edge, Face >::operator*= | ( | const Edge & | ) | const [inline, virtual] |
Similarity operator.
Reimplemented in BALL::RSEdge, BALL::SASEdge, BALL::SESEdge, and BALL::TriangleEdge.
GraphEdge< Vertex, Edge, Face > & BALL::GraphEdge< Vertex, Edge, Face >::operator= | ( | const GraphEdge< Vertex, Edge, Face > & | edge | ) | [inline] |
Assign from another GraphEdge. The GraphEdge object is linked to the neighbours of the GraphEdge object to assign from.
edge | the GraphEdge object to assign from |
References BALL::GraphEdge< Vertex, Edge, Face >::face_, BALL::GraphEdge< Vertex, Edge, Face >::index_, and BALL::GraphEdge< Vertex, Edge, Face >::vertex_.
bool BALL::GraphEdge< Vertex, Edge, Face >::operator== | ( | const Edge & | ) | const [inline, virtual] |
Equality operator.
Reimplemented in BALL::RSEdge, BALL::SASEdge, BALL::SESEdge, and BALL::TriangleEdge.
Face * BALL::GraphEdge< Vertex, Edge, Face >::other | ( | const Face * | face | ) | const throw (Exception::GeneralException) [inline] |
Vertex * BALL::GraphEdge< Vertex, Edge, Face >::other | ( | const Vertex * | vertex | ) | const throw (Exception::GeneralException) [inline] |
Face * BALL::GraphEdge< Vertex, Edge, Face >::remove | ( | const Face * | face | ) | [inline] |
Delete a face of the GraphEdge. If the second face of the GraphEdge should be deleted, it is set to NULL. If the first one should be deleted, the second one is copied to first position and then set to NULL.
face | the face to delete |
References BALL::GraphEdge< Vertex, Edge, Face >::face_.
void BALL::GraphEdge< Vertex, Edge, Face >::revert | ( | ) | [inline] |
References BALL::GraphEdge< Vertex, Edge, Face >::vertex_.
void BALL::GraphEdge< Vertex, Edge, Face >::set | ( | Vertex * | vertex0, | |
Vertex * | vertex1, | |||
Face * | face0, | |||
Face * | face1, | |||
Index | index | |||
) | [inline] |
Assign from a lot of nice objects
vertex0 | assigned to the first vertex | |
vertex1 | assigned to the second vertex | |
face0 | assigned to the first face | |
face1 | assigned to the second face | |
index | assigned to the index |
void BALL::GraphEdge< Vertex, Edge, Face >::set | ( | const GraphEdge< Vertex, Edge, Face > & | edge, | |
bool | deep = false | |||
) | [inline] |
Assign from another GraphEdge.
edge | the GraphEdge object to assign from | |
deep | if deep = false, all pointers are set to NULL (default). Otherwise the GraphEdge object is linked to the neighbours of the GraphEdge object to assign from. |
References BALL::GraphEdge< Vertex, Edge, Face >::face_, BALL::GraphEdge< Vertex, Edge, Face >::index_, and BALL::GraphEdge< Vertex, Edge, Face >::vertex_.
void BALL::GraphEdge< Vertex, Edge, Face >::setFace | ( | Position | i, | |
Face * | face | |||
) | [inline] |
Set one of the two faces of the GraphEdge.
i | change the first face, if i = 0, the second otherwise | |
face | a pointer to the new face |
References BALL::GraphEdge< Vertex, Edge, Face >::face_.
void BALL::GraphEdge< Vertex, Edge, Face >::setIndex | ( | Index | index | ) | [inline] |
Set the index of the GraphEdge.
index | the new index |
References BALL::GraphEdge< Vertex, Edge, Face >::index_.
void BALL::GraphEdge< Vertex, Edge, Face >::setVertex | ( | Position | i, | |
Vertex * | vertex | |||
) | [inline] |
Set one of the two vertices of the GraphEdge.
i | the first vertex is changed if i = 0, the second otherwise | |
vertex | a pointer to the new vertex |
References BALL::GraphEdge< Vertex, Edge, Face >::vertex_.
bool BALL::GraphEdge< Vertex, Edge, Face >::substitute | ( | const Face * | old_vertex, | |
Face * | new_vertex | |||
) | [inline] |
Substitute a face by an other one.
old_vertex | the face that has to be substituted | |
new_vertex | the new face |
bool BALL::GraphEdge< Vertex, Edge, Face >::substitute | ( | const Vertex * | old_vertex, | |
Vertex * | new_vertex | |||
) | [inline] |
Substitute a vertex by an other one.
old_vertex | the vertex that has to be substituted | |
new_vertex | the new vertex |
friend class GraphFace< Vertex, Edge, Face > [friend] |
friend class GraphTriangle< Vertex, Edge, Face > [friend] |
friend class GraphVertex< Vertex, Edge, Face > [friend] |
Face* BALL::GraphEdge< Vertex, Edge, Face >::face_[2] [protected] |
Referenced by BALL::GraphEdge< Vertex, Edge, Face >::getFace(), BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge(), BALL::GraphEdge< Vertex, Edge, Face >::operator=(), BALL::GraphEdge< Vertex, Edge, Face >::remove(), BALL::GraphEdge< Vertex, Edge, Face >::set(), and BALL::GraphEdge< Vertex, Edge, Face >::setFace().
Index BALL::GraphEdge< Vertex, Edge, Face >::index_ [protected] |
Vertex* BALL::GraphEdge< Vertex, Edge, Face >::vertex_[2] [protected] |
Referenced by BALL::GraphEdge< Vertex, Edge, Face >::getVertex(), BALL::GraphEdge< Vertex, Edge, Face >::GraphEdge(), BALL::GraphEdge< Vertex, Edge, Face >::operator=(), BALL::GraphEdge< Vertex, Edge, Face >::revert(), BALL::GraphEdge< Vertex, Edge, Face >::set(), and BALL::GraphEdge< Vertex, Edge, Face >::setVertex().