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 | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtIndirectAggregateIndicesHelper Class Reference

helper class for DtIndirectAggregateHelper which checks and copies indices from a geometry More...

Public Member Functions

 DtIndirectAggregateIndicesHelper (const std::string &modelName, const osg::ref_ptr< osg::Geometry > &aggregatedGeometry)
 ctor More...
 
virtual ~DtIndirectAggregateIndicesHelper ()
 dtor More...
 
virtual bool checkSrcAndDstIndicesOk (const osg::Geometry &geometry)
 check if the dst (of aggregated geometry held here) indices check out More...
 
virtual void copyIndices (std::vector< int > &indices, const osg::Geometry &geometry)
 copy the indices from geometry into the aggregated geometry More...
 
virtual void cancel ()
 called when the DtAggregatedGeometry is being destroyed so we can early out of the copy process More...
 
virtual bool isModeSupported (GLenum mode)
 helper function for checking if a mode is supported by this helper/indirect More...
 
virtual std::string toModeString (GLenum mode)
 helper function for converting from a GLenum to a string that contains the GLenum. More...
 

Static Public Member Functions

static int calculateNumIndices (const osg::PrimitiveSet *primitiveSet)
 helper function, calculates the number of indices based on primitive type and vert count More...
 

Protected Member Functions

virtual bool checkAndCopyIndicesIfTriangleElements (std::vector< int > &indices, const osg::PrimitiveSet *primitiveSet)
 Helper function for copying indices from a triangle element. More...
 
virtual bool checkAndCopyIndicesIfDrawArrays (std::vector< int > &indices, const osg::PrimitiveSet *primitiveSet)
 Helper function for copying indices from a draw arrays. More...
 
virtual void printDetailsPrimitiveSets (const osg::Geometry &geometry)
 helper function for printing out the details of a primitive set More...
 
template<class T >
bool copyIndicesOnMatch (std::vector< int > &indices, const osg::PrimitiveSet *primitiveSet)
 templated function used to copy indices that are a DrawElements vector. More...
 

Protected Attributes

const std::string myModelFileName
 
osg::ref_ptr< osg::Geometry > myAggregatedGeometry
 
tbb::atomic< intmyCancelTask
 

Private Member Functions

 DtIndirectAggregateIndicesHelper ()=delete
 not allowed More...
 
 DtIndirectAggregateIndicesHelper (const DtIndirectAggregateIndicesHelper &)=delete
 not allowed More...
 
DtIndirectAggregateIndicesHelperoperator= (const DtIndirectAggregateIndicesHelper &)=delete
 not allowed More...
 

Detailed Description

helper class for DtIndirectAggregateHelper which checks and copies indices from a geometry

Constructor & Destructor Documentation

makVrv::DtIndirectAggregateIndicesHelper::DtIndirectAggregateIndicesHelper ( const std::string &  modelName,
const osg::ref_ptr< osg::Geometry > &  aggregatedGeometry 
)

ctor

virtual makVrv::DtIndirectAggregateIndicesHelper::~DtIndirectAggregateIndicesHelper ( )
virtual

dtor

makVrv::DtIndirectAggregateIndicesHelper::DtIndirectAggregateIndicesHelper ( )
privatedelete

not allowed

makVrv::DtIndirectAggregateIndicesHelper::DtIndirectAggregateIndicesHelper ( const DtIndirectAggregateIndicesHelper )
privatedelete

not allowed

Member Function Documentation

DtIndirectAggregateIndicesHelper& makVrv::DtIndirectAggregateIndicesHelper::operator= ( const DtIndirectAggregateIndicesHelper )
privatedelete

not allowed

virtual bool makVrv::DtIndirectAggregateIndicesHelper::checkSrcAndDstIndicesOk ( const osg::Geometry &  geometry)
virtual

check if the dst (of aggregated geometry held here) indices check out

virtual void makVrv::DtIndirectAggregateIndicesHelper::copyIndices ( std::vector< int > &  indices,
const osg::Geometry &  geometry 
)
virtual

copy the indices from geometry into the aggregated geometry

virtual void makVrv::DtIndirectAggregateIndicesHelper::cancel ( )
virtual

called when the DtAggregatedGeometry is being destroyed so we can early out of the copy process

virtual bool makVrv::DtIndirectAggregateIndicesHelper::isModeSupported ( GLenum  mode)
virtual

helper function for checking if a mode is supported by this helper/indirect

Referenced by copyIndicesOnMatch().

virtual std::string makVrv::DtIndirectAggregateIndicesHelper::toModeString ( GLenum  mode)
virtual

helper function for converting from a GLenum to a string that contains the GLenum.

for example GL_POINTS returns "GL_POINTS" useful for debug printouts

Referenced by copyIndicesOnMatch().

static int makVrv::DtIndirectAggregateIndicesHelper::calculateNumIndices ( const osg::PrimitiveSet *  primitiveSet)
static

helper function, calculates the number of indices based on primitive type and vert count

virtual bool makVrv::DtIndirectAggregateIndicesHelper::checkAndCopyIndicesIfTriangleElements ( std::vector< int > &  indices,
const osg::PrimitiveSet *  primitiveSet 
)
protectedvirtual

Helper function for copying indices from a triangle element.

virtual bool makVrv::DtIndirectAggregateIndicesHelper::checkAndCopyIndicesIfDrawArrays ( std::vector< int > &  indices,
const osg::PrimitiveSet *  primitiveSet 
)
protectedvirtual

Helper function for copying indices from a draw arrays.

virtual void makVrv::DtIndirectAggregateIndicesHelper::printDetailsPrimitiveSets ( const osg::Geometry &  geometry)
protectedvirtual

helper function for printing out the details of a primitive set

template<class T >
bool makVrv::DtIndirectAggregateIndicesHelper::copyIndicesOnMatch ( std::vector< int > &  indices,
const osg::PrimitiveSet *  primitiveSet 
)
protected

templated function used to copy indices that are a DrawElements vector.

this avoids three instances of the same exact function with only different function argument types

References ASSERT_PREDICATE, isModeSupported(), and toModeString().

Member Data Documentation

const std::string makVrv::DtIndirectAggregateIndicesHelper::myModelFileName
protected
osg::ref_ptr<osg::Geometry> makVrv::DtIndirectAggregateIndicesHelper::myAggregatedGeometry
protected
tbb::atomic<int> makVrv::DtIndirectAggregateIndicesHelper::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)