|
osgEarth 2.1.1
|
Public Types | |
| typedef std::map < osg::PrimitiveSet *, FeatureID > | PrimSetFeatureIdMap |
Public Member Functions | |
| FeatureGeometryIndexBuilder () | |
| void | add (FeatureID id, osg::PrimitiveSet *primSet) |
| FeatureGeometryIndex * | createIndex (osg::Node *graph) |
Protected Attributes | |
| PrimSetFeatureIdMap | _primSetIds |
Use this class to construct a geometry index. Every time you create a new primitive set that belongs to a Feature, call "add" to remember the mapping. When you are done building geometry, call "createIndex" to build a index for a particular scene graph.
Definition at line 100 of file FeatureGeometryIndex.
| typedef std::map< osg::PrimitiveSet*, FeatureID > osgEarth::Features::FeatureGeometryIndexBuilder::PrimSetFeatureIdMap |
Definition at line 117 of file FeatureGeometryIndex.
| FeatureGeometryIndexBuilder::FeatureGeometryIndexBuilder | ( | ) |
Definition at line 138 of file FeatureGeometryIndex.cpp.
{
//nop
}
| void FeatureGeometryIndexBuilder::add | ( | FeatureID | id, |
| osg::PrimitiveSet * | primSet | ||
| ) |
Maps a primitiset set to a feature.
Definition at line 144 of file FeatureGeometryIndex.cpp.
{
_primSetIds[primSet] = id;
}
| FeatureGeometryIndex * FeatureGeometryIndexBuilder::createIndex | ( | osg::Node * | graph | ) |
Creates an index from a scene graph and the feature ID map
Definition at line 150 of file FeatureGeometryIndex.cpp.
{
FeatureGeometryIndex* index = new FeatureGeometryIndex();
Collector collector( _primSetIds, index->_records );
node->accept( collector );
return index;
}
Definition at line 120 of file FeatureGeometryIndex.
1.7.3