openscenegraph
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
osgManipulator::Scale2DDragger Class Reference
Inheritance diagram for osgManipulator::Scale2DDragger:
osgManipulator::Dragger osg::MatrixTransform osg::Transform osg::Group osg::Node osg::Object osg::Referenced

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
void setupDefaultGeometry ()
void setMinScale (const osg::Vec2d &min)
const osg::Vec2d & getMinScale () const
void setColor (const osg::Vec4 &color)
const osg::Vec4 & getColor () const
void setPickColor (const osg::Vec4 &color)
const osg::Vec4 & getPickColor () const
void setTopLeftHandleNode (osg::Node &node)
osg::Node * getTopLeftHandleNode ()
const osg::Node * getTopLeftHandleNode () const
void setBottomLeftHandleNode (osg::Node &node)
osg::Node * getBottomLeftHandleNode ()
const osg::Node * getBottomLeftHandleNode () const
void setTopRightHandleNode (osg::Node &node)
osg::Node * getTopRightHandleNode ()
const osg::Node * getTopRightHandleNode () const
void setBottomRightHandleNode (osg::Node &node)
osg::Node * getBottomRightHandleNode ()
const osg::Node * getBottomRightHandleNode () const
void setTopLeftHandlePosition (const osg::Vec2d &pos)
const osg::Vec2d & getTopLeftHandlePosition () const
void setBottomLeftHandlePosition (const osg::Vec2d &pos)
const osg::Vec2d & getBottomLeftHandlePosition () const
void setTopRightHandlePosition (const osg::Vec2d &pos)
const osg::Vec2d & getTopRightHandlePosition () const
void setBottomRightHandlePosition (const osg::Vec2d &pos)
const osg::Vec2d & getBottomRightHandlePosition () const

Public Attributes

const osgGA::GUIEventAdapter & ea
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]
const osg::Node* osgManipulator::Scale2DDragger::getTopRightHandleNode ( ) const [inline]
osg::Node* osgManipulator::Scale2DDragger::getTopRightHandleNode ( ) [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: