![]() |
VR-Forces 4.7 Class Documentation
|
DtOceanExtractorVisitor tags nodes as static ocean via the setUserValue capability, based on a texture name or texture regular expression. More...

Public Types | |
| typedef std::vector< boost::regex > | RegexVector |
| typdef a vector of regex for convenience | |
Public Member Functions | |
| DtOceanExtractorVisitor (DtTextureVisitor::TextureMap &textureMap, const std::string &rule, bool isRegEx) | |
| Default CTOR Inputs are the map of textures held be the terrain pactch, the search string or regular expression, and a flag saying if the rule is a regular expression or not. | |
| virtual | ~DtOceanExtractorVisitor () |
| Virtual DTOR. | |
| virtual void | apply (osg::Group &group) |
| This is the method called when the visitor is visiting groups We detect the DtTerrainPatchGroup (via dynamic cast) as the top-most group, allowing the visitor to do initialization and cleanup. | |
| virtual void | apply (osg::Node &node) |
| This is the method called when the visitor visits any non-group node. | |
| virtual bool | nodesExtracted () const |
| Return whether any nodes were marked as static ocean. | |
Protected Member Functions | |
| virtual bool | extractStaticOcean (osg::Node &node) |
| Method called on a node to attempt extraction. | |
| virtual bool | checkTextures (const osg::Node &node) |
| Check the textures pointed to by a node against the search criteria. | |
| virtual bool | makeNodeStaticOcean (osg::Node &node) |
| When a static ocean node is discovered, mark it. | |
Protected Attributes | |
| std::string | mySearchForString |
| RegexVector | mySearchForRegularExpressions |
| bool | myExpressionIsRegEx |
| osg::Group * | myStartGroup |
| DtTextureVisitor::TextureMap & | myTextureMap |
| boost::unordered_set< int > | myTexturesRemoved |
| boost::unordered_set< int > | myTextureNonMatchCache |
| bool | myNodesExtracted |
DtOceanExtractorVisitor tags nodes as static ocean via the setUserValue capability, based on a texture name or texture regular expression.
Terrain nodes have a DtOsgTextureKeyHolder in their userData fields which holds a list of the keys to a texture map of all the textures applied to the node. If one of the textures on the node matches the search string or regular expression than the node has a setUserValue( "isStaticOcean", true ) set on it.
| typedef std::vector<boost::regex> makVrv::DtOceanExtractorVisitor::RegexVector |
typdef a vector of regex for convenience
| makVrv::DtOceanExtractorVisitor::DtOceanExtractorVisitor | ( | DtTextureVisitor::TextureMap & | textureMap, |
| const std::string & | rule, | ||
| bool | isRegEx | ||
| ) |
Default CTOR Inputs are the map of textures held be the terrain pactch, the search string or regular expression, and a flag saying if the rule is a regular expression or not.
|
virtual |
Virtual DTOR.
|
virtual |
This is the method called when the visitor is visiting groups We detect the DtTerrainPatchGroup (via dynamic cast) as the top-most group, allowing the visitor to do initialization and cleanup.
Cleanup includes removing any texture names from the texture map that are 'extracted'.
|
virtual |
This is the method called when the visitor visits any non-group node.
|
virtual |
Return whether any nodes were marked as static ocean.
|
protectedvirtual |
Method called on a node to attempt extraction.
|
protectedvirtual |
Check the textures pointed to by a node against the search criteria.
|
protectedvirtual |
When a static ocean node is discovered, mark it.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |