osgEarth 2.1.1
Public Member Functions | Public Attributes

UpdateLabelCallback Struct Reference

Inheritance diagram for UpdateLabelCallback:
Collaboration diagram for UpdateLabelCallback:

List of all members.

Public Member Functions

 UpdateLabelCallback (LabelControl *label, ImageOverlay *overlay, ImageOverlay::ControlPoint controlPoint)
virtual void onOverlayChanged ()

Public Attributes

osg::ref_ptr< LabelControl_label
osg::ref_ptr< ImageOverlay_overlay
ImageOverlay::ControlPoint _controlPoint

Detailed Description

Definition at line 145 of file osgearth_imageoverlay.cpp.


Constructor & Destructor Documentation

UpdateLabelCallback::UpdateLabelCallback ( LabelControl label,
ImageOverlay overlay,
ImageOverlay::ControlPoint  controlPoint 
) [inline]

Definition at line 147 of file osgearth_imageoverlay.cpp.

                                                                                                          :
      _label(label),
      _overlay(overlay),
      _controlPoint(controlPoint)
    {

    }

Member Function Documentation

virtual void UpdateLabelCallback::onOverlayChanged ( ) [inline, virtual]

Reimplemented from osgEarth::Util::ImageOverlay::ImageOverlayCallback.

Definition at line 155 of file osgearth_imageoverlay.cpp.

    {
        osg::Vec2d location = _overlay->getControlPoint( _controlPoint );
        std::stringstream ss;
        ss << location.y() << ", " << location.x();
        _label->setText( ss.str() );
    }

Member Data Documentation

Definition at line 166 of file osgearth_imageoverlay.cpp.

Definition at line 164 of file osgearth_imageoverlay.cpp.

Definition at line 165 of file osgearth_imageoverlay.cpp.


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