osgEarth 2.1.1
Classes | Public Member Functions

osgEarth::Symbology::GeometrySymbolizer Class Reference

Inheritance diagram for osgEarth::Symbology::GeometrySymbolizer:

List of all members.

Classes

class  GeometrySymbolizerOperator

Public Member Functions

 GeometrySymbolizer ()
virtual bool compile (GeometrySymbolizerState *state, osg::Group *attachPoint)

Detailed Description

Definition at line 30 of file GeometrySymbolizer.


Constructor & Destructor Documentation

GeometrySymbolizer::GeometrySymbolizer ( )

Definition at line 161 of file GeometrySymbolizer.cpp.

{
    //nop
}

Member Function Documentation

bool GeometrySymbolizer::compile ( GeometrySymbolizerState state,
osg::Group *  attachPoint 
) [virtual]

Creates or updates a subgraph representing the symbolized data. The Symbolizer can attach the subgraph to the attachPoint.

Definition at line 167 of file GeometrySymbolizer.cpp.

{
    if ( !state || !state->getContent() || !attachPoint || !state->getStyle() )
        return false;

    //const GeometryContent* geometryInput = dynamic_cast<const GeometryContent*>(dataSet);
    //if (!geometryInput)
    //    return false;

    const GeometryList& geometryList = state->getContent()->getGeometryList();

    GeometrySymbolizerOperator functor;
    osg::Node* node = (functor)(geometryList, state->getStyle());
    if (node)
    {
        attachPoint->removeChildren(0, attachPoint->getNumChildren());
        attachPoint->addChild(node);
        return true;
    }

    return false;
}

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