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

Indirect rendering works because we are able to combine multiple geometries into a single 'aggregated geometry' and render this with a single draw call This visitor allows us to incrementally aggregate multiple such osg nodes (e.g flight files) More...

Inheritance diagram for makVrv::DtIndirectGeometryAggregator:
Inheritance graph
[legend]

Classes

struct  AggregatorData
 current state of the model traversal More...
 

Public Member Functions

 DtIndirectGeometryAggregator (DtAggregatedGeometry &aggregatedGeometry, DtIndirectEffectTexturesTemplate &aggregatedEffectTexturesState, DtIndirectGeometryStateManager &stateManager, const DtIndirectTextureCollectionPolicy &textureCollectionPolicy)
 Constructor 'aggregatedGeometry', represents the flattened vertex, index buffer of all geometries/drawables encountered so far. More...
 
virtual ~DtIndirectGeometryAggregator ()
 Destructor. More...
 
virtual void aggregate (osg::Node *node, int modelId, const std::string &modelFileName, bool cullFaceEnabled, const DtIndirectPolygonOffset &polygonOffset)
 run the aggregator visitor on the node, it represents the model specified by modelId and loaded from modelFileName More...
 
virtual void apply (osg::Geometry &geometry)
 used to get the bounding box information for a particular geometry More...
 
virtual void apply (DtDynamicTerrainSwitchNode &node)
 Gather the switch node information. More...
 
virtual void apply (osg::Geode &geode)
 Gather the geodes so they can be added to the indirect registrar. More...
 
virtual void apply (osg::Node &node)
 used to call apply on the osgSim::MultiSwitch and DtDynamicTerrainSwitchNodes More...
 
virtual void apply (osg::Switch &node)
 Gather the switch node information. More...
 
virtual void apply (osgSim::MultiSwitch &node)
 Gather the switch node information. More...
 
virtual void apply (osg::LOD &node)
 Gather the Lod information. More...
 
virtual void apply (osg::Sequence &node)
 Gather the sequence information. More...
 
virtual void apply (osg::Billboard &node)
 used to ignore billboards for nwo More...
 
virtual void apply (osg::MatrixTransform &matTrans)
 used to gather the matrix transforms so we get the geometry and lods in the correct position. More...
 
virtual void apply (osgSim::DOFTransform &node)
 used to ignore DOFTransforms for now More...
 
virtual int numGeodes () const
 number of geodes visited/encountered More...
 
virtual int numGeometries () const
 number of geometries successfully visited/encountered (if something went wrong with aggregating a geometry, this count will reflect that) More...
 
virtual int maxSingleModelIndices ()
 maximum number of indices any single model that's been agregated has, if greater then 65k needs int storage. More...
 

Static Public Member Functions

static void loadTheDefaultTexture (const std::string &filename)
 create a default texture for indirect to use when there is not a diffuse texture on a stateset More...
 

Public Attributes

DtIndirectAggregateHelper myAggregateHelper
 

Static Public Attributes

static const DtMaterial theDefaultMaterial
 
static osg::ref_ptr< osg::Texture > theDefaultTexture
 

Protected Member Functions

virtual DtMaterial gatherMaterial (osg::StateSet *ss) const
 find the material specified by this stateset if it exists More...
 
virtual bool isCullFaceEnabled (osg::StateSet *ss) const
 check the stateset to see if it has cull face enabled More...
 
virtual DtIndirectPolygonOffset gatherPolygonOffset (osg::StateSet *ss) const
 check the stateset for any polygon offset state attributes More...
 
virtual
DtIndirectGeometryTextures
gatherTextures (osg::StateSet *ss, const std::string &modelFileName)
 find the textures on the stateset if they are specified More...
 

Protected Attributes

int myNumGeodes
 
int myNumGeometries
 
DtAggregateModelInfomyModelInfo
 
int myLastVertexOffset
 
int myLastIndexOffset
 
int myMaxSingleModelIndices
 
DtIndirectEffectTexturesTemplatemyAggregatedEffectTexturesState
 
DtIndirectGeometryStateManagermyStateManager
 
DtAggregatedGeometrymyAggregatedGeometry
 
std::stack< AggregatorDatamyDataStack
 stack of Aggregator as traversal happens. More...
 
std::stack< osg::Matrix > myMatrixStack
 
DtIndirectLodManager::DequeIndirectLodInfos myLodStack
 
DtIndirectSwitchManager::DequeNodeSwitchInfoPairs mySwitchStack
 
const
DtIndirectTextureCollectionPolicy
myTextureCollectionPolicy
 
std::string myModelFileName
 

Private Member Functions

 DtIndirectGeometryAggregator ()
 
 DtIndirectGeometryAggregator (const DtIndirectGeometryAggregator &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtIndirectGeometryAggregatoroperator= (const DtIndirectGeometryAggregator &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Friends

class StackOperator
 

Detailed Description

Indirect rendering works because we are able to combine multiple geometries into a single 'aggregated geometry' and render this with a single draw call This visitor allows us to incrementally aggregate multiple such osg nodes (e.g flight files)

Constructor & Destructor Documentation

makVrv::DtIndirectGeometryAggregator::DtIndirectGeometryAggregator ( DtAggregatedGeometry aggregatedGeometry,
DtIndirectEffectTexturesTemplate aggregatedEffectTexturesState,
DtIndirectGeometryStateManager stateManager,
const DtIndirectTextureCollectionPolicy textureCollectionPolicy 
)

Constructor 'aggregatedGeometry', represents the flattened vertex, index buffer of all geometries/drawables encountered so far.

virtual makVrv::DtIndirectGeometryAggregator::~DtIndirectGeometryAggregator ( )
virtual

Destructor.

makVrv::DtIndirectGeometryAggregator::DtIndirectGeometryAggregator ( )
private
makVrv::DtIndirectGeometryAggregator::DtIndirectGeometryAggregator ( const DtIndirectGeometryAggregator other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtIndirectGeometryAggregator& makVrv::DtIndirectGeometryAggregator::operator= ( const DtIndirectGeometryAggregator other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtIndirectGeometryAggregator::aggregate ( osg::Node *  node,
int  modelId,
const std::string &  modelFileName,
bool  cullFaceEnabled,
const DtIndirectPolygonOffset polygonOffset 
)
virtual

run the aggregator visitor on the node, it represents the model specified by modelId and loaded from modelFileName

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::Geometry &  geometry)
virtual

used to get the bounding box information for a particular geometry

virtual void makVrv::DtIndirectGeometryAggregator::apply ( DtDynamicTerrainSwitchNode node)
virtual

Gather the switch node information.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::Geode &  geode)
virtual

Gather the geodes so they can be added to the indirect registrar.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::Node &  node)
virtual

used to call apply on the osgSim::MultiSwitch and DtDynamicTerrainSwitchNodes

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::Switch &  node)
virtual

Gather the switch node information.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osgSim::MultiSwitch &  node)
virtual

Gather the switch node information.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::LOD &  node)
virtual

Gather the Lod information.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::Sequence &  node)
virtual

Gather the sequence information.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::Billboard &  node)
virtual

used to ignore billboards for nwo

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::MatrixTransform &  matTrans)
virtual

used to gather the matrix transforms so we get the geometry and lods in the correct position.

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osgSim::DOFTransform &  node)
virtual

used to ignore DOFTransforms for now

virtual int makVrv::DtIndirectGeometryAggregator::numGeodes ( ) const
virtual

number of geodes visited/encountered

virtual int makVrv::DtIndirectGeometryAggregator::numGeometries ( ) const
virtual

number of geometries successfully visited/encountered (if something went wrong with aggregating a geometry, this count will reflect that)

virtual int makVrv::DtIndirectGeometryAggregator::maxSingleModelIndices ( )
virtual

maximum number of indices any single model that's been agregated has, if greater then 65k needs int storage.

static void makVrv::DtIndirectGeometryAggregator::loadTheDefaultTexture ( const std::string &  filename)
static

create a default texture for indirect to use when there is not a diffuse texture on a stateset

virtual DtMaterial makVrv::DtIndirectGeometryAggregator::gatherMaterial ( osg::StateSet *  ss) const
protectedvirtual

find the material specified by this stateset if it exists

virtual bool makVrv::DtIndirectGeometryAggregator::isCullFaceEnabled ( osg::StateSet *  ss) const
protectedvirtual

check the stateset to see if it has cull face enabled

virtual DtIndirectPolygonOffset makVrv::DtIndirectGeometryAggregator::gatherPolygonOffset ( osg::StateSet *  ss) const
protectedvirtual

check the stateset for any polygon offset state attributes

virtual DtIndirectGeometryTextures* makVrv::DtIndirectGeometryAggregator::gatherTextures ( osg::StateSet *  ss,
const std::string &  modelFileName 
)
protectedvirtual

find the textures on the stateset if they are specified

Friends And Related Function Documentation

friend class StackOperator
friend

Member Data Documentation

int makVrv::DtIndirectGeometryAggregator::myNumGeodes
protected
int makVrv::DtIndirectGeometryAggregator::myNumGeometries
protected
DtAggregateModelInfo* makVrv::DtIndirectGeometryAggregator::myModelInfo
protected
int makVrv::DtIndirectGeometryAggregator::myLastVertexOffset
protected
int makVrv::DtIndirectGeometryAggregator::myLastIndexOffset
protected
int makVrv::DtIndirectGeometryAggregator::myMaxSingleModelIndices
protected
DtIndirectEffectTexturesTemplate& makVrv::DtIndirectGeometryAggregator::myAggregatedEffectTexturesState
protected
DtIndirectGeometryStateManager& makVrv::DtIndirectGeometryAggregator::myStateManager
protected
DtAggregatedGeometry& makVrv::DtIndirectGeometryAggregator::myAggregatedGeometry
protected
std::stack<AggregatorData> makVrv::DtIndirectGeometryAggregator::myDataStack
protected

stack of Aggregator as traversal happens.

std::stack<osg::Matrix> makVrv::DtIndirectGeometryAggregator::myMatrixStack
protected
DtIndirectLodManager::DequeIndirectLodInfos makVrv::DtIndirectGeometryAggregator::myLodStack
protected
DtIndirectSwitchManager::DequeNodeSwitchInfoPairs makVrv::DtIndirectGeometryAggregator::mySwitchStack
protected
const DtIndirectTextureCollectionPolicy& makVrv::DtIndirectGeometryAggregator::myTextureCollectionPolicy
protected
std::string makVrv::DtIndirectGeometryAggregator::myModelFileName
protected
const DtMaterial makVrv::DtIndirectGeometryAggregator::theDefaultMaterial
static
osg::ref_ptr<osg::Texture> makVrv::DtIndirectGeometryAggregator::theDefaultTexture
static
DtIndirectAggregateHelper makVrv::DtIndirectGeometryAggregator::myAggregateHelper

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)