osgEarth 2.1.1
|
Public Member Functions | |
GeometryNode (Geometry *geom, const Style &style) | |
GeometryNode (MapNode *mapNode, Geometry *geom, const Style &style, bool draped=true) | |
template<typename T > | |
T * | getOrCreateParent () |
Protected Member Functions | |
void | init () |
Protected Attributes | |
osg::ref_ptr< Geometry > | _geom |
Style | _style |
osg::ref_ptr< osg::Group > | _parent |
Simple node that renders a Geometry into a scene graph node. The coordinates of the geometry are explicit; there is no association with spatial reference or a map. You can use this object to create a geometry for use in a local tangent plane coordinate system.
Definition at line 151 of file Annotation.
Definition at line 151 of file Annotation.cpp.
: DrapeableNode( NULL ), _geom ( geom ), _style ( style ) { init(); }
GeometryNode::GeometryNode | ( | MapNode * | mapNode, |
Geometry * | geom, | ||
const Style & | style, | ||
bool | draped = true |
||
) |
Definition at line 160 of file Annotation.cpp.
: DrapeableNode( mapNode, draped ), _geom ( geom ), _style ( style ) { init(); }
T* osgEarth::Util::Annotation::GeometryNode::getOrCreateParent | ( | ) | [inline] |
Gets or creates a parent node for the internal draped node. Typically you would use this to install a Transform node atop the draped node.
Definition at line 163 of file Annotation.
{ if ( _parent.valid() ) { return static_cast<T*>( _parent.get() ); } else { T* p = new T(); _parent = p; if ( getNode() ) { p->addChild( getNode() ); setNode( _parent.get() ); } return p; } }
void GeometryNode::init | ( | ) | [protected] |
Definition at line 172 of file Annotation.cpp.
{ FeatureList features; features.push_back( new Feature(_geom.get(), _style) ); BuildGeometryFilter bg; // no worky. FilterContext context; osg::Node* node = bg.push( features, context ); //osg::Node* node = bg.getNode(); setNode( node ); }
osg::ref_ptr<Geometry> osgEarth::Util::Annotation::GeometryNode::_geom [protected] |
Definition at line 185 of file Annotation.
osg::ref_ptr<osg::Group> osgEarth::Util::Annotation::GeometryNode::_parent [protected] |
Definition at line 187 of file Annotation.
Definition at line 186 of file Annotation.