VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtAggregatedGeometry Class Reference

contains the information which indirect needs for all geometry found by the geometry aggregator after it runs. More...

Public Member Functions

virtual ~DtAggregatedGeometry ()
 destructor More...
 
virtual void releaseGLObjects (osg::State *state) const
 used to release resources More...
 
virtual void addGeometryToLoad (const DtCopyModelDataStructure &cds)
 add geometry descriptor to the queue for future async loading. More...
 
virtual bool hasDataToAsyncLoad () const
 checks if there's data to start loading and isn't currently running an async task More...
 
virtual bool hasDataToCopy () const
 checks if there's data to start loading More...
 
virtual boost::mutex & copyDataMutex ()
 access to copy data mutex More...
 
virtual int isCopyingData () const
 access to copy data atomic More...
 
virtual int numModels (void) const
 number of models registered here More...
 
virtual int modelId (int index) const
 the actual model id of the model with index More...
 
virtual DtAggregateModelInfogetOrCreateModelInfoFor (int modelId)
 the actual modelinfo from the modelid More...
 
virtual DtAggregateModelInfogetModelInfoFor (int modelId)
 the actual modelinfo from the modelid More...
 
virtual const
DtIndirectSwitchManager::DequeNodeSwitchInfoPairsArray
getVectorSwitchPaths (int modelId) const
 vector of the 'switch paths' for the model More...
 
virtual const
DtIndirectLodManager::DequeIndirectLodInfoArray
getVectorLodStacks (int modelId) const
 vector of the lod stacks for a model More...
 
virtual const
DtIndirectDofManager::DequeNodeDofInfoPairs
getVectorDofPaths (int modelId) const
 
virtual int vertexAndAttributesBufferSize (void) const
 size of all vertex attributes (vertices, normals, colors, texture coords) More...
 
virtual const osg::Geometry * aggregatedGeometry (void) const
 accessor for the underlying osg::Geometry that holds all the vertex information. More...
 
virtual osg::Geometry * aggregatedGeometry (void)
 accessor for the underlying osg::Geometry that holds all the vertex information. More...
 
virtual void testDrawUsingDrawElements ()
 debugging More...
 
virtual unsigned int vertexAndAttributesBufferHandle () const
 handle for accessing the vertex and attributes buffer. More...
 
virtual unsigned int colorBufferHandle () const
 handle for accessing the vertex color buffer. More...
 
virtual unsigned int normalBufferHandle () const
 handle for accessing the vertex normal buffer. More...
 
virtual unsigned int uvBufferHandle () const
 handle for accessing the vertex uv buffer. More...
 
virtual unsigned int indexBufferHandle () const
 handle for accessing the vertex index buffer. More...
 
virtual GLenum indicesType (void) const
 the indices' type (unsigned short or unsigned int, usually unsigned int) More...
 
virtual void copyDataQueue ()
 run through the data that needs to be copied and copy until canceled More...
 
virtual void printVertexBuffer (std::ostream &os)
 print the osg side vertex buffer More...
 
virtual void printIndexBuffer (std::ostream &os)
 print the osg side index buffer More...
 
virtual void printStats (std::ostream &os)
 print brief summary More...
 
virtual bool updateBuffers ()
 returns true if buffers were successfully filled out More...
 
virtual void bindBuffers ()
 sets up vbo so it's ready to draw More...
 
virtual void unbindBuffers ()
 resets vertex buffer state More...
 

Public Attributes

friend DtAggregatedGeometryCreator
 only creator can create More...
 

Protected Types

typedef std::map< int,
DtAggregateModelInfo * > 
MapModelsToModelInfo
 

Protected Member Functions

 DtAggregatedGeometry (DtDe &de)
 constructor. protected. only creator can create More...
 
virtual void configureBuffers ()
 called from the constructor, just a helper function for the 2 different creation paths. More...
 
virtual void reserveMaxMemory ()
 reserve as much memory as the last values in the copy data list More...
 
virtual void copyData (DtCopyModelDataStructure &data)
 copy data described in structure into the aggregate geometry, usually called by async thread. More...
 
virtual unsigned int vertexBufferSizeInBytes () const
 Accessors for the Vertex Buffer/Size total size in bytes = (num of vertices * num elements * sizeof(float)) More...
 
