#include <stateattributecollector.h>
Public Types | |
| typedef std::map< std::string, dtCore::RefPtr< osg::Material > > | MaterialNodeMap |
| typedef std::map< std::string, dtCore::RefPtr< osg::Program > > | ProgramNodeMap |
| typedef std::map< std::string, dtCore::RefPtr< osg::Texture > > | TextureNodeMap |
| typedef unsigned | StateAttribFlag |
Public Member Functions | |
| StateAttributeCollector () | |
| Blank Constructor that is defined to do nothing. | |
| StateAttributeCollector (osg::Node *nodeToLoad, StateAttributeCollector::StateAttribFlag mask, const std::string &nodeNameIgnored="") | |
| Constructor that when called will automatically generate the state attribute maps that you request. | |
| void | CollectStateAttributes (osg::Node *nodeToLoad, StateAttributeCollector::StateAttribFlag mask, const std::string &nodeNameIgnored="") |
| Function that when called will automatically generate the state attribute maps that you request. | |
| void | ClearAll () |
| Function that is defined to clear all the maps of their contents. | |
| const osg::Material * | GetMaterial (const std::string &name) const |
| Function that is used to request a CONST pointer to a Materials State Attribute. | |
| const osg::Program * | GetProgram (const std::string &name) const |
| Function that is used to request a CONST pointer to a Program State Attribute. | |
| const osg::Texture * | GetTexture (const std::string &name) const |
| Function that is used to request a CONST pointer to a Texture State Attribute. | |
| osg::Material * | GetMaterial (const std::string &name) |
| Function that is used to request a pointer to a Materials State Attribute. | |
| osg::Program * | GetProgram (const std::string &name) |
| Function that is used to request a pointer to a Program State Attribute. | |
| osg::Texture * | GetTexture (const std::string &name) |
| Function that is used to request a pointer to a Texture State Attribute. | |
| void | AddMaterial (const std::string &name, osg::Material &materialObject) |
| Function that is used to add a Material StateAttribute to the Material map. | |
| void | AddProgram (const std::string &name, osg::Program &programObject) |
| Function that is used to add a Program StateAttribute to the Program map. | |
| void | AddTexture (const std::string &name, osg::Texture &textureObject) |
| Function that is used to add a Texture StateAttribute to the Texture map. | |
| const StateAttributeCollector::MaterialNodeMap & | GetMaterialMap () const |
| Function that returns a CONST map populated with Material StateAttributes. | |
| const StateAttributeCollector::ProgramNodeMap & | GetProgramMap () const |
| Function that returns a CONST map populated with Program StateAttributes. | |
| const StateAttributeCollector::TextureNodeMap & | GetTextureMap () const |
| Function that returns a CONST map populated with Texture StateAttributes. | |
| StateAttributeCollector::MaterialNodeMap & | GetMaterialMap () |
| Function that returns a map populated with Material StateAttributes. | |
| StateAttributeCollector::ProgramNodeMap & | GetProgramMap () |
| Function that returns a map populated with Program StateAttributes. | |
| StateAttributeCollector::TextureNodeMap & | GetTextureMap () |
| Function that returns a map populated with Texture StateAttributes. | |
Static Public Attributes | |
| static const StateAttribFlag | MaterialFlag = dtUtil::Bits::Add(0,1) |
| static const StateAttribFlag | ProgramFlag = dtUtil::Bits::Add(0,2) |
| static const StateAttribFlag | TextureFlag = dtUtil::Bits::Add(0,4) |
| static const StateAttribFlag | AllAttributes |
Protected Member Functions | |
| virtual | ~StateAttributeCollector () |
| Destructor. | |
| typedef std::map<std::string, dtCore::RefPtr<osg::Material> > dtCore::StateAttributeCollector::MaterialNodeMap |
| typedef std::map<std::string, dtCore::RefPtr<osg::Program> > dtCore::StateAttributeCollector::ProgramNodeMap |
| typedef std::map<std::string, dtCore::RefPtr<osg::Texture> > dtCore::StateAttributeCollector::TextureNodeMap |
| typedef unsigned dtCore::StateAttributeCollector::StateAttribFlag |
| dtCore::StateAttributeCollector::StateAttributeCollector | ( | ) |
Blank Constructor that is defined to do nothing.
| dtCore::StateAttributeCollector::StateAttributeCollector | ( | osg::Node * | nodeToLoad, | |
| StateAttributeCollector::StateAttribFlag | mask, | |||
| const std::string & | nodeNameIgnored = "" | |||
| ) |
Constructor that when called will automatically generate the state attribute maps that you request.
| nodeToLoad | The starting node who's state attributes you would like to explore. | |
| mask | The different types of state attributes you want to collect off of the loaded node. | |
| nodeNameIgnored | The name of a state attribute that you do not want to collect. |
| dtCore::StateAttributeCollector::~StateAttributeCollector | ( | ) | [protected, virtual] |
Destructor.
| void dtCore::StateAttributeCollector::CollectStateAttributes | ( | osg::Node * | nodeToLoad, | |
| StateAttributeCollector::StateAttribFlag | mask, | |||
| const std::string & | nodeNameIgnored = "" | |||
| ) |
Function that when called will automatically generate the state attribute maps that you request.
| nodeToLoad | The starting node who's state attributes you would like to explore. | |
| mask | The different types of state attributes you want to collect off of the loaded node. | |
| nodeNameIgnored | The name of a state attribute that you do not want to collect. |
| void dtCore::StateAttributeCollector::ClearAll | ( | ) |
Function that is defined to clear all the maps of their contents.
| const osg::Material * dtCore::StateAttributeCollector::GetMaterial | ( | const std::string & | name | ) | const |
Function that is used to request a CONST pointer to a Materials State Attribute.
| name | A String that represents the name of the Materials State Attribute you are looking for |
| const osg::Program * dtCore::StateAttributeCollector::GetProgram | ( | const std::string & | name | ) | const |
Function that is used to request a CONST pointer to a Program State Attribute.
| name | A String that represents the name of the Program State Attribute you are looking for |
| const osg::Texture * dtCore::StateAttributeCollector::GetTexture | ( | const std::string & | name | ) | const |
Function that is used to request a CONST pointer to a Texture State Attribute.
| name | A String that represents the name of the Texture State Attribute you are looking for |
| osg::Material * dtCore::StateAttributeCollector::GetMaterial | ( | const std::string & | name | ) |
Function that is used to request a pointer to a Materials State Attribute.
| name | A String that represents the name of the Materials State Attribute you are looking for |
| osg::Program * dtCore::StateAttributeCollector::GetProgram | ( | const std::string & | name | ) |
Function that is used to request a pointer to a Program State Attribute.
| name | A String that represents the name of the Program State Attribute you are looking for |
| osg::Texture * dtCore::StateAttributeCollector::GetTexture | ( | const std::string & | name | ) |
Function that is used to request a pointer to a Texture State Attribute.
| name | A String that represents the name of the Texture State Attribute you are looking for |
| void dtCore::StateAttributeCollector::AddMaterial | ( | const std::string & | name, | |
| osg::Material & | materialObject | |||
| ) |
Function that is used to add a Material StateAttribute to the Material map.
| name | A String that represents the name of the StateAttribute | |
| materialObject | The Material StateAttribute that you wish to add to the map |
| void dtCore::StateAttributeCollector::AddProgram | ( | const std::string & | name, | |
| osg::Program & | programObject | |||
| ) |
Function that is used to add a Program StateAttribute to the Program map.
| name | A String that represents the name of the StateAttribute | |
| materialObject | The Program StateAttribute that you wish to add to the map |
| void dtCore::StateAttributeCollector::AddTexture | ( | const std::string & | name, | |
| osg::Texture & | textureObject | |||
| ) |
Function that is used to add a Texture StateAttribute to the Texture map.
| name | A String that represents the name of the StateAttribute | |
| materialObject | The Texture StateAttribute that you wish to add to the map |
| const StateAttributeCollector::MaterialNodeMap & dtCore::StateAttributeCollector::GetMaterialMap | ( | ) | const |
Function that returns a CONST map populated with Material StateAttributes.
| const StateAttributeCollector::ProgramNodeMap & dtCore::StateAttributeCollector::GetProgramMap | ( | ) | const |
Function that returns a CONST map populated with Program StateAttributes.
| const StateAttributeCollector::TextureNodeMap & dtCore::StateAttributeCollector::GetTextureMap | ( | ) | const |
Function that returns a CONST map populated with Texture StateAttributes.
| StateAttributeCollector::MaterialNodeMap & dtCore::StateAttributeCollector::GetMaterialMap | ( | ) |
Function that returns a map populated with Material StateAttributes.
| StateAttributeCollector::ProgramNodeMap & dtCore::StateAttributeCollector::GetProgramMap | ( | ) |
Function that returns a map populated with Program StateAttributes.
| StateAttributeCollector::TextureNodeMap & dtCore::StateAttributeCollector::GetTextureMap | ( | ) |
Function that returns a map populated with Texture StateAttributes.
const StateAttributeCollector::StateAttribFlag dtCore::StateAttributeCollector::MaterialFlag = dtUtil::Bits::Add(0,1) [static] |
const StateAttributeCollector::StateAttribFlag dtCore::StateAttributeCollector::ProgramFlag = dtUtil::Bits::Add(0,2) [static] |
const StateAttributeCollector::StateAttribFlag dtCore::StateAttributeCollector::TextureFlag = dtUtil::Bits::Add(0,4) [static] |