OpenSceneGraph  3.0.1
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
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)
 META_OSGMANIPULATOR_Object (osgManipulator, Scale2DDragger) virtual bool handle(const PointerInfo &pi
 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::Vec4getColor () const
void setPickColor (const osg::Vec4 &color)
 Set/Get pick color for dragger.
const osg::Vec4getPickColor () const
void setTopLeftHandleNode (osg::Node &node)
 Set/Get the handle nodes for dragger.
osg::NodegetTopLeftHandleNode ()
const osg::NodegetTopLeftHandleNode () const
void setBottomLeftHandleNode (osg::Node &node)
osg::NodegetBottomLeftHandleNode ()
const osg::NodegetBottomLeftHandleNode () const
void setTopRightHandleNode (osg::Node &node)
osg::NodegetTopRightHandleNode ()
const osg::NodegetTopRightHandleNode () const
void setBottomRightHandleNode (osg::Node &node)
osg::NodegetBottomRightHandleNode ()
const osg::NodegetBottomRightHandleNode () const
void setTopLeftHandlePosition (const osg::Vec2d &pos)
 Set/Get the handle nodes postion for dragger.
const osg::Vec2dgetTopLeftHandlePosition () const
void setBottomLeftHandlePosition (const osg::Vec2d &pos)
const osg::Vec2dgetBottomLeftHandlePosition () const
void setTopRightHandlePosition (const osg::Vec2d &pos)
const osg::Vec2dgetTopRightHandlePosition () const
void setBottomRightHandlePosition (const osg::Vec2d &pos)
const osg::Vec2dgetBottomRightHandlePosition () const

Public Attributes

const osgGA::GUIEventAdapterea
const osgGA::GUIEventAdapter
osgGA::GUIActionAdapter
us

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::Node* osgManipulator::Scale2DDragger::getBottomLeftHandleNode ( ) const [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getBottomLeftHandlePosition ( ) const [inline]
osg::Node* osgManipulator::Scale2DDragger::getBottomRightHandleNode ( ) [inline]
const osg::Node* osgManipulator::Scale2DDragger::getBottomRightHandleNode ( ) const [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getBottomRightHandlePosition ( ) const [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::Node* osgManipulator::Scale2DDragger::getTopLeftHandleNode ( ) const [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getTopLeftHandlePosition ( ) const [inline]
osg::Node* osgManipulator::Scale2DDragger::getTopRightHandleNode ( ) [inline]
const osg::Node* osgManipulator::Scale2DDragger::getTopRightHandleNode ( ) const [inline]
const osg::Vec2d& osgManipulator::Scale2DDragger::getTopRightHandlePosition ( ) const [inline]
osgManipulator::Scale2DDragger::META_OSGMANIPULATOR_Object ( osgManipulator  ,
Scale2DDragger   
) const

Handle pick events on dragger and generate TranslateInLine commands.

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 ( ) [virtual]

Setup default geometry for dragger.

Reimplemented from osgManipulator::Dragger.


Member Data Documentation


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

osg logo
Generated at Mon Oct 3 2011 12:39:47 for the OpenSceneGraph by doxygen 1.7.5.