VR-Forces 4.6.1 Class Documentation
 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 | Static Protected Attributes | Private Member Functions
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]

Public Member Functions

 DtIndirectGeometryAggregator (osg::ref_ptr< osg::Geometry > aggregatedGeometry, VectorGeometryLocations &locations, VectorMaterials &materials, VectorOsgTextures &textures, const DtLodInfo &lodInfo, const DtIndirectTextureCollectionPolicy &textureCollectionPolicy, const std::string &modelFileName)
 Constructor 'aggregatedGeometry', represents the flattened vertex, index buffer of all geometries/drawables encountered so far 'locations' is a flattened list of DtGeometrySpecification's (see DtGeometrySpecification) corresponding to aggregatedGeometry 'textures' is a flattened list of textures corresponding to aggregatedGeometry 'lodInfo' is the lod information (obtained from the read file) This is used to set the bounding box of each geometry visited herein 'textureCollectionPolicy' desrcribes how the textures will be collected and stored.
virtual ~DtIndirectGeometryAggregator ()
 Destructor.
virtual void apply (osg::Geometry &geometry)
 overridden to aggregate the geometry
virtual void apply (osg::Geode &geode)
 overridden from osg::NodeVisitor
virtual void apply (osg::Node &node)
 overridden from osg::NodeVisitor
virtual bool geometryNotSupported (const osg::Geometry &geometry) const
 Can the current system handle this geometry setup?
virtual int numGeodes () const
 number of geodes visited/encountered
virtual int numGeometries () const
 number of geometries visited/encountered

Protected Member Functions

virtual DtMaterial findMaterial (osg::StateSet *ss)
virtual bool findCullFaceEnabled (osg::StateSet *ss)

Protected Attributes

int myNumGeodes
int myNumGeometries
VectorGeometryLocationsmyLocations
VectorMaterialsmyMaterials
VectorOsgTexturesmyTextures
osg::ref_ptr< osg::Geometry > myAggregatedGeometry
std::stack
< DtIndirectGeometryTexturesPointers
myTextureStack
std::stack< DtMaterialmyMaterialStack
std::stack< boolmyCullFaceEnabledStack
const DtLodInfo myLodInfo
const
DtIndirectTextureCollectionPolicy
myTextureCollectionPolicy
const std::string myModelFileName

Static Protected Attributes

static const DtMaterial theDefaultMaterial

Private Member Functions

 DtIndirectGeometryAggregator ()
 unimplemented default constructor

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 ( osg::ref_ptr< osg::Geometry >  aggregatedGeometry,
VectorGeometryLocations locations,
VectorMaterials materials,
VectorOsgTextures textures,
const DtLodInfo lodInfo,
const DtIndirectTextureCollectionPolicy textureCollectionPolicy,
const std::string &  modelFileName 
)

Constructor 'aggregatedGeometry', represents the flattened vertex, index buffer of all geometries/drawables encountered so far 'locations' is a flattened list of DtGeometrySpecification's (see DtGeometrySpecification) corresponding to aggregatedGeometry 'textures' is a flattened list of textures corresponding to aggregatedGeometry 'lodInfo' is the lod information (obtained from the read file) This is used to set the bounding box of each geometry visited herein 'textureCollectionPolicy' desrcribes how the textures will be collected and stored.

This is implementation specific (e.g. cdb, regular effect textures, tec) 'modelFileName' is just a debug name typically corresponding to the node we are visiting to aggregate further geometry

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

Destructor.

makVrv::DtIndirectGeometryAggregator::DtIndirectGeometryAggregator ( )
private

unimplemented default constructor

Member Function Documentation

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

overridden to aggregate the geometry

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

overridden from osg::NodeVisitor

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

overridden from osg::NodeVisitor

virtual bool makVrv::DtIndirectGeometryAggregator::geometryNotSupported ( const osg::Geometry &  geometry) const
virtual

Can the current system handle this geometry setup?

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

number of geodes visited/encountered

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

number of geometries visited/encountered

virtual DtMaterial makVrv::DtIndirectGeometryAggregator::findMaterial ( osg::StateSet *  ss)
protectedvirtual
virtual bool makVrv::DtIndirectGeometryAggregator::findCullFaceEnabled ( osg::StateSet *  ss)
protectedvirtual

Member Data Documentation

int makVrv::DtIndirectGeometryAggregator::myNumGeodes
protected
int makVrv::DtIndirectGeometryAggregator::myNumGeometries
protected
VectorGeometryLocations& makVrv::DtIndirectGeometryAggregator::myLocations
protected
VectorMaterials& makVrv::DtIndirectGeometryAggregator::myMaterials
protected
VectorOsgTextures& makVrv::DtIndirectGeometryAggregator::myTextures
protected
osg::ref_ptr<osg::Geometry> makVrv::DtIndirectGeometryAggregator::myAggregatedGeometry
protected
std::stack<DtIndirectGeometryTexturesPointers> makVrv::DtIndirectGeometryAggregator::myTextureStack
protected
std::stack<DtMaterial> makVrv::DtIndirectGeometryAggregator::myMaterialStack
protected
std::stack<bool> makVrv::DtIndirectGeometryAggregator::myCullFaceEnabledStack
protected
const DtLodInfo makVrv::DtIndirectGeometryAggregator::myLodInfo
protected
const DtIndirectTextureCollectionPolicy& makVrv::DtIndirectGeometryAggregator::myTextureCollectionPolicy
protected
const std::string makVrv::DtIndirectGeometryAggregator::myModelFileName
protected
const DtMaterial makVrv::DtIndirectGeometryAggregator::theDefaultMaterial
staticprotected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)