#include <sglIndexedGeoStripSet.hpp>
Inheritance diagram for sglIndexedGeoStripSet::
Public Methods | |
sglIndexedGeoStripSet () | |
virtual | ~sglIndexedGeoStripSet () |
virtual unsigned int | getPrimSize () const |
sglDataPtr* | getPrimLengths () const |
void | setPrimLengths (sglIndexType *alist) |
void | setPrimLengths (sglDataPtr *data, int offset=0, int stride=0) |
int | getPrimLengthsOffset () const |
int | getPrimLengthsStride () const |
virtual void | addStats (sglStats &stats) const |
Protected Methods | |
virtual bool | computeBounds () |
virtual void | updateDrawFunc () |
Protected Attributes | |
sglIndexPtr | m_lengths |
Friends | |
class | Initializer |
{\bf Concrete subclasses: sglIndexedLineStripSet, sglIndexedTriangleFanSet, sglIndexedTriangleStripSet, sglIndexedQuadStripSet, sglIndexedPolygonSet}
These are the concrete subclasses of sglIndexedGeoStripSet that implement the line strip, triangle fan, triangle strip, quad strip and polygon primitives.
{\bf Example:} \begin{verbatim} unsigned int *lengths = new unsigned int[1]; lengths[0] = 5;
sglVec3f *vertex = new sglVec3f[5]; vertex[0].set( 0.0f, 1.0f, 0.0f); vertex[1].set( 1.0f, 0.0f, 0.0f); vertex[2].set( 1.0f,-1.0f, 0.0f); vertex[3].set(-1.0f,-1.0f, 0.0f); vertex[4].set(-1.0f, 0.0f, 0.0f);
sglVec4f *color = new sglVec4f[3]; color[0].set( 1.0f, 0.0f, 0.0f, 1.0f); color[1].set( 0.0f, 1.0f, 0.0f, 1.0f);
unsigned int *vindex = new unsigned int[5]; vindex[0] = 0; // indices for a pentagon (irregular) vindex[1] = 1; vindex[2] = 2; vindex[3] = 3; vindex[4] = 4;
unsigned int *cindex = new unsigned int[5]; cindex[0] = 0; cindex[1] = 1; cindex[2] = 0; cindex[3] = 1; cindex[4] = 0;
sglIndexedPolygonSet *poly_set = new sglIndexedPolygonSet; poly_set->setNumPrims(1); poly_set->setPrimLengths(lengths); poly_set->setCoordList(vertex); poly_set->setCoordIndexList(vindex); poly_set->setColorList(sglGeoSet::ePER_VERTEX, color); poly_set->setColorIndexList(cindex); \end{verbatim}
Definition at line 88 of file sglIndexedGeoStripSet.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
Not very useful for variable sized primitives.
Reimplemented from sglGeoSet. Definition at line 97 of file sglIndexedGeoStripSet.hpp. |
|
Get the lengths array.
Definition at line 100 of file sglIndexedGeoStripSet.hpp. |
|
Set the array of lengths. Deprecated.
Definition at line 103 of file sglIndexedGeoStripSet.hpp. |
|
Set the array of lengths. This will increment the reference count on the given data pointer, and decrement the reference count of the previous data pointer. If the previous data pointer's refernce count goes to zero, it will be deleted. The lengths must be of type sglIndexType.
|
|
Get the number of bytes in the array before the first length.
Definition at line 123 of file sglIndexedGeoStripSet.hpp. |
|
Get the number of bytes from the start of one length to the next.
Definition at line 126 of file sglIndexedGeoStripSet.hpp. |
|
Add this drawable's stats to the given sglStats.
Reimplemented from sglGeoSet. |
|
Compute the bounding box for this geometry and fill in the member variable, m_bbox, in this class.
Reimplemented from sglIndexedGeoSet. |