osgEarth 2.1.1
Public Member Functions | Public Attributes

MyMeasureToolCallback Class Reference

Inheritance diagram for MyMeasureToolCallback:
Collaboration diagram for MyMeasureToolCallback:

List of all members.

Public Member Functions

 MyMeasureToolCallback (LabelControl *label)
virtual void onDistanceChanged (MeasureToolHandler *sender, double distance)

Public Attributes

LabelControl_label

Detailed Description

Definition at line 41 of file osgearth_measure.cpp.


Constructor & Destructor Documentation

MyMeasureToolCallback::MyMeasureToolCallback ( LabelControl label) [inline]

Definition at line 44 of file osgearth_measure.cpp.

                                              :
      _label(label)
    {
    }

Member Function Documentation

virtual void MyMeasureToolCallback::onDistanceChanged ( MeasureToolHandler sender,
double  distance 
) [inline, virtual]

Reimplemented from osgEarth::Util::MeasureToolHandler::MeasureToolEventHandler.

Definition at line 49 of file osgearth_measure.cpp.

    {
        std::stringstream ss;
        ss << "Distance = " << std::setprecision(10) << distance << "m" << std::endl;        
        _label->setText( ss.str() );
    }

Member Data Documentation

Definition at line 55 of file osgearth_measure.cpp.


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