osgEarth 2.1.1
Public Member Functions | Public Attributes

AddVertsModeHandler Struct Reference

Inheritance diagram for AddVertsModeHandler:
Collaboration diagram for AddVertsModeHandler:

List of all members.

Public Member Functions

 AddVertsModeHandler (FeatureModelGraph *featureGraph)
void onClick (Control *control, int mouseButtonMask)

Public Attributes

osg::ref_ptr< FeatureModelGraph_featureGraph

Detailed Description

Definition at line 86 of file osgearth_featureeditor.cpp.


Constructor & Destructor Documentation

AddVertsModeHandler::AddVertsModeHandler ( FeatureModelGraph featureGraph) [inline]

Definition at line 88 of file osgearth_featureeditor.cpp.

        : _featureGraph( featureGraph )
    {
    }

Member Function Documentation

void AddVertsModeHandler::onClick ( Control control,
int  mouseButtonMask 
) [inline, virtual]

Click event with mouse button mask (see osgGA::GUIEventAdapter::MouseButtonMask)

Reimplemented from osgEarth::Util::Controls::ControlEventHandler.

Definition at line 93 of file osgearth_featureeditor.cpp.

                                                          {

        //remove the editor if it's valid
        if (s_editor.valid())
        {
            s_root->removeChild( s_editor.get() );
            s_editor = NULL;

            Style* style = _featureGraph->getStyles()->getDefaultStyle();
            if ( style )
            {            
                style->get<LineSymbol>()->stroke()->stipple().unset();
                _featureGraph->dirty();
            }
        }

        //Add the new add point handler
        if (!s_addPointHandler.valid() && s_activeFeature.valid())
        {
            s_addPointHandler = new AddPointHandler(s_activeFeature.get(), s_source.get(), s_mapNode->getMap()->getProfile()->getSRS());
            s_addPointHandler->setIntersectionMask( 0x1 );
            s_viewer->addEventHandler( s_addPointHandler.get() );
        }        
    }

Member Data Documentation

Definition at line 118 of file osgearth_featureeditor.cpp.


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