VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtIndirectIndicesHelper Class Reference

utility class to copy src geometry into interleaved vertex format used by bindless

Public Member Functions

 DtIndirectIndicesHelper (DtDe &de)
 
virtual ~DtIndirectIndicesHelper ()
 
 DtIndirectIndicesHelper (const DtIndirectIndicesHelper &)=delete
 
DtIndirectIndicesHelperoperator= (const DtIndirectIndicesHelper &)=delete
 
virtual void copyIndices (std::vector< int > &indices, const osg::Geometry &srcGeometry) const
 
virtual int calculateNumIndices (const osg::Geometry &srcGeometry) const
 
virtual void setModelName (const std::string &modelname)
 
virtual bool isModeSupported (int mode) const
 
virtual std::string toModeString (int mode) const
 
virtual void setCopyRange (int primitiveSetIndex, int startIndex, int endIndex, int startVertex)
 

Protected Member Functions

virtual bool checkSrcIndicesOk (const osg::Geometry &srcGeometry) const
 
virtual bool checkAndCopyIndicesIfTriangleElements (std::vector< int > &indices, const osg::PrimitiveSet *primitiveSet) const
 
virtual bool checkAndCopyIndicesIfDrawArrays (std::vector< int > &indices, const osg::PrimitiveSet *primitiveSet) const
 
virtual void printDetailsPrimitiveSets (const osg::Geometry &geometry) const
 
virtual int calculateNumIndices (const osg::PrimitiveSet *primitiveSet) const
 

Protected Attributes

std::string myModelFileName
 
DtDemyDe
 
int myPrimitiveSetIndex = -1
 
int myStartIndex = -1
 
int myEndIndex = -1
 
int myStartVertex = -1
 

Constructor & Destructor Documentation

makVrv::DtIndirectIndicesHelper::DtIndirectIndicesHelper ( DtDe de)

constructor

virtual makVrv::DtIndirectIndicesHelper::~DtIndirectIndicesHelper ( )
virtual

destructor

makVrv::DtIndirectIndicesHelper::DtIndirectIndicesHelper ( const DtIndirectIndicesHelper )
delete

not allowed

Member Function Documentation

DtIndirectIndicesHelper& makVrv::DtIndirectIndicesHelper::operator= ( const DtIndirectIndicesHelper )
delete

not allowed

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

copy the indices from geometry into the aggregated geometry

virtual int makVrv::DtIndirectIndicesHelper::calculateNumIndices ( const osg::Geometry &  srcGeometry) const
virtual

number of indices across all primitive sets

virtual void makVrv::DtIndirectIndicesHelper::setModelName ( const std::string &  modelname)
virtual

used for error messages

virtual bool makVrv::DtIndirectIndicesHelper::isModeSupported ( int  mode) const
virtual

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

virtual std::string makVrv::DtIndirectIndicesHelper::toModeString ( int  mode) const
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

virtual void makVrv::DtIndirectIndicesHelper::setCopyRange ( int  primitiveSetIndex,
int  startIndex,
int  endIndex,
int  startVertex 
)
virtual

Specifiec the target primitive set and range to use for subsequent copy operations. This allows for a subset of the index data to be used rather than the full buffer. To reset to copying of the full buffer -1 can be used.

virtual bool makVrv::DtIndirectIndicesHelper::checkSrcIndicesOk ( const osg::Geometry &  srcGeometry) const
protectedvirtual

check if the src indices check out

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

Helper function for copying indices from a triangle element.

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

Helper function for copying indices from a draw arrays.

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

helper function for printing out the details of a primitive set

virtual int makVrv::DtIndirectIndicesHelper::calculateNumIndices ( const osg::PrimitiveSet *  primitiveSet) const
protectedvirtual

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

Member Data Documentation

std::string makVrv::DtIndirectIndicesHelper::myModelFileName
protected
DtDe& makVrv::DtIndirectIndicesHelper::myDe
protected
int makVrv::DtIndirectIndicesHelper::myPrimitiveSetIndex = -1
protected

The primitive set.

int makVrv::DtIndirectIndicesHelper::myStartIndex = -1
protected

The starting index.

int makVrv::DtIndirectIndicesHelper::myEndIndex = -1
protected

The ending index.

int makVrv::DtIndirectIndicesHelper::myStartVertex = -1
protected

The starting vertex index. Used for remapping the indicies to a new offset.


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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)