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.
|
Detailed Description
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.
Member Typedef Documentation
typdef a vector of regex for convenience
Constructor & Destructor Documentation
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 makVrv::DtOceanExtractorVisitor::~DtOceanExtractorVisitor |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual void makVrv::DtOceanExtractorVisitor::apply |
( |
osg::Group & |
group | ) |
|
|
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 void makVrv::DtOceanExtractorVisitor::apply |
( |
osg::Node & |
node | ) |
|
|
virtual |
This is the method called when the visitor visits any non-group node.
| virtual bool makVrv::DtOceanExtractorVisitor::nodesExtracted |
( |
| ) |
const |
|
virtual |
Return whether any nodes were marked as static ocean.
| virtual bool makVrv::DtOceanExtractorVisitor::extractStaticOcean |
( |
osg::Node & |
node | ) |
|
|
protectedvirtual |
Method called on a node to attempt extraction.
| virtual bool makVrv::DtOceanExtractorVisitor::checkTextures |
( |
const osg::Node & |
node | ) |
|
|
protectedvirtual |
Check the textures pointed to by a node against the search criteria.
| virtual bool makVrv::DtOceanExtractorVisitor::makeNodeStaticOcean |
( |
osg::Node & |
node | ) |
|
|
protectedvirtual |
When a static ocean node is discovered, mark it.
Member Data Documentation
| std::string makVrv::DtOceanExtractorVisitor::mySearchForString |
|
protected |
| RegexVector makVrv::DtOceanExtractorVisitor::mySearchForRegularExpressions |
|
protected |
| bool makVrv::DtOceanExtractorVisitor::myExpressionIsRegEx |
|
protected |
| osg::Group* makVrv::DtOceanExtractorVisitor::myStartGroup |
|
protected |
| boost::unordered_set<int> makVrv::DtOceanExtractorVisitor::myTexturesRemoved |
|
protected |
| boost::unordered_set<int> makVrv::DtOceanExtractorVisitor::myTextureNonMatchCache |
|
protected |
| bool makVrv::DtOceanExtractorVisitor::myNodesExtracted |
|
protected |
The documentation for this class was generated from the following file: