Data structure representing triangle strip data for a geometry part used in the GeometryModel More...
Public Member Functions | |
DataTriangleFan () | |
Constructs an empty triangle data object. More... | |
DataTriangleFan (const std::vector< Vec3d > &vertices) | |
Constructs a triangles object from the specified vertices. More... | |
virtual Type | type () const |
Returns Data::TRIANGLE_FAN. 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 build up the triangles. More... | |
void | setVertices (const std::vector< Vec3d > &vertices) |
Sets vertices of all the triangles. More... | |
size_t | triangleCount () const |
Returns number of triangles available. 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 triangle strip data for a geometry part used in the GeometryModel
A triangle fan is used to produce a group of connected triangles that fan around a central point. The first vertex forms the origin of the fan. After the first three vertices are used to draw the initial triangle, all subsequent vertices are used with the origin (V0) and the vertex immediately preceding it (Vn-1) to form the next triangle.
Indices: 0 1 2 3 4 5 ... Triangles: {0 1 2} {0} {2 3} {0} {3 4} {0} {4 5}
A vertices array of length n, will generate n - 2 triangles
cee::geo::DataTriangleFan::DataTriangleFan | ( | ) |
Constructs an empty triangle data object.
cee::geo::DataTriangleFan::DataTriangleFan | ( | const std::vector< Vec3d > & | vertices | ) |
Constructs a triangles object from the specified vertices.
|
virtual |
Returns the bounding box of the part data.
Implements cee::geo::Data.
void cee::geo::DataTriangleFan::removeAll | ( | ) |
Clears all data.
void cee::geo::DataTriangleFan::setVertices | ( | const std::vector< Vec3d > & | vertices | ) |
Sets vertices of all the triangles.
size_t cee::geo::DataTriangleFan::triangleCount | ( | ) | const |
Returns number of triangles available.
|
virtual |
Returns Data::TRIANGLE_FAN.
Implements cee::geo::Data.
std::vector< Vec3d > cee::geo::DataTriangleFan::vertices | ( | ) | const |
Returns array of vertices used to build up the triangles.
A vertices array of length n, will generate n - 2 triangles