osgEarth 2.1.1
Public Types | Public Member Functions | Protected Attributes

osgEarth::Features::FeatureGeometryIndexBuilder Class Reference

List of all members.

Public Types

typedef std::map
< osg::PrimitiveSet
*, FeatureID
PrimSetFeatureIdMap

Public Member Functions

 FeatureGeometryIndexBuilder ()
void add (FeatureID id, osg::PrimitiveSet *primSet)
FeatureGeometryIndexcreateIndex (osg::Node *graph)

Protected Attributes

PrimSetFeatureIdMap _primSetIds

Detailed Description

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.


Member Typedef Documentation

Definition at line 117 of file FeatureGeometryIndex.


Constructor & Destructor Documentation

FeatureGeometryIndexBuilder::FeatureGeometryIndexBuilder ( )

Definition at line 138 of file FeatureGeometryIndex.cpp.

{
    //nop
}

Member Function Documentation

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;
}

Member Data Documentation

Definition at line 120 of file FeatureGeometryIndex.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines