osgEarth 2.1.1
Public Member Functions | Protected Attributes

osgEarth::Features::FeatureGeometryQuery Class Reference

List of all members.

Public Member Functions

 FeatureGeometryQuery (osg::Node *graph)
bool find (FeatureID fid, FeatureGeometryRecord &output) const

Protected Attributes

osg::ref_ptr< osg::Node > _graph

Detailed Description

This query object will search the specified scene graph for all the OSG components that comprise a particular Feature ID. It searched the graph for a UserData structure containing a FeatureGeometryIndex. When found, it searches that index for the Feature ID. If found, it returns the record; otherwise it continues searching.

Definition at line 52 of file FeatureGeometryIndex.


Constructor & Destructor Documentation

FeatureGeometryQuery::FeatureGeometryQuery ( osg::Node *  graph)

Definition at line 59 of file FeatureGeometryIndex.cpp.

                                                           :
_graph( graph )
{
    //nop
}

Member Function Documentation

bool FeatureGeometryQuery::find ( FeatureID  fid,
FeatureGeometryRecord output 
) const

Locates the geometry record representing the specified feature. Returns true if found; false if not.

Definition at line 66 of file FeatureGeometryIndex.cpp.

{
    if ( _graph.valid() )
    {
        FindVisitor visitor( id );
        _graph->accept( visitor );
        if ( visitor._rec )
        {
            record = *(visitor._rec);
            return true;
        }
    }
    return false;
}

Member Data Documentation

osg::ref_ptr<osg::Node> osgEarth::Features::FeatureGeometryQuery::_graph [protected]

Definition at line 64 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