OpenSceneGraph 2.8.3

osgManipulator::Scale2DDragger Class Reference

Dragger for performing 2D scaling. More...

Inheritance diagram for osgManipulator::Scale2DDragger:

List of all members.

Public Types

enum  ScaleMode { SCALE_WITH_ORIGIN_AS_PIVOT = 0, SCALE_WITH_OPPOSITE_HANDLE_AS_PIVOT }

Public Member Functions

 Scale2DDragger (ScaleMode scaleMode=SCALE_WITH_ORIGIN_AS_PIVOT)
virtual bool handle (const PointerInfo &pi, const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
 Handle pick events on dragger and generate TranslateInLine commands.
void setupDefaultGeometry ()
 Setup default geometry for dragger.
void setMinScale (const osg::Vec2d &min)
 Set/Get min scale for dragger.
const osg::Vec2dgetMinScale () const
void setColor (const osg::Vec4 &color)
 Set/Get color for dragger.
const osg::Vec4 getColor () const
void setPickColor (const osg::Vec4 &color)
 Set/Get pick color for dragger.
const osg::Vec4 getPickColor () const
void setTopLeftHandleNode (osg::Node &node)
 Set/Get the handle nodes for dragger.
osg::NodegetTopLeftHandleNode ()
void setBottomLeftHandleNode (osg::Node &node)
osg::NodegetBottomLeftHandleNode ()
void setTopRightHandleNode (osg::Node &node)
osg::NodegetTopRightHandleNode ()
void setBottomRightHandleNode (osg::Node &node)
osg::NodegetBottomRightHandleNode ()
void setTopLeftHandlePosition (const osg::Vec2d &pos)
 Set/Get the handle nodes postion for dragger.
const osg::Vec2dgetTopLeftHandlePosition ()
void setBottomLeftHandlePosition (const osg::Vec2d &pos)
const osg::Vec2dgetBottomLeftHandlePosition ()
void setTopRightHandlePosition (const osg::Vec2d &pos)
const osg::Vec2dgetTopRightHandlePosition ()
void setBottomRightHandlePosition (const osg::Vec2d &pos)
const osg::Vec2dgetBottomRightHandlePosition ()

Protected Member Functions

virtual ~Scale2DDragger ()

Protected Attributes

osg::ref_ptr< PlaneProjector_projector
osg::Vec3d _startProjectedPoint
osg::Vec2d _scaleCenter
osg::Vec2d _referencePoint
osg::Vec2d _minScale
osg::ref_ptr< osg::Node_topLeftHandleNode
osg::ref_ptr< osg::Node_bottomLeftHandleNode
osg::ref_ptr< osg::Node_topRightHandleNode
osg::ref_ptr< osg::Node_bottomRightHandleNode
osg::Vec2d _topLeftHandlePosition
osg::Vec2d _bottomLeftHandlePosition
osg::Vec2d _topRightHandlePosition
osg::Vec2d _bottomRightHandlePosition
osg::Vec4 _color
osg::Vec4 _pickColor
ScaleMode _scaleMode

Detailed Description

Dragger for performing 2D scaling.


Member Enumeration Documentation

Enumerator:
SCALE_WITH_ORIGIN_AS_PIVOT 
SCALE_WITH_OPPOSITE_HANDLE_AS_PIVOT 

Constructor & Destructor Documentation

osgManipulator::Scale2DDragger::Scale2DDragger ( ScaleMode  scaleMode = SCALE_WITH_ORIGIN_AS_PIVOT)
virtual osgManipulator::Scale2DDragger::~Scale2DDragger ( ) [protected, virtual]

Member Function Documentation

osg::Node* osgManipulator::Scale2DDragger::getBottomLeftHandleNode ( ) [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getBottomLeftHandlePosition ( ) [inline]
osg::Node* osgManipulator::Scale2DDragger::getBottomRightHandleNode ( ) [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getBottomRightHandlePosition ( ) [inline]
const osg::Vec4 osgManipulator::Scale2DDragger::getColor ( ) const [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getMinScale ( ) const [inline]
const osg::Vec4 osgManipulator::Scale2DDragger::getPickColor ( ) const [inline]
osg::Node* osgManipulator::Scale2DDragger::getTopLeftHandleNode ( ) [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getTopLeftHandlePosition ( ) [inline]
osg::Node* osgManipulator::Scale2DDragger::getTopRightHandleNode ( ) [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getTopRightHandlePosition ( ) [inline]
virtual bool osgManipulator::Scale2DDragger::handle ( const PointerInfo pi,
const osgGA::GUIEventAdapter ea,
osgGA::GUIActionAdapter us 
) [virtual]

Handle pick events on dragger and generate TranslateInLine commands.

Reimplemented from osgManipulator::Dragger.

void osgManipulator::Scale2DDragger::setBottomLeftHandleNode ( osg::Node node) [inline]
void osgManipulator::Scale2DDragger::setBottomLeftHandlePosition ( const osg::Vec2d pos) [inline]
void osgManipulator::Scale2DDragger::setBottomRightHandleNode ( osg::Node node) [inline]
void osgManipulator::Scale2DDragger::setBottomRightHandlePosition ( const osg::Vec2d pos) [inline]
void osgManipulator::Scale2DDragger::setColor ( const osg::Vec4 color) [inline]

Set/Get color for dragger.

References osgManipulator::setMaterialColor().

void osgManipulator::Scale2DDragger::setMinScale ( const osg::Vec2d min) [inline]

Set/Get min scale for dragger.

void osgManipulator::Scale2DDragger::setPickColor ( const osg::Vec4 color) [inline]

Set/Get pick color for dragger.

Pick color is color of the dragger when picked. It gives a visual feedback to show that the dragger has been picked.

void osgManipulator::Scale2DDragger::setTopLeftHandleNode ( osg::Node node) [inline]

Set/Get the handle nodes for dragger.

void osgManipulator::Scale2DDragger::setTopLeftHandlePosition ( const osg::Vec2d pos) [inline]

Set/Get the handle nodes postion for dragger.

void osgManipulator::Scale2DDragger::setTopRightHandleNode ( osg::Node node) [inline]
void osgManipulator::Scale2DDragger::setTopRightHandlePosition ( const osg::Vec2d pos) [inline]
void osgManipulator::Scale2DDragger::setupDefaultGeometry ( )

Setup default geometry for dragger.


Member Data Documentation


The documentation for this class was generated from the following file:

osg logo
Generated at Tue Mar 22 2011 13:20:28 for the OpenSceneGraph by doxygen 1.7.3.