Data structure representing polylines data for a geometry part used in the GeometryModel More...
Public Member Functions | |
DataIndexedPolylines () | |
Constructs an empty data object. More... | |
DataIndexedPolylines (const std::vector< Vec3d > &vertices, const std::vector< std::vector< unsigned int > > &indices) | |
Constructs polyline data defined by an array of vertices and an array of indices. More... | |
virtual Type | type () const |
Returns Data::INDEXED_POLYLINES. More... | |
virtual BoundingBox | boundingBox () const |
Returns the bounding box of the part data. More... | |
size_t | vertexCount () const |
Returns number of vertices for all polylines. More... | |
std::vector< Vec3d > | vertices () const |
Returns an array of vertices for all the polylines. More... | |
void | setVertices (const std::vector< Vec3d > &vertices) |
Sets vertices used by all the polylines. More... | |
size_t | polylineCount () const |
Returns number of polylines. More... | |
std::vector< std::vector< unsigned int > > | polylinesIndices () const |
Returns the two dimensional array of indices for all polylines in data. More... | |
void | setPolylinesIndices (const std::vector< std::vector< unsigned int > > &indices) |
Sets the indices into the vertex array for all polylines. 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 polylines data for a geometry part used in the GeometryModel
Polylines data consist of an array of vertices, and a two dimensional array of indices where each entry describes a polyline. You can have as many polylines as you want, and each polyline can have any number of segments.
cee::geo::DataIndexedPolylines::DataIndexedPolylines | ( | ) |
Constructs an empty data object.
cee::geo::DataIndexedPolylines::DataIndexedPolylines | ( | const std::vector< Vec3d > & | vertices, |
const std::vector< std::vector< unsigned int > > & | indices | ||
) |
Constructs polyline data defined by an array of vertices and an array of indices.
indices is a two dimensional array where each entry describes a polyline. You can have as many polylines as you want, and each polyline can have any number of segments.
Example, part containing two polylines:
|
virtual |
Returns the bounding box of the part data.
This also includes vertices which may not be used by the indices data.
Implements cee::geo::Data.
size_t cee::geo::DataIndexedPolylines::polylineCount | ( | ) | const |
Returns number of polylines.
std::vector< std::vector< unsigned int > > cee::geo::DataIndexedPolylines::polylinesIndices | ( | ) | const |
Returns the two dimensional array of indices for all polylines in data.
void cee::geo::DataIndexedPolylines::removeAll | ( | ) |
Clears all data.
void cee::geo::DataIndexedPolylines::setPolylinesIndices | ( | const std::vector< std::vector< unsigned int > > & | indices | ) |
Sets the indices into the vertex array for all polylines.
The indices must be a two dimensional array, even if there is only one polyline.
Example:
void cee::geo::DataIndexedPolylines::setVertices | ( | const std::vector< Vec3d > & | vertices | ) |
Sets vertices used by all the polylines.
These vertices are used to build up each polyline defined by their associated connectivity indices.
|
virtual |
Returns Data::INDEXED_POLYLINES.
Implements cee::geo::Data.
size_t cee::geo::DataIndexedPolylines::vertexCount | ( | ) | const |
Returns number of vertices for all polylines.
std::vector< Vec3d > cee::geo::DataIndexedPolylines::vertices | ( | ) | const |
Returns an array of vertices for all the polylines.
These vertices are used to build up each polyline defined by their associated connectivity indices.