virtual unsigned int vertexBufferNumElements () const
 num of elements in each vertex (3 if (x,y,z), 4 if (x,y,z,w), etc More...
 
virtual unsigned int numVertices (void) const
 num of vertices More...
 
virtual const void * verticesPointer () const
 the vertex pointer More...
 
virtual unsigned int normalBufferSizeInBytes () const
 Accessors for the Normals' Buffer/Size. More...
 
virtual unsigned int normalBufferNumElements () const
 
virtual const void * normalsPointer () const
 
virtual unsigned int numNormals (void) const
 
virtual unsigned int colorBufferSizeInBytes () const
 Accessors for the Colors' Buffer/Size. More...
 
virtual unsigned int colorBufferNumElements () const
 
virtual const void * colorsPointer () const
 
virtual unsigned int numColors (void) const
 
virtual unsigned int textureCoordsBufferSizeInBytes (unsigned int unit) const
 Accessors for the Texture Coordinates' Buffer/Size. More...
 
virtual unsigned int textureCoordsBufferNumElements (unsigned int unit) const
 
virtual const void * textureCoordsPointer (unsigned int unit) const
 
virtual unsigned int numTextureCoords (unsigned int unit) const
 
virtual unsigned int textureBufferSizeInBytes () const
 size of the texture buffer in bytes More...
 
virtual void copyTextureData (DtGlBuffer *vertexAndAttributesBuffer, int &offset) const
 
virtual const void * indexBufferPointer () const
 Accessors for the Index Buffer/Size. More...
 
virtual unsigned int indexBufferSizeInBytes () const
 

Protected Attributes

DtGlBuffermyVertexAndAttributesBuffer
 
DtGlBuffermyColorBuffer
 
DtGlBuffermyNormalBuffer
 
DtGlBuffermyUVBuffer
 
DtGlBuffermyIndexBuffer
 
std::vector< intmyEnabledVertexAttribArrays
 
MapModelsToModelInfo myMapModelsToModelInfo
 
std::vector< intmyScratchIndices
 
DtIndirectAggregateHelper myAggregateHelper
 
osg::ref_ptr< osg::Geometry > myAggregatedGeometry
 
tbb::concurrent_queue
< DtCopyModelDataStructure
myModelDataToCopy
 
int myLastVertex
 
int myLastIndex
 
tbb::atomic< intmyIsCopyingData
 
boost::mutex myCopyDataMutex
 
boost::mutex myMutableMapModelsToModelInfoMutex
 mutex needs to be used in const functions so must be mutable. More...
 
DtDemyDe
 reference to De More...
 
tbb::atomic< intmyCancelTask
 

Private Member Functions

 DtAggregatedGeometry ()=delete
 not allowed More...
 
 DtAggregatedGeometry (const DtAggregatedGeometry &other)=delete
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtAggregatedGeometryoperator= (const DtAggregatedGeometry &other)=delete
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Detailed Description

contains the information which indirect needs for all geometry found by the geometry aggregator after it runs.

It is owned by the Indirect geometry registrar.

Member Typedef Documentation

Constructor & Destructor Documentation

virtual makVrv::DtAggregatedGeometry::~DtAggregatedGeometry ( )
virtual

destructor

makVrv::DtAggregatedGeometry::DtAggregatedGeometry ( DtDe de)
protected

constructor. protected. only creator can create

makVrv::DtAggregatedGeometry::DtAggregatedGeometry ( )
privatedelete

not allowed

makVrv::DtAggregatedGeometry::DtAggregatedGeometry ( const DtAggregatedGeometry other)
privatedelete

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtAggregatedGeometry& makVrv::DtAggregatedGeometry::operator= ( const DtAggregatedGeometry other)
privatedelete

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtAggregatedGeometry::releaseGLObjects ( osg::State *  state) const
virtual

used to release resources

virtual void makVrv::DtAggregatedGeometry::addGeometryToLoad ( const DtCopyModelDataStructure cds)
virtual

add geometry descriptor to the queue for future async loading.

virtual bool makVrv::DtAggregatedGeometry::hasDataToAsyncLoad ( ) const
virtual

checks if there's data to start loading and isn't currently running an async task

virtual bool makVrv::DtAggregatedGeometry::hasDataToCopy ( ) const
virtual

checks if there's data to start loading

virtual boost::mutex& makVrv::DtAggregatedGeometry::copyDataMutex ( )
virtual

access to copy data mutex

virtual int makVrv::DtAggregatedGeometry::isCopyingData ( ) const
virtual

access to copy data atomic

virtual int makVrv::DtAggregatedGeometry::numModels ( void  ) const
virtual

number of models registered here

virtual int makVrv::DtAggregatedGeometry::modelId ( int  index) const
virtual

the actual model id of the model with index

virtual DtAggregateModelInfo* makVrv::DtAggregatedGeometry::getOrCreateModelInfoFor ( int  modelId)
virtual

the actual modelinfo from the modelid

virtual DtAggregateModelInfo* makVrv::DtAggregatedGeometry::getModelInfoFor ( int  modelId)
virtual

the actual modelinfo from the modelid

virtual const DtIndirectSwitchManager::DequeNodeSwitchInfoPairsArray& makVrv::DtAggregatedGeometry::getVectorSwitchPaths ( int  modelId) const
virtual

vector of the 'switch paths' for the model

virtual const DtIndirectLodManager::DequeIndirectLodInfoArray& makVrv::DtAggregatedGeometry::getVectorLodStacks ( int  modelId) const
virtual

vector of the lod stacks for a model

virtual const DtIndirectDofManager::DequeNodeDofInfoPairs& makVrv::DtAggregatedGeometry::getVectorDofPaths ( int  modelId) const
virtual
virtual int makVrv::DtAggregatedGeometry::vertexAndAttributesBufferSize ( void  ) const
virtual

size of all vertex attributes (vertices, normals, colors, texture coords)

virtual const osg::Geometry* makVrv::DtAggregatedGeometry::aggregatedGeometry ( void  ) const
virtual

accessor for the underlying osg::Geometry that holds all the vertex information.

virtual osg::Geometry* makVrv::DtAggregatedGeometry::aggregatedGeometry ( void  )
virtual

accessor for the underlying osg::Geometry that holds all the vertex information.

non-const version

virtual void makVrv::DtAggregatedGeometry::testDrawUsingDrawElements ( )
virtual

debugging

virtual unsigned int makVrv::DtAggregatedGeometry::vertexAndAttributesBufferHandle ( ) const
virtual

handle for accessing the vertex and attributes buffer.

Used by the cull compute shader to access the light source info.

virtual unsigned int makVrv::DtAggregatedGeometry::colorBufferHandle ( ) const
virtual

handle for accessing the vertex color buffer.

Used by the cull compute shader to access the light source info.

virtual unsigned int makVrv::DtAggregatedGeometry::normalBufferHandle ( ) const
virtual

handle for accessing the vertex normal buffer.

Used by the cull compute shader to access the light source info.

virtual unsigned int makVrv::DtAggregatedGeometry::uvBufferHandle ( ) const
virtual

handle for accessing the vertex uv buffer.

virtual unsigned int makVrv::DtAggregatedGeometry::indexBufferHandle ( ) const
virtual

handle for accessing the vertex index buffer.

virtual GLenum makVrv::DtAggregatedGeometry::indicesType ( void  ) const
virtual

the indices' type (unsigned short or unsigned int, usually unsigned int)

virtual void makVrv::DtAggregatedGeometry::copyDataQueue ( )
virtual

run through the data that needs to be copied and copy until canceled

virtual void makVrv::DtAggregatedGeometry::printVertexBuffer ( std::ostream &  os)
virtual

print the osg side vertex buffer

virtual void makVrv::DtAggregatedGeometry::printIndexBuffer ( std::ostream &  os)
virtual

print the osg side index buffer

virtual void makVrv::DtAggregatedGeometry::printStats ( std::ostream &  os)
virtual

print brief summary

virtual bool makVrv::DtAggregatedGeometry::updateBuffers ( )
virtual

returns true if buffers were successfully filled out

virtual void makVrv::DtAggregatedGeometry::bindBuffers ( )
virtual

sets up vbo so it's ready to draw

virtual void makVrv::DtAggregatedGeometry::unbindBuffers ( )
virtual

resets vertex buffer state

virtual void makVrv::DtAggregatedGeometry::configureBuffers ( )
protectedvirtual

called from the constructor, just a helper function for the 2 different creation paths.

virtual void makVrv::DtAggregatedGeometry::reserveMaxMemory ( )
protectedvirtual

reserve as much memory as the last values in the copy data list

virtual void makVrv::DtAggregatedGeometry::copyData ( DtCopyModelDataStructure data)
protectedvirtual

copy data described in structure into the aggregate geometry, usually called by async thread.

virtual unsigned int makVrv::DtAggregatedGeometry::vertexBufferSizeInBytes ( ) const
protectedvirtual

Accessors for the Vertex Buffer/Size total size in bytes = (num of vertices * num elements * sizeof(float))

virtual unsigned int makVrv::DtAggregatedGeometry::vertexBufferNumElements ( ) const
protectedvirtual

num of elements in each vertex (3 if (x,y,z), 4 if (x,y,z,w), etc

virtual unsigned int makVrv::DtAggregatedGeometry::numVertices ( void  ) const
protectedvirtual

num of vertices

virtual const void* makVrv::DtAggregatedGeometry::verticesPointer ( ) const
protectedvirtual

the vertex pointer

virtual unsigned int makVrv::DtAggregatedGeometry::normalBufferSizeInBytes ( ) const
protectedvirtual

Accessors for the Normals' Buffer/Size.

virtual unsigned int makVrv::DtAggregatedGeometry::normalBufferNumElements ( ) const
protectedvirtual
virtual const void* makVrv::DtAggregatedGeometry::normalsPointer ( ) const
protectedvirtual
virtual unsigned int makVrv::DtAggregatedGeometry::numNormals ( void  ) const
protectedvirtual
virtual unsigned int makVrv::DtAggregatedGeometry::colorBufferSizeInBytes ( ) const
protectedvirtual

Accessors for the Colors' Buffer/Size.

virtual unsigned int makVrv::DtAggregatedGeometry::colorBufferNumElements ( ) const
protectedvirtual
virtual const void* makVrv::DtAggregatedGeometry::colorsPointer ( ) const
protectedvirtual
virtual unsigned int makVrv::DtAggregatedGeometry::numColors ( void  ) const
protectedvirtual
virtual unsigned int makVrv::DtAggregatedGeometry::textureCoordsBufferSizeInBytes ( unsigned int  unit) const
protectedvirtual

Accessors for the Texture Coordinates' Buffer/Size.

virtual unsigned int makVrv::DtAggregatedGeometry::textureCoordsBufferNumElements ( unsigned int  unit) const
protectedvirtual
virtual const void* makVrv::DtAggregatedGeometry::textureCoordsPointer ( unsigned int  unit) const
protectedvirtual
virtual unsigned int makVrv::DtAggregatedGeometry::numTextureCoords ( unsigned int  unit) const
protectedvirtual
virtual unsigned int makVrv::DtAggregatedGeometry::textureBufferSizeInBytes ( ) const
protectedvirtual

size of the texture buffer in bytes

virtual void makVrv::DtAggregatedGeometry::copyTextureData ( DtGlBuffer vertexAndAttributesBuffer,
int offset 
) const
protectedvirtual
virtual const void* makVrv::DtAggregatedGeometry::indexBufferPointer ( ) const
protectedvirtual

Accessors for the Index Buffer/Size.

virtual unsigned int makVrv::DtAggregatedGeometry::indexBufferSizeInBytes ( ) const
protectedvirtual

Member Data Documentation

friend makVrv::DtAggregatedGeometry::DtAggregatedGeometryCreator

only creator can create

DtGlBuffer* makVrv::DtAggregatedGeometry::myVertexAndAttributesBuffer
protected
DtGlBuffer* makVrv::DtAggregatedGeometry::myColorBuffer
protected
DtGlBuffer* makVrv::DtAggregatedGeometry::myNormalBuffer
protected
DtGlBuffer* makVrv::DtAggregatedGeometry::myUVBuffer
protected
DtGlBuffer* makVrv::DtAggregatedGeometry::myIndexBuffer
protected
std::vector<int> makVrv::DtAggregatedGeometry::myEnabledVertexAttribArrays
protected
MapModelsToModelInfo makVrv::DtAggregatedGeometry::myMapModelsToModelInfo
protected
std::vector<int> makVrv::DtAggregatedGeometry::myScratchIndices
protected
DtIndirectAggregateHelper makVrv::DtAggregatedGeometry::myAggregateHelper
protected
osg::ref_ptr<osg::Geometry> makVrv::DtAggregatedGeometry::myAggregatedGeometry
protected
tbb::concurrent_queue<DtCopyModelDataStructure> makVrv::DtAggregatedGeometry::myModelDataToCopy
protected
int makVrv::DtAggregatedGeometry::myLastVertex
protected
int makVrv::DtAggregatedGeometry::myLastIndex
protected
tbb::atomic<int> makVrv::DtAggregatedGeometry::myIsCopyingData
protected
boost::mutex makVrv::DtAggregatedGeometry::myCopyDataMutex
protected
boost::mutex makVrv::DtAggregatedGeometry::myMutableMapModelsToModelInfoMutex
mutableprotected

mutex needs to be used in const functions so must be mutable.

DtDe& makVrv::DtAggregatedGeometry::myDe
protected

reference to De

tbb::atomic<int> makVrv::DtAggregatedGeometry::myCancelTask
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)