#include <sglMonoIndexedGeoSet.hpp>
Inheritance diagram for sglMonoIndexedGeoSet::
Public Methods | |
sglMonoIndexedGeoSet () | |
virtual | ~sglMonoIndexedGeoSet () |
void | setIndexList (sglIndexType *alist) |
void | setIndexList (sglDataPtr *data, int offset=0, int stride=0) |
sglDataPtr* | getIndexList () const |
int | getIndexOffset () const |
int | getIndexStride () const |
void | setDisablePrefetch (bool val) |
bool | getDisablePrefetch () |
Protected Methods | |
virtual bool | computeBounds () |
virtual void | computeNoBounds () |
virtual void | updateDrawFunc () |
Protected Attributes | |
sglIndexPtr | m_index |
bool | m_disable_prefetch |
vector<sglIndexType> | m_index_min |
vector<sglIndexType> | m_index_max |
Friends | |
class | Initializer |
{\bf Concrete subclasses: sglMonoIndexedPointSet, sglMonoIndexedLineSet, sglMonoIndexedTriangleSet, sglMonoIndexedQuadSet}
These are the concrete subclasses of sglMonoIndexedGeoSet class that implement point, line, triangle, and quad primitive types.
{\bf Example:} \begin{verbatim} sglVec3f *vertex = new sglVec3f[6]; vertex[0].set( 0.0f, 0.0f, 0.0f); vertex[1].set( 0.0f, 1.0f, 0.0f); vertex[2].set( 1.0f, 0.0f, 0.0f); vertex[3].set( 1.0f,-1.0f, 0.0f); vertex[4].set(-1.0f,-1.0f, 0.0f); vertex[5].set(-1.0f, 0.0f, 0.0f);
sglVec4f *color = new sglVec4f[5]; color[0].set( 1.0f, 0.0f, 0.0f, 1.0f); color[1].set( 0.0f, 1.0f, 0.0f, 1.0f); color[2].set( 0.0f, 0.0f, 1.0f, 1.0f); color[3].set( 0.0f, 0.0f, 1.0f, 1.0f); color[4].set( 0.0f, 1.0f, 0.0f, 1.0f);
unsigned int *vindex = new unsigned int[10]; vindex[0] = 0; vindex[1] = 1; // indices for a five pointed star (sorta) vindex[2] = 0; vindex[3] = 2; vindex[4] = 0; vindex[5] = 3; vindex[6] = 0; vindex[7] = 4; vindex[8] = 0; vindex[9] = 5;
unsigned int *cindex = new unsigned int[5]; cindex[0] = 0; cindex[1] = 1; cindex[2] = 2; cindex[3] = 2; cindex[4] = 1;
sglMonoIndexedLineSet *line_gset = new sglMonoIndexedPointSet; line_gset->setNumPrims(5); line_gset->setCoordList(vertex); line_gset->setIndexList(vindex); line_gset->setColorList(sglGeoSet::ePER_PRIM, color); // doesn't use index list \end{verbatim}
Definition at line 92 of file sglMonoIndexedGeoSet.hpp.
|
default constructor.
|
|
virtual destructor.
|
|
Set the index list for ePER_VERTEX attributes. Deprecated.
Definition at line 101 of file sglMonoIndexedGeoSet.hpp. |
|
Set the array of indices for ePER_VERTEX attributes. 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 indices must be of type sglIndexType.
|
|
Get the index list for ePER_VERTEX attributes.
Definition at line 122 of file sglMonoIndexedGeoSet.hpp. |
|
Get the number of bytes in the array before the first index.
Definition at line 125 of file sglMonoIndexedGeoSet.hpp. |
|
Get the number of bytes from the start of one index to the next.
Definition at line 128 of file sglMonoIndexedGeoSet.hpp. |
|
If the set of indices above sparsely indexes the vertex data, then it might be best to disable prefetching. This will prevent unnecessarily processing unused vertices. |
|
Compute the bounding box for this geometry and fill in the member variable, m_bbox, in this class.
Reimplemented from sglGeoSet. Reimplemented in sglMonoIndexedGeoStripSet. |