VR-Forces 4.10 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 | Protected Member Functions | Protected Attributes | Static 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

virtual ~DtIndirectGeometryAggregator ()
 Destructor. More...
 
virtual void aggregate (osg::Node *node, int modelId, const std::string &modelFileName, bool cullFaceEnabled, const DtIndirectPolygonOffset &polygonOffset, bool daylightControlled)
 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 (DtLightPointNode &node)
 used to gather DtLightPointNodes More...
 
virtual void augmentModelInfo (osg::Geometry *geometry, const AxisAlignedBoundingBox_32 &bbox32, const int state, const DtIndirectGeometryTexturesRefPtr &texturesForThisGeometry, Material &materialForThisGeometry, const bool isLight)
 internal function to augment the model info with the passed in geometry 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 gather DOFTransforms More...
 
virtual void apply (osg::LightSource &node) override
 used to gather light sources 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...
 

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

friend DtIndirectGeometryAggregatorCreator
 

Protected Member Functions

 DtIndirectGeometryAggregator (DtDe &de, 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 Material gatherMaterial (osg::StateSet *ss) const
 find the material specified by this stateset if it exists More...
 
virtual bool isCullFaceEnabled (const osg::StateSet *ss) const
 check the stateset to see if it has cull face enabled More...
 
virtual bool isBlendingEnabled (const osg::StateSet *ss) const
 check the stateset to see if it has blending enabled More...
 
virtual bool isAlphaToCoverageEnabled (const osg::StateSet *ss) const
 check the stateset to see if it has a2c enabled More...
 
virtual DtIndirectBlendFunction gatherBlendFunction (const osg::StateSet *ss) const
 check the stateset for any blending function attributes More...
 
virtual DtIndirectBlendEquation gatherBlendEquation (const osg::StateSet *ss) const
 check the stateset for any blending equation attributes More...
 
virtual DtIndirectPolygonOffset gatherPolygonOffset (const 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...
 
virtual osg::Geometry * createDebugLightPointCube (DtLightPointNode &node)
 create a debug cube where every light point is for debugging. More...
 
virtual osg::Geometry * createDebugLightSourceCube (osg::LightSource &node)
 create a debug cube for a light source for debugging More...
 
virtual void applyToSwitchStack (osg::Group *node, osg::NodePath &nodePath)
 apply switch stack operation More...
 

Protected Attributes

int myNumGeodes
 
int myNumGeometries
 
int myModelId
 
int myLastVertexOffset
 
int myLastIndexOffset
 
unsigned int myMaxUvOffsetId
 
DtIndirectUvOffsetManager::AnnotationToUvOffsetMap myAnnotationToIdMap
 
DtIndirectUvOffsetManager::ScrollableUvOffsetIdsAndMultipliers myScrollableUvOffsetIdsAndMultipliers
 
std::stack< unsigned intmyLastUvOffsetIdStack
 
DtIndirectEffectTexturesTemplatemyAggregatedEffectTexturesState
 
DtIndirectGeometryStateManagermyStateManager
 
DtAggregatedGeometrymyAggregatedGeometry
 
std::stack< AggregatorDatamyDataStack
 stack of Aggregator as traversal happens. More...
 
std::stack< osg::Matrix > myMatrixStack
 
std::stack< intmyBillboardModeStack
 
DtIndirectLodManager::DequeIndirectLodInfos myLodStack
 
DtIndirectSwitchManager::DequeNodeSwitchInfoPairs mySwitchStack
 
DtIndirectDofManager::DequeNodeDofInfoPairs myDofStack
 
int myMaxDofId
 
int myCurrentParentId
 
const
DtIndirectTextureCollectionPolicy
myTextureCollectionPolicy
 
std::string myModelFileName
 
Material myDefaultMaterial
 
DtIndirectGeometryTexturesRefPtr myDefaultTextures
 
DtIndirectAggregateHelper myAggregateHelper
 
DtDemyDe
 
bool myLightSourcesDaylightControlled
 

Static Protected Attributes

static osg::ref_ptr< osg::Texture > theDefaultTexture
 

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 ScopedStackOperator
 
class ScopedAnnotationParser
 

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

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

Destructor.

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

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

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,
bool  daylightControlled 
)
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 ( DtLightPointNode node)
virtual

used to gather DtLightPointNodes

virtual void makVrv::DtIndirectGeometryAggregator::augmentModelInfo ( osg::Geometry *  geometry,
const AxisAlignedBoundingBox_32 bbox32,
const int  state,
const DtIndirectGeometryTexturesRefPtr texturesForThisGeometry,
Material &  materialForThisGeometry,
const bool  isLight 
)
virtual

internal function to augment the model info with the passed in geometry

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 gather DOFTransforms

virtual void makVrv::DtIndirectGeometryAggregator::apply ( osg::LightSource &  node)
overridevirtual

used to gather light sources

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)

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 Material makVrv::DtIndirectGeometryAggregator::gatherMaterial ( osg::StateSet *  ss) const
protectedvirtual

