class DataTriangleStrip : public Data

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

Public Functions


Constructs an empty triangle strip data object.

DataTriangleStrip(const std::vector<Vec3d> &vertices)

Constructs a triangles object from the specified vertices.

std::vector<cee::Vec3d> vertices;
vertices.push_back(cee::Vec3d(0, 0, 0));
vertices.push_back(cee::Vec3d(1, 0, 0));
vertices.push_back(cee::Vec3d(1, 1, 0));
vertices.push_back(cee::Vec3d(2, 1, 0));

cee::PtrRef<cee::geo::DataTriangleStrip> triangleData = new cee::geo::DataTriangleStrip(vertices);
virtual Type type() const


virtual BoundingBox boundingBox() const

Returns the bounding box of the part data.

std::vector<Vec3d> vertices() const

Returns array of vertices used to build up the triangles.

A vertices array of length n, will generate n - 2 triangles

See also


void setVertices(const std::vector<Vec3d> &vertices)

Sets vertices of all the triangles.

See also


size_t triangleCount() const

Returns number of triangles available.

void removeAll()

Clears all data.