Data structure representing triangle strip data for a geometry part used in the GeometryModel More...
Public Member Functions | |
DataTriangleStrip () | |
Constructs an empty triangle strip data object. More... | |
DataTriangleStrip (const std::vector< Vec3d > &vertices) | |
Constructs a triangles object from the specified vertices. More... | |
virtual Type | type () const |
Returns Data::TRIANGLE_STRIP. 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
For many surfaces and shapes, you will need to draw several connected triangles. You can save a lot of time by drawing a strip of connected triangles. After specifying the first three vertices for the initial triangle, you only need to specify a single point for each additional triangle. Each additional triangle will be one the added point (Vn) in combination with the two previous points (Vn-1 and Vn-2).
Indices: 0 1 2 3 4 5 ... Triangles: {0 1 2} {1 2 3} {2 3 4} {3 4 5}
A vertices array of length n, will generate n - 2 triangles
cee::geo::DataTriangleStrip::DataTriangleStrip | ( | ) |
Constructs an empty triangle strip data object.
cee::geo::DataTriangleStrip::DataTriangleStrip | ( | 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::DataTriangleStrip::removeAll | ( | ) |
Clears all data.
void cee::geo::DataTriangleStrip::setVertices | ( | const std::vector< Vec3d > & | vertices | ) |
Sets vertices of all the triangles.
size_t cee::geo::DataTriangleStrip::triangleCount | ( | ) | const |
Returns number of triangles available.
|
virtual |
Returns Data::TRIANGLE_STRIP.
Implements cee::geo::Data.
std::vector< Vec3d > cee::geo::DataTriangleStrip::vertices | ( | ) | const |
Returns array of vertices used to build up the triangles.
A vertices array of length n, will generate n - 2 triangles