Data structure representing indexed triangles data for a geometry part More...
Public Member Functions | |
DataIndexedTriangles () | |
Constructs an empty data object. More... | |
DataIndexedTriangles (const std::vector< Vec3d > &vertices, const std::vector< unsigned int > &indices) | |
Constructs triangle data defined by an array of vertices and an array of connectivity indices. More... | |
virtual Type | type () const |
Returns Data::INDEXED_TRIANGLES. More... | |
virtual BoundingBox | boundingBox () const |
Returns the bounding box of the part data. More... | |
std::vector< Vec3d > | vertices () const |
Returns array of vertices used to define the triangles. More... | |
void | setVertices (const std::vector< Vec3d > &vertices) |
Sets vertices for all the triangles. More... | |
std::vector< unsigned int > | indices () const |
Returns the array of connectivity indices used to tell which coordinates to build up the each triangle. More... | |
void | setIndices (const std::vector< unsigned int > &indices) |
Sets connectivity indices used to tell which coordinates to build up each triangle. More... | |
size_t | triangleCount () const |
Returns number of triangles in this data object. More... | |
void | removeAll () |
Clears all data. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Additional Inherited Members | |
![]() | |
enum | Type { INDEXED_TRIANGLES, TRIANGLE_FAN, TRIANGLE_STRIP, INDEXED_POLYLINES, POINTS } |
Enumerator for each of the available primitives. More... | |
![]() | |
Data () | |
Constructs an empty part data. More... | |
Data structure representing indexed triangles data for a geometry part
Each triangle is defined by three connectivity indices into the vertices array. The created data will have indices.size()/3 triangles.
cee::geo::DataIndexedTriangles::DataIndexedTriangles | ( | ) |
Constructs an empty data object.
cee::geo::DataIndexedTriangles::DataIndexedTriangles | ( | const std::vector< Vec3d > & | vertices, |
const std::vector< unsigned int > & | indices | ||
) |
Constructs triangle data defined by an array of vertices and an array of connectivity indices.
Each triangle is defined by three indices. The created data will have indices.size()/3
triangles.
|
virtual |
Returns the bounding box of the part data.
Implements cee::geo::Data.
std::vector< unsigned int > cee::geo::DataIndexedTriangles::indices | ( | ) | const |
Returns the array of connectivity indices used to tell which coordinates to build up the each triangle.
Each triangle is defined by three indices. The data will have indices.size()/3
triangles.
void cee::geo::DataIndexedTriangles::removeAll | ( | ) |
Clears all data.
void cee::geo::DataIndexedTriangles::setIndices | ( | const std::vector< unsigned int > & | indices | ) |
Sets connectivity indices used to tell which coordinates to build up each triangle.
The array must contain 3 indices per triangle.
void cee::geo::DataIndexedTriangles::setVertices | ( | const std::vector< Vec3d > & | vertices | ) |
Sets vertices for all the triangles.
size_t cee::geo::DataIndexedTriangles::triangleCount | ( | ) | const |
Returns number of triangles in this data object.
|
virtual |
Returns Data::INDEXED_TRIANGLES.
Implements cee::geo::Data.
std::vector< Vec3d > cee::geo::DataIndexedTriangles::vertices | ( | ) | const |
Returns array of vertices used to define the triangles.