find the material specified by this stateset if it exists

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

check the stateset to see if it has cull face enabled

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

check the stateset to see if it has blending enabled

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

check the stateset to see if it has a2c enabled

virtual DtIndirectBlendFunction makVrv::DtIndirectGeometryAggregator::gatherBlendFunction ( const osg::StateSet *  ss) const
protectedvirtual

check the stateset for any blending function attributes

virtual DtIndirectBlendEquation makVrv::DtIndirectGeometryAggregator::gatherBlendEquation ( const osg::StateSet *  ss) const
protectedvirtual

check the stateset for any blending equation attributes

virtual DtIndirectPolygonOffset makVrv::DtIndirectGeometryAggregator::gatherPolygonOffset ( const 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

virtual osg::Geometry* makVrv::DtIndirectGeometryAggregator::createDebugLightPointCube ( DtLightPointNode node)
protectedvirtual

create a debug cube where every light point is for debugging.

virtual osg::Geometry* makVrv::DtIndirectGeometryAggregator::createDebugLightSourceCube ( osg::LightSource &  node)
protectedvirtual

create a debug cube for a light source for debugging

virtual void makVrv::DtIndirectGeometryAggregator::applyToSwitchStack ( osg::Group *  node,
osg::NodePath &  nodePath 
)
protectedvirtual

apply switch stack operation

Friends And Related Function Documentation

friend class ScopedStackOperator
friend
friend class ScopedAnnotationParser
friend

Member Data Documentation

friend makVrv::DtIndirectGeometryAggregator::DtIndirectGeometryAggregatorCreator
int makVrv::DtIndirectGeometryAggregator::myNumGeodes
protected
int makVrv::DtIndirectGeometryAggregator::myNumGeometries
protected
int makVrv::DtIndirectGeometryAggregator::myModelId
protected
int makVrv::DtIndirectGeometryAggregator::myLastVertexOffset
protected
int makVrv::DtIndirectGeometryAggregator::myLastIndexOffset
protected
unsigned int makVrv::DtIndirectGeometryAggregator::myMaxUvOffsetId
protected
DtIndirectUvOffsetManager::AnnotationToUvOffsetMap makVrv::DtIndirectGeometryAggregator::myAnnotationToIdMap
protected
DtIndirectUvOffsetManager::ScrollableUvOffsetIdsAndMultipliers makVrv::DtIndirectGeometryAggregator::myScrollableUvOffsetIdsAndMultipliers
protected
std::stack<unsigned int> makVrv::DtIndirectGeometryAggregator::myLastUvOffsetIdStack
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
std::stack<int> makVrv::DtIndirectGeometryAggregator::myBillboardModeStack
protected
DtIndirectLodManager::DequeIndirectLodInfos makVrv::DtIndirectGeometryAggregator::myLodStack
protected
DtIndirectSwitchManager::DequeNodeSwitchInfoPairs makVrv::DtIndirectGeometryAggregator::mySwitchStack
protected
DtIndirectDofManager::DequeNodeDofInfoPairs makVrv::DtIndirectGeometryAggregator::myDofStack
protected
int makVrv::DtIndirectGeometryAggregator::myMaxDofId
protected
int makVrv::DtIndirectGeometryAggregator::myCurrentParentId
protected
const DtIndirectTextureCollectionPolicy& makVrv::DtIndirectGeometryAggregator::myTextureCollectionPolicy
protected
std::string makVrv::DtIndirectGeometryAggregator::myModelFileName
protected
Material makVrv::DtIndirectGeometryAggregator::myDefaultMaterial
protected
DtIndirectGeometryTexturesRefPtr makVrv::DtIndirectGeometryAggregator::myDefaultTextures
protected
DtIndirectAggregateHelper makVrv::DtIndirectGeometryAggregator::myAggregateHelper
protected
DtDe& makVrv::DtIndirectGeometryAggregator::myDe
protected
bool makVrv::DtIndirectGeometryAggregator::myLightSourcesDaylightControlled
protected
osg::ref_ptr<osg::Texture> makVrv::DtIndirectGeometryAggregator::theDefaultTexture
staticprotected

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)