version 3.3

VRS::TriangleSet Class Reference

#include <vrs/triangleset.h>

Inheritance diagram for VRS::TriangleSet:

VRS::Shape VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

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< TriangleSetcopy () 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 IDtexCoordIdFromIndex (const UINT index) const

Protected Attributes

VertexDataDictionary m_vertexData
SO< VertexDataEntry< UINT > > m_indexDataEntry
SO< DataIterator< UINT > > m_objectIdData
UINT m_configFlags
SO< VertexAttributeDataGLm_bufferObjectData
SO< VertexAttributeIndexGLm_bufferObjectIndex
Bounds m_bbox
TransactionNo m_bboxValid
TransactionNo m_bufferObjectUpdate

Friends

class TriangleSetSimplifierGL

Classes

class  VertexDataEntry


Member Typedef Documentation

typedef VertexData<4, float> VRS::TriangleSet::VD

Generic vertex attribute data format of 4 floats


Member Enumeration Documentation

Enumerator:
VD_ENABLE_VRAM 
VD_ENABLE_SOURCE_ELIMINATION 
VD_CONFIG_MASK 

Enumerator:
VD_LOCK 
VD_LOCKED 
VD_UPDATE_ALL 
VD_UPDATE_RANGE 
VD_DELETE 
VD_CUSTOM 
VD_UPDATE_MASK 
VD_STATE_MASK 


Constructor & Destructor Documentation

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 
)


Member Function Documentation

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

void VRS::TriangleSet::copyVertices ( const Iterator< VD > *   ) 

void VRS::TriangleSet::copyVertices ( const Iterator< Vector > *   ) 

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

void VRS::TriangleSet::copyNormals ( const Iterator< VD > *   ) 

void VRS::TriangleSet::copyNormals ( const Iterator< Vector > *   ) 

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

void VRS::TriangleSet::copyColors ( const Iterator< VD > *  sourceColors  ) 

void VRS::TriangleSet::copyColors ( const Iterator< Color > *  sourceColors  ) 

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

void VRS::TriangleSet::copyTexCoords ( const UINT  index,
const Iterator< VD > *   
)

void VRS::TriangleSet::copyTexCoords ( const UINT  index,
const Iterator< Vector > *   
)

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

void VRS::TriangleSet::copyIndices ( const Iterator< UINT > *   ) 

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.

void VRS::TriangleSet::copyObjectIDs ( const Iterator< UINT > *   ) 

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

void VRS::TriangleSet::lock ( const ID vertexDataID,
UINT  configFlags = VD_ENABLE_VRAM 
)

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.

SO<Iterator<ID> > VRS::TriangleSet::vertexDataIDs (  )  const

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]

Shapes define their bounding box in model coordinates.

Implements VRS::Shape.

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   
)

const ID& VRS::TriangleSet::texCoordIdFromIndex ( const UINT  index  )  const [protected]


Friends And Related Function Documentation

friend class TriangleSetSimplifierGL [friend]


Member Data Documentation

Bounds VRS::TriangleSet::m_bbox [mutable, protected]


The documentation for this class was generated from the following file:

Generated on Wed May 23 06:00:31 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact