Collaboration diagram for col::Topology:

Creation, desctruction, assignments | |
| Topology () | |
| Empty topology. | |
| Topology (const Topology &source) | |
| void | operator= (const Topology &source) |
| Topology (const std::vector< TopoFace > &face) | |
| Create the topology relations. | |
| Topology (const unsigned int face_a[][Dop::NumOri], unsigned int nfaces, unsigned int face_nv[]) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Face_a is a 2-dim. | |
| Topology (const osg::GeometryPtr geom, bool unify=true, float tolerance=NearZero) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | operator= (const std::vector< TopoFace > &face) |
| Create the relations from a vector. | |
| void | createFromGeom (const osg::GeometryPtr geom, bool unify=false, float tolerance=NearZero) |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is exactly like the constructor Topology(const osg::GeometryPtr geom). | |
| void | create (const unsigned int face_a[][Dop::NumOri], unsigned int nfaces, unsigned int face_nv[]) |
| Create the relations from arrays. | |
| void | createRelations (void) |
| Create relationships. | |
Public Types | |
|
typedef std::vector< unsigned int > | FaceNeighbors |
| typedef FaceNeighbors::const_iterator | FaceNeighborIterator |
|
typedef std::vector< unsigned int > | VertexNeighbors |
| typedef VertexNeighbors::const_iterator | VertexNeighborIterator |
Public Member Functions | |
| void | setVertexEqualityEpsilon (OSG::Real32 epsilon) |
| void | setVertexEqualityTest (bool status) |
Access | |
| unsigned int | v_neighbors (unsigned int v_index) const |
| Return the number of neighbors a vertex has (i.e,, its degree). | |
| unsigned int | v_degree (unsigned int v_index) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| unsigned int | v2f_size (unsigned int v_index) const |
| Return the number of faces a vertex is incident to. | |
| unsigned int | f_size (unsigned int f_index_in) const |
| Return the number of vertices a face has. | |
| const unsigned int * | f_index (unsigned int f_index_in) const |
| Return the table of vertex indices for a given face. | |
| const std::vector< TopoFace > & | getFaceVector (void) const |
| Return the original face vector used to construct the topology. | |
| Topology::VertexNeighborIterator | vertexNeighborBegin (unsigned int v_index) const |
| Get begin of vertex neighbors. | |
| Topology::VertexNeighborIterator | vertexNeighborEnd (unsigned int v_index) const |
| Get end of vertex neighbors. | |
| Topology::FaceNeighborIterator | faceNeighborBegin (unsigned int f_index) const |
| Get begin of face neighbors. | |
| Topology::FaceNeighborIterator | faceNeighborEnd (unsigned int f_index) const |
| Get end of face neighbors. | |
| void | print (void) const |
| Print the topology (for debugging purposes). | |
Protected Attributes | |
|
std::vector< std::vector< unsigned int > > | m_v2f |
| vertex to face incidence relation; see createNeighbors(); v2f[i][j] is an index of a face that contains vertex i . | |
| std::vector< VertexNeighbors > | m_v2v |
| vertex to vertex adjacency relation; see createNeighbors(); v2v[i][j] is an index of a vertex that is adjacent to i . | |
| std::vector< FaceNeighbors > | m_f2f |
| vertex to vertex adjacency relation; see createNeighbors(); f2f[i][j] is an index of a face that is adjacent to i . | |
| std::vector< TopoFace > | m_f2v |
| face to vertex incidence relation (the array of faces) | |
| std::vector< unsigned int > | m_vEquivClass |
| Equity relation of vertex indices. | |
Alle Relationen verwenden Indices, keine Pointer. Die zugehoerige Geometrie wird (z.Z.) nicht in einem Topology-Objekt mit gespeichert.
| col::Topology::Topology | ( | ) |
Empty topology.
You assign a sensible value from a vector<TopoFace> later with the = operator.
| col::Topology::Topology | ( | const std::vector< TopoFace > & | face | ) |
Create the topology relations.
| face | an array of faces |
| XColBug | siehe createRelations |
| col::Topology::Topology | ( | const unsigned int | face_a[][Dop::NumOri], | |
| unsigned int | nfaces, | |||
| unsigned int | face_nv[] | |||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Face_a is a 2-dim.
array of indices into some vertex array. nfaces is the number of rows in face_a; face_nv[i] is the number of elements in face[i] (which must be < Dop::NumOri!).
| XCollision | If some face_nv[i] > Dop::NumOri. |
| col::Topology::Topology | ( | const osg::GeometryPtr | geom, | |
| bool | unify = true, |
|||
| float | tolerance = NearZero | |||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| unify | If true (default), then vertices will be unified first | |
| tolerance | Threshold for the unification |
If unify is set, then vertices will first be unified (according to some tolerance), before the topology relations are generated. The geometry geom will not be altered.
If the same vertices (= same coordinates) occur with different indices in geom's faces, and if unify is set to false, then they will still not be treated as the same vertex, i.e., a walk around such a vertex will not find all incident faces!
| void col::Topology::operator= | ( | const std::vector< TopoFace > & | face | ) |
Create the relations from a vector.
Exactly like the constructor Topology( const std::vector<TopoFace> &face ).
| void col::Topology::createFromGeom | ( | const osg::GeometryPtr | geom, | |
| bool | unify = false, |
|||
| float | tolerance = NearZero | |||
| ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This is exactly like the constructor Topology(const osg::GeometryPtr geom).
| void col::Topology::create | ( | const unsigned int | face_a[][Dop::NumOri], | |
| unsigned int | nfaces, | |||
| unsigned int | face_nv[] | |||
| ) |
Create the relations from arrays.
Exactly like the constructor Topology( face_a[][Dop::NumOri], ... )
| unsigned int col::Topology::v_neighbors | ( | unsigned int | m_v_index | ) | const |
Return the number of neighbors a vertex has (i.e,, its degree).
| m_v_index | the index number of a vertex |
| unsigned int col::Topology::v2f_size | ( | unsigned int | m_v_index | ) | const |
Return the number of faces a vertex is incident to.
| m_v_index | the index number of a vertex |
| unsigned int col::Topology::f_size | ( | unsigned int | f_index_in | ) | const |
Return the number of vertices a face has.
| f_index_in | the index number of a face |
| const unsigned int * col::Topology::f_index | ( | unsigned int | f_index_in | ) | const |
Return the table of vertex indices for a given face.
| f_index_in | the index number of a face |
| Topology::VertexNeighborIterator col::Topology::vertexNeighborBegin | ( | unsigned int | m_v_index | ) | const |
Get begin of vertex neighbors.
| Topology::VertexNeighborIterator col::Topology::vertexNeighborEnd | ( | unsigned int | m_v_index | ) | const |
Get end of vertex neighbors.
| Topology::FaceNeighborIterator col::Topology::faceNeighborBegin | ( | unsigned int | inf_index | ) | const |
Get begin of face neighbors.
| Topology::FaceNeighborIterator col::Topology::faceNeighborEnd | ( | unsigned int | inf_index | ) | const |
Get end of face neighbors.
| void col::Topology::createRelations | ( | void | ) | [protected] |
Create relationships.
This is meant to be called from the constructor
| XColBug | If there is a bug in the vertex or face vectors. And if there is some inconsistency in the topology constructed. |
std::vector<unsigned int> col::Topology::m_vEquivClass [protected] |
Equity relation of vertex indices.
vEequality[i] is a vertex index that should be treated equal to vertex i . If this vector is empty, then vertices have not been unified.
1.5.2