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

Visitor that locates effect textures and installs them into the scene graph. More...

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

Public Member Functions

 DtOsgEffectTextureVisitor (DtOsgFileCache &fileCache, DtOsgShaderManager &shaderMgr, const osgDB::Options *options, DtDe &de)
 CTOR.
virtual ~DtOsgEffectTextureVisitor ()
 DTOR.
void reset ()
 Resets the visitor to its initial state.
unsigned getNumEffectTexturesInstalled () const
 After visiting, call this to see how many effect textures the visitor installed.
bool isEffectTexture (osg::Texture *tex) const
 Checks whether a texture is an effect texture.
virtual bool checkAndSetIgnoreHint (osg::Object *obj, bool val)
 Set the state of the ignore hint for a node Updated to be threadsafe and check the current value and set it in one call.
virtual void setIgnoreHint (osg::Object *obj, bool val)
 Set the state of the ignore hint for a node Updated to be threadsafe Use this to mark nodes as ignored for future texture finding traversals.
void apply (osg::Node &node)
void apply (osg::Geode &geode)

Static Public Attributes

static const charIgnoreHint
static boost::mutex s_visitorMutex

Protected Types

typedef std::vector
< osg::ref_ptr
< DtOsgEffectTextureController > > 
Controllers

Protected Member Functions

virtual bool ignore (osg::Object *obj)
void apply (osg::StateSet *stateSet)
bool installEffectTextures (osg::Texture *tex, int texUnit, osg::StateSet *stateSet)

Protected Attributes

unsigned myCount
Controllers myControllers
osg::ref_ptr< const
osgDB::Options > 
myDbOptions
DtOsgFileCachemyFileCache
DtOsgShaderManagermyShaderMgr
DtDemyDe

Detailed Description

Visitor that locates effect textures and installs them into the scene graph.

Run this prior to running the Shader Generator to pick up normal maps, reflectivity maps, specular maps, ambient occlusion maps, and emissivity maps.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtOsgEffectTextureVisitor::DtOsgEffectTextureVisitor ( DtOsgFileCache fileCache,
DtOsgShaderManager shaderMgr,
const osgDB::Options *  options,
DtDe de 
)

CTOR.

virtual makVrv::DtOsgEffectTextureVisitor::~DtOsgEffectTextureVisitor ( )
virtual

DTOR.

Member Function Documentation

void makVrv::DtOsgEffectTextureVisitor::reset ( )

Resets the visitor to its initial state.

If you plan to use the same instance more than once, call reset() before each use.

unsigned makVrv::DtOsgEffectTextureVisitor::getNumEffectTexturesInstalled ( ) const

After visiting, call this to see how many effect textures the visitor installed.

Calling reset() will reset this to zero.

bool makVrv::DtOsgEffectTextureVisitor::isEffectTexture ( osg::Texture *  tex) const

Checks whether a texture is an effect texture.

virtual bool makVrv::DtOsgEffectTextureVisitor::checkAndSetIgnoreHint ( osg::Object *  obj,
bool  val 
)
virtual

Set the state of the ignore hint for a node Updated to be threadsafe and check the current value and set it in one call.

It returns the previous value of the ignore flag and changes it to be val. Use this to mark nodes as ignored for future texture finding traversals

virtual void makVrv::DtOsgEffectTextureVisitor::setIgnoreHint ( osg::Object *  obj,
bool  val 
)
virtual

Set the state of the ignore hint for a node Updated to be threadsafe Use this to mark nodes as ignored for future texture finding traversals.

void makVrv::DtOsgEffectTextureVisitor::apply ( osg::Node &  node)
void makVrv::DtOsgEffectTextureVisitor::apply ( osg::Geode &  geode)
virtual bool makVrv::DtOsgEffectTextureVisitor::ignore ( osg::Object *  obj)
protectedvirtual
void makVrv::DtOsgEffectTextureVisitor::apply ( osg::StateSet *  stateSet)
protected
bool makVrv::DtOsgEffectTextureVisitor::installEffectTextures ( osg::Texture *  tex,
int  texUnit,
osg::StateSet *  stateSet 
)
protected

Member Data Documentation

const char* makVrv::DtOsgEffectTextureVisitor::IgnoreHint
static
boost::mutex makVrv::DtOsgEffectTextureVisitor::s_visitorMutex
static
unsigned makVrv::DtOsgEffectTextureVisitor::myCount
protected
Controllers makVrv::DtOsgEffectTextureVisitor::myControllers
protected
osg::ref_ptr<const osgDB::Options> makVrv::DtOsgEffectTextureVisitor::myDbOptions
protected
DtOsgFileCache& makVrv::DtOsgEffectTextureVisitor::myFileCache
protected
DtOsgShaderManager& makVrv::DtOsgEffectTextureVisitor::myShaderMgr
protected
DtDe& makVrv::DtOsgEffectTextureVisitor::myDe
protected

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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)