osgManipulator::Scale2DDragger Class Reference

Dragger for performing 2D scaling. More...

Inheritance diagram for osgManipulator::Scale2DDragger:

Inheritance graph
[legend]

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::Vec2 &min)
 Set/Get min scale for dragger.
const osg::Vec2getMinScale () 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::Vec2 &pos)
 Set/Get the handle nodes postion for dragger.
const osg::Vec2getTopLeftHandlePosition ()
void setBottomLeftHandlePosition (const osg::Vec2 &pos)
const osg::Vec2getBottomLeftHandlePosition ()
void setTopRightHandlePosition (const osg::Vec2 &pos)
const osg::Vec2getTopRightHandlePosition ()
void setBottomRightHandlePosition (const osg::Vec2 &pos)
const osg::Vec2getBottomRightHandlePosition ()

Protected Member Functions

virtual ~Scale2DDragger ()

Protected Attributes

osg::ref_ptr
< PlaneProjector
_projector
osg::Vec3 _startProjectedPoint
osg::Vec2 _scaleCenter
osg::Vec2 _referencePoint
osg::Vec2 _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::Vec2 _topLeftHandlePosition
osg::Vec2 _bottomLeftHandlePosition
osg::Vec2 _topRightHandlePosition
osg::Vec2 _bottomRightHandlePosition
osg::Vec4 _color
osg::Vec4 _pickColor
ScaleMode _scaleMode


Detailed Description

Dragger for performing 2D scaling.

Member Enumeration Documentation

enum osgManipulator::Scale2DDragger::ScaleMode

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

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::setupDefaultGeometry (  ) 

Setup default geometry for dragger.

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

Set/Get min scale for dragger.

const osg::Vec2& osgManipulator::Scale2DDragger::getMinScale (  )  const [inline]

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

Set/Get color for dragger.

const osg::Vec4 osgManipulator::Scale2DDragger::getColor (  )  const [inline]

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.

const osg::Vec4 osgManipulator::Scale2DDragger::getPickColor (  )  const [inline]

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

Set/Get the handle nodes for dragger.

osg::Node* osgManipulator::Scale2DDragger::getTopLeftHandleNode (  )  [inline]

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

osg::Node* osgManipulator::Scale2DDragger::getBottomLeftHandleNode (  )  [inline]

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

osg::Node* osgManipulator::Scale2DDragger::getTopRightHandleNode (  )  [inline]

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

osg::Node* osgManipulator::Scale2DDragger::getBottomRightHandleNode (  )  [inline]

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

Set/Get the handle nodes postion for dragger.

const osg::Vec2& osgManipulator::Scale2DDragger::getTopLeftHandlePosition (  )  [inline]

void osgManipulator::Scale2DDragger::setBottomLeftHandlePosition ( const osg::Vec2 pos  )  [inline]

const osg::Vec2& osgManipulator::Scale2DDragger::getBottomLeftHandlePosition (  )  [inline]

void osgManipulator::Scale2DDragger::setTopRightHandlePosition ( const osg::Vec2 pos  )  [inline]

const osg::Vec2& osgManipulator::Scale2DDragger::getTopRightHandlePosition (  )  [inline]

void osgManipulator::Scale2DDragger::setBottomRightHandlePosition ( const osg::Vec2 pos  )  [inline]

const osg::Vec2& osgManipulator::Scale2DDragger::getBottomRightHandlePosition (  )  [inline]


Member Data Documentation

osg::ref_ptr< PlaneProjector > osgManipulator::Scale2DDragger::_projector [protected]

osg::Vec3 osgManipulator::Scale2DDragger::_startProjectedPoint [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_scaleCenter [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_referencePoint [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_minScale [protected]

osg::ref_ptr< osg::Node > osgManipulator::Scale2DDragger::_topLeftHandleNode [protected]

osg::ref_ptr< osg::Node > osgManipulator::Scale2DDragger::_bottomLeftHandleNode [protected]

osg::ref_ptr< osg::Node > osgManipulator::Scale2DDragger::_topRightHandleNode [protected]

osg::ref_ptr< osg::Node > osgManipulator::Scale2DDragger::_bottomRightHandleNode [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_topLeftHandlePosition [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_bottomLeftHandlePosition [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_topRightHandlePosition [protected]

osg::Vec2 osgManipulator::Scale2DDragger::_bottomRightHandlePosition [protected]

osg::Vec4 osgManipulator::Scale2DDragger::_color [protected]

osg::Vec4 osgManipulator::Scale2DDragger::_pickColor [protected]

ScaleMode osgManipulator::Scale2DDragger::_scaleMode [protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:41 2007 for the OpenSceneGraph by doxygen 1.5.3.