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

Base class for controllers that install and control effect textures. More...

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

Public Types

typedef std::map< std::string,
std::string > 
FilenameMap

Public Member Functions

 DtOsgEffectTextureController (DtOsgFileCache &fileCache, DtOsgShaderManager &shaderMgr)
 CTOR.
virtual std::string getEffectTypeCode () const =0
 The type code string for this effect.
virtual osg::Texture * installEffectTexture (osg::Texture *baseTexture, int texUnit, osg::StateSet *stateSet, const osgDB::Options *dbOptions, const FilenameMap &possibleFilenames)
 Install the normal map texture + shaders on a state set.
virtual void findEffectTexture (const std::string &baseTextureName, const osgDB::Options *dbOptions, const FilenameMap &possibleFilenames, const osg::Texture *baseTexture, osg::ref_ptr< osg::Texture > &effectTexture)
 Find the effect texture for this effect, if one exists.
virtual bool generateShaders (int baseUnit, int effectUnit, osg::Texture *tex, osg::StateSet *stateSet, const std::string &baseTextureName)
 Generates shaders for a stateset if required by this effect.
virtual bool isEffectTexture (osg::Texture *tex) const
 \brief True if the provided texture is an effect texture of this object's type.
virtual bool effectTextureInstalled (const std::string &baseTextureName, osg::StateSet *stateSet) const
 True if there's already an effect texture installed on the given stateset that corresponds to the given base texture.
std::string getExtendedFileName (const std::string &baseFileName) const
void getPossibleEffectTextureFileNames (const std::string &baseFileName, std::vector< std::string > &output) const

Static Public Member Functions

static std::string getTextureFilePath (osg::Texture *texture)

Protected Member Functions

virtual ~DtOsgEffectTextureController ()
 DTOR.
void applyDefaultShaderLODRanges (osgEarth::VirtualProgram *vp, const std::string &function) const

Protected Attributes

std::string myVertSource
std::string myFragSource
float myDefaultMaxRange
DtOsgFileCachemyFileCache
DtOsgShaderManagermyShaderMgr
std::string myShaderFolderPath

Static Protected Attributes

static boost::mutex s_controllerMutex

Detailed Description

Base class for controllers that install and control effect textures.

Member Typedef Documentation

typedef std::map<std::string, std::string> makVrv::DtOsgEffectTextureController::FilenameMap

Constructor & Destructor Documentation

makVrv::DtOsgEffectTextureController::DtOsgEffectTextureController ( DtOsgFileCache fileCache,
DtOsgShaderManager shaderMgr 
)

CTOR.

virtual makVrv::DtOsgEffectTextureController::~DtOsgEffectTextureController ( )
protectedvirtual

DTOR.

Member Function Documentation

virtual std::string makVrv::DtOsgEffectTextureController::getEffectTypeCode ( ) const
pure virtual
virtual osg::Texture* makVrv::DtOsgEffectTextureController::installEffectTexture ( osg::Texture *  baseTexture,
int  texUnit,
osg::StateSet *  stateSet,
const osgDB::Options *  dbOptions,
const FilenameMap possibleFilenames 
)
virtual

Install the normal map texture + shaders on a state set.

Reimplemented in makVrv::DtOsgEmissivityMapController.

virtual void makVrv::DtOsgEffectTextureController::findEffectTexture ( const std::string &  baseTextureName,
const osgDB::Options *  dbOptions,
const FilenameMap possibleFilenames,
const osg::Texture *  baseTexture,
osg::ref_ptr< osg::Texture > &  effectTexture 
)
virtual

Find the effect texture for this effect, if one exists.

Reimplemented in makVrv::DtOsgConfigurableEffectController.

virtual bool makVrv::DtOsgEffectTextureController::generateShaders ( int  baseUnit,
int  effectUnit,
osg::Texture *  tex,
osg::StateSet *  stateSet,
const std::string &  baseTextureName 
)
inlinevirtual
virtual bool makVrv::DtOsgEffectTextureController::isEffectTexture ( osg::Texture *  tex) const
virtual

\brief True if the provided texture is an effect texture of this object's type.

virtual bool makVrv::DtOsgEffectTextureController::effectTextureInstalled ( const std::string &  baseTextureName,
osg::StateSet *  stateSet 
) const
virtual

True if there's already an effect texture installed on the given stateset that corresponds to the given base texture.

static std::string makVrv::DtOsgEffectTextureController::getTextureFilePath ( osg::Texture *  texture)
static
std::string makVrv::DtOsgEffectTextureController::getExtendedFileName ( const std::string &  baseFileName) const
void makVrv::DtOsgEffectTextureController::getPossibleEffectTextureFileNames ( const std::string &  baseFileName,
std::vector< std::string > &  output 
) const
void makVrv::DtOsgEffectTextureController::applyDefaultShaderLODRanges ( osgEarth::VirtualProgram *  vp,
const std::string &  function 
) const
protected

Member Data Documentation

std::string makVrv::DtOsgEffectTextureController::myVertSource
protected
std::string makVrv::DtOsgEffectTextureController::myFragSource
protected
float makVrv::DtOsgEffectTextureController::myDefaultMaxRange
protected
DtOsgFileCache& makVrv::DtOsgEffectTextureController::myFileCache
protected
DtOsgShaderManager& makVrv::DtOsgEffectTextureController::myShaderMgr
protected
std::string makVrv::DtOsgEffectTextureController::myShaderFolderPath
protected
boost::mutex makVrv::DtOsgEffectTextureController::s_controllerMutex
staticprotected

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)