VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes | Friends
makVrv::DtIndirectEffectTexturesTemplate Class Reference

Class that allows you to abstractly register effect texture types the effect texture types are client specific (cdb, regular effect textures, etc) and typically enums and hence map directly to ints (DtOsgEffectTextureController::EffectTextureType) When a type is registered, that type is mapped to an index and the internal 'index' is incremented Therefore, each type maps to an index The highest possible index is num of types registered less 1 This class is used in conjunction with DtIndirectTextureCollectionPolicy to install the correct indirect rendering shaders for the usage type (cdb, point features, etc) The need for this additional indirection is that the 'type' can be any number (or indeed not an enum/int at all) but the way indirect rendering works, is that effect textures need to be with a start index of 0, and monotonically increasing (both for internal code and shader). This class helps us to achieve this.

Public Member Functions

 DtIndirectEffectTexturesTemplate ()
 
 ~DtIndirectEffectTexturesTemplate ()
 
void registerType (int type)
 
bool hasType (int type) const
 
int numEffectTextures (void) const
 
int indexForType (int type) const
 
int typeForIndex (int index) const
 
bool operator== (const DtIndirectEffectTexturesTemplate &rhs) const
 
bool operator!= (const DtIndirectEffectTexturesTemplate &rhs) const
 

Protected Attributes

MapIntToInt myTypeToIndex
 
MapIntToInt myIndexToType
 
std::string myHashStr
 

Friends

std::ostream & operator<< (std::ostream &o, const DtIndirectEffectTexturesTemplate &rhs)
 

Constructor & Destructor Documentation

makVrv::DtIndirectEffectTexturesTemplate::DtIndirectEffectTexturesTemplate ( )

constructor

makVrv::DtIndirectEffectTexturesTemplate::~DtIndirectEffectTexturesTemplate ( )

destructor - non virtual since this class is not intended to be derived from

Member Function Documentation

void makVrv::DtIndirectEffectTexturesTemplate::registerType ( int  type)

register a type of an effect texture

bool makVrv::DtIndirectEffectTexturesTemplate::hasType ( int  type) const

was this type registered here?

int makVrv::DtIndirectEffectTexturesTemplate::numEffectTextures ( void  ) const

number of effect texture registered

int makVrv::DtIndirectEffectTexturesTemplate::indexForType ( int  type) const

get the index, given the type

int makVrv::DtIndirectEffectTexturesTemplate::typeForIndex ( int  index) const

get the type, given the index

bool makVrv::DtIndirectEffectTexturesTemplate::operator== ( const DtIndirectEffectTexturesTemplate rhs) const

equality operator

bool makVrv::DtIndirectEffectTexturesTemplate::operator!= ( const DtIndirectEffectTexturesTemplate rhs) const

inequality operator

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const DtIndirectEffectTexturesTemplate rhs 
)
friend

<< operator (e.g. for debugging)

Member Data Documentation

MapIntToInt makVrv::DtIndirectEffectTexturesTemplate::myTypeToIndex
protected
MapIntToInt makVrv::DtIndirectEffectTexturesTemplate::myIndexToType
protected
std::string makVrv::DtIndirectEffectTexturesTemplate::myHashStr
protected

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

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)