| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/triangleset.h>

Public Types | |
| enum | VertexDataConfigFlags { VD_ENABLE_VRAM = 0x1, VD_ENABLE_SOURCE_ELIMINATION = 0x2, VD_CONFIG_MASK = VD_ENABLE_SOURCE_ELIMINATION | VD_ENABLE_VRAM } |
| enum | VertexDataStateFlags { VD_LOCK = 0x4, VD_LOCKED = 0x8, VD_UPDATE_ALL = 0x10, VD_UPDATE_RANGE = 0x20, VD_DELETE = 0x40, VD_CUSTOM = 0x80, VD_UPDATE_MASK = VD_UPDATE_ALL | VD_UPDATE_RANGE, VD_STATE_MASK = VD_CUSTOM | VD_DELETE | VD_UPDATE_MASK | VD_LOCKED | VD_LOCK } |
| typedef VertexData< 4, float > | VD |
Public Member Functions | |
| TriangleSet (SO< Iterator< VD > > vertices=NULL, SO< Iterator< UINT > > indices=NULL) | |
| TriangleSet (SO< Iterator< Vector > > vertices, SO< Iterator< UINT > > indices=NULL) | |
| void | clear () |
| SO< TriangleSet > | copy () const |
| SO< DataIterator< VD > > | vertices () const |
| void | copyVertices (const Iterator< VD > *) |
| void | copyVertices (const Iterator< Vector > *) |
| void | setVertices (SO< DataIterator< VD > > vertIter) |
| SO< DataIterator< VD > > | normals () const |
| void | copyNormals (const Iterator< VD > *) |
| void | copyNormals (const Iterator< Vector > *) |
| void | setNormals (SO< DataIterator< VD > > normalIter) |
| SO< DataIterator< VD > > | colors () const |
| void | copyColors (const Iterator< VD > *sourceColors) |
| void | copyColors (const Iterator< Color > *sourceColors) |
| void | setColors (SO< DataIterator< VD > > colorIter) |
| SO< DataIterator< VD > > | texCoords (const UINT index) const |
| void | copyTexCoords (const UINT index, const Iterator< VD > *) |
| void | copyTexCoords (const UINT index, const Iterator< Vector > *) |
| void | setTexCoords (UINT index, SO< DataIterator< VD > > texCoordIter) |
| SO< DataIterator< UINT > > | indices () const |
| void | copyIndices (const Iterator< UINT > *) |
| void | setIndices (SO< DataIterator< UINT > > indexIter) |
| SO< DataIterator< UINT > > | objectIDs () const |
| void | copyObjectIDs (const Iterator< UINT > *) |
| void | setObjectIDs (SO< DataIterator< UINT > > objectIdIter) |
| SO< DataIterator< VD > > | vertexData (const ID &vertexDataID) const |
| void | copyVertexData (const ID &vertexDataID, const Iterator< VD > *sourceData) |
| void | copyVertexData (const ID &vertexDataID, const Iterator< Vector > *sourceData) |
| void | copyVertexData (const ID &vertexDataID, const Iterator< Color > *sourceData) |
| void | setVertexData (const ID &vertexDataID, SO< DataIterator< VD > > iter) |
| void | lock (UINT configFlags=VD_ENABLE_VRAM) |
| void | lock (const ID &vertexDataID, UINT configFlags=VD_ENABLE_VRAM) |
| void | lockIndices (UINT configFlags=VD_ENABLE_VRAM) |
| void | unlock () |
| void | unlock (const ID &vertexDataID) |
| void | unlockIndices () |
| SO< Iterator< ID > > | vertexDataIDs () const |
| virtual void | setBoundingBox (const Bounds &newBBox) |
| virtual Bounds | boundingBox () const |
| Shapes define their bounding box in model coordinates. | |
| virtual void | modified () |
| void | reportState (const char *triSetName=NULL) |
| VRS_TYPEINFO (TriangleSet, Shape) | |
Static Public Member Functions | |
| static UINT | maxTexCoordSets () |
Protected Types | |
| typedef SO< Dictionary< ID, SO < VertexDataEntry< VD > > > > | VertexDataDictionary |
Protected Member Functions | |
| const ID & | texCoordIdFromIndex (const UINT index) const |
Protected Attributes | |
| VertexDataDictionary | m_vertexData |
| SO< VertexDataEntry< UINT > > | m_indexDataEntry |
| SO< DataIterator< UINT > > | m_objectIdData |
| UINT | m_configFlags |
| SO< VertexAttributeDataGL > | m_bufferObjectData |
| SO< VertexAttributeIndexGL > | m_bufferObjectIndex |
| Bounds | m_bbox |
| TransactionNo | m_bboxValid |
| TransactionNo | m_bufferObjectUpdate |
Friends | |
| class | TriangleSetSimplifierGL |
Classes | |
| class | VertexDataEntry |
| typedef VertexData<4, float> VRS::TriangleSet::VD |
Generic vertex attribute data format of 4 floats
typedef SO<Dictionary<ID, SO<VertexDataEntry<VD> > > > VRS::TriangleSet::VertexDataDictionary [protected] |
| VRS::TriangleSet::TriangleSet | ( | SO< Iterator< VD > > | vertices = NULL, |
|
| SO< Iterator< UINT > > | indices = NULL | |||
| ) |
| VRS::TriangleSet::TriangleSet | ( | SO< Iterator< Vector > > | vertices, | |
| SO< Iterator< UINT > > | indices = NULL | |||
| ) |
| void VRS::TriangleSet::clear | ( | ) |
Clear this triangle set of all contained data
| SO<TriangleSet> VRS::TriangleSet::copy | ( | ) | const |
< Create a ghost copy of this triangle set. The returned set will share all data pointers with this set. Changes made to the data of the original set will be reflected in the clone as well. Create a physical copy of this triangle set. All data will be copied, so changes made to the data of the original set will not be reflected in the copy and vice versa.
| SO<DataIterator<VD> > VRS::TriangleSet::vertices | ( | ) | const |
Retrieve an iterator of the positional data of all vertecies
COPY vertex data from source iterator into internal data iterator associated with the position vertex attribute. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setVertices | ( | SO< DataIterator< VD > > | vertIter | ) |
SET vertex pos data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied. Convenience wrapper for setVertexData.
| SO<DataIterator<VD> > VRS::TriangleSet::normals | ( | ) | const |
Retrieve an iterator of the normal vector associated with each vertex
COPY normal data from source iterator into internal data iterator associated with the normal vertex attribute. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setNormals | ( | SO< DataIterator< VD > > | normalIter | ) |
SET vertex normal data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied. Convenience wrapper for setVertexData.
| SO<DataIterator<VD> > VRS::TriangleSet::colors | ( | ) | const |
Retrieve an iterator of the color associated with each vertex
COPY color data from source iterator into internal data iterator associated with the color vertex attribute. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setColors | ( | SO< DataIterator< VD > > | colorIter | ) |
SET vertex color data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied. Convenience wrapper for setVertexData.
| SO<DataIterator<VD> > VRS::TriangleSet::texCoords | ( | const UINT | index | ) | const |
Retrieve an iterator of the texture coordinates of the texture unit specified by the index argument. One set of texture coordinates is associated with each combination of texture unit and vertex
COPY texture coordinate data from source iterator into internal data iterator associated with the texture coordinate vertex attribute identified by the given texture unit index. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setTexCoords | ( | UINT | index, | |
| SO< DataIterator< VD > > | texCoordIter | |||
| ) |
SET vertex texture coordinate data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied. Convenience wrapper for setVertexData.
| SO<DataIterator<UINT> > VRS::TriangleSet::indices | ( | ) | const |
RETRIEVE an iterator of indices into the positional vertex data. If indices are present, each index represents one vertex instance. If no indices are present, each vertex has exactly one instance and all instances are defined by the positional data retrieved via vertices
COPY index data from source iterator into internal data iterator associated with the index register. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setIndices | ( | SO< DataIterator< UINT > > | indexIter | ) |
SET index data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied.
| SO<DataIterator<UINT> > VRS::TriangleSet::objectIDs | ( | ) | const |
RETRIEVE an iterator of optional custom object identifiers that may be associated with each vertex.
COPY ID data from source iterator into internal data iterator associating a custom identifier with each vertex defined by indices or positions, depending on whether or not indices are present. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setObjectIDs | ( | SO< DataIterator< UINT > > | objectIdIter | ) |
SET ID data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied.
| SO<DataIterator<VD> > VRS::TriangleSet::vertexData | ( | const ID & | vertexDataID | ) | const |
RETRIEVE vertex data of any kind identified by the vertexDataID argument. Sub-classes may provide convenience methods to wrap this method.
| void VRS::TriangleSet::copyVertexData | ( | const ID & | vertexDataID, | |
| const Iterator< VD > * | sourceData | |||
| ) |
| void VRS::TriangleSet::copyVertexData | ( | const ID & | vertexDataID, | |
| const Iterator< Vector > * | sourceData | |||
| ) |
| void VRS::TriangleSet::copyVertexData | ( | const ID & | vertexDataID, | |
| const Iterator< Color > * | sourceData | |||
| ) |
COPY vertex data from source iterator into internal data iterator associated with the position vertex attribute. Source data can be dismissed afterwards, data is contained inside the triangle set.
| void VRS::TriangleSet::setVertexData | ( | const ID & | vertexDataID, | |
| SO< DataIterator< VD > > | iter | |||
| ) |
SET vertex data to source iterator. This triangle set takes ownership of the iterator and the contained data. No data is copied.
| void VRS::TriangleSet::lock | ( | UINT | configFlags = VD_ENABLE_VRAM |
) |
LOCK all contained vertex data and indices and handle according to config flags
LOCK specific vertex data and handle according to config flags
| void VRS::TriangleSet::lockIndices | ( | UINT | configFlags = VD_ENABLE_VRAM |
) |
LOCK indices and handle according to config flags
| void VRS::TriangleSet::unlock | ( | ) |
UNLOCK all locked vertex data and indices to make it accessible after LOCK.
| void VRS::TriangleSet::unlock | ( | const ID & | vertexDataID | ) |
UNLOCK specific vertex data to make it accessible after LOCK.
| void VRS::TriangleSet::unlockIndices | ( | ) |
UNLOCK indices to make them accessible after LOCK.
RETRIEVE and iterator of IDs of all contained vertex data
| static UINT VRS::TriangleSet::maxTexCoordSets | ( | ) | [static] |
| virtual void VRS::TriangleSet::setBoundingBox | ( | const Bounds & | newBBox | ) | [virtual] |
| virtual Bounds VRS::TriangleSet::boundingBox | ( | ) | const [virtual] |
| virtual void VRS::TriangleSet::modified | ( | ) | [virtual] |
Reimplemented from VRS::SharedObj.
| void VRS::TriangleSet::reportState | ( | const char * | triSetName = NULL |
) |
DEBUG report state of triangle set, contained indices and vertex data
| VRS::TriangleSet::VRS_TYPEINFO | ( | TriangleSet | , | |
| Shape | ||||
| ) |
friend class TriangleSetSimplifierGL [friend] |
VertexDataDictionary VRS::TriangleSet::m_vertexData [protected] |
SO<VertexDataEntry<UINT> > VRS::TriangleSet::m_indexDataEntry [protected] |
SO<DataIterator<UINT> > VRS::TriangleSet::m_objectIdData [protected] |
UINT VRS::TriangleSet::m_configFlags [protected] |
SO<VertexAttributeDataGL> VRS::TriangleSet::m_bufferObjectData [mutable, protected] |
SO<VertexAttributeIndexGL> VRS::TriangleSet::m_bufferObjectIndex [mutable, protected] |
Bounds VRS::TriangleSet::m_bbox [mutable, protected] |
TransactionNo VRS::TriangleSet::m_bboxValid [mutable, protected] |
TransactionNo VRS::TriangleSet::m_bufferObjectUpdate [mutable, protected] |