Public Types | |
enum | ScaleMode { SCALE_WITH_ORIGIN_AS_PIVOT = 0, SCALE_WITH_OPPOSITE_HANDLE_AS_PIVOT } |
Public Member Functions | |
Scale1DDragger (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 (float min) |
Set/Get min scale for dragger. | |
float | getMinScale () 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 | setLeftHandleNode (osg::Node &node) |
Set/Get left and right handle nodes for dragger. | |
void | setRightHandleNode (osg::Node &node) |
osg::Node * | getLeftHandleNode () |
osg::Node * | getRightHandleNode () |
void | setLeftHandlePosition (float pos) |
Set left/right handle position. | |
float | getLeftHandlePosition () const |
void | setRightHandlePosition (float pos) |
float | getRightHandlePosition () |
Protected Member Functions | |
virtual | ~Scale1DDragger () |
Protected Attributes | |
osg::ref_ptr < LineProjector > | _projector |
osg::Vec3 | _startProjectedPoint |
float | _scaleCenter |
float | _minScale |
osg::ref_ptr< osg::Node > | _leftHandleNode |
osg::ref_ptr< osg::Node > | _rightHandleNode |
osg::Vec4 | _color |
osg::Vec4 | _pickColor |
ScaleMode | _scaleMode |
osgManipulator::Scale1DDragger::Scale1DDragger | ( | ScaleMode | scaleMode = SCALE_WITH_ORIGIN_AS_PIVOT |
) |
virtual osgManipulator::Scale1DDragger::~Scale1DDragger | ( | ) | [protected, virtual] |
virtual bool osgManipulator::Scale1DDragger::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::Scale1DDragger::setupDefaultGeometry | ( | ) |
Setup default geometry for dragger.
void osgManipulator::Scale1DDragger::setMinScale | ( | float | min | ) | [inline] |
Set/Get min scale for dragger.
float osgManipulator::Scale1DDragger::getMinScale | ( | ) | const [inline] |
void osgManipulator::Scale1DDragger::setColor | ( | const osg::Vec4 & | color | ) | [inline] |
Set/Get color for dragger.
const osg::Vec4 osgManipulator::Scale1DDragger::getColor | ( | ) | const [inline] |
void osgManipulator::Scale1DDragger::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::Scale1DDragger::getPickColor | ( | ) | const [inline] |
void osgManipulator::Scale1DDragger::setLeftHandleNode | ( | osg::Node & | node | ) | [inline] |
Set/Get left and right handle nodes for dragger.
void osgManipulator::Scale1DDragger::setRightHandleNode | ( | osg::Node & | node | ) | [inline] |
osg::Node* osgManipulator::Scale1DDragger::getLeftHandleNode | ( | ) | [inline] |
osg::Node* osgManipulator::Scale1DDragger::getRightHandleNode | ( | ) | [inline] |
void osgManipulator::Scale1DDragger::setLeftHandlePosition | ( | float | pos | ) | [inline] |
Set left/right handle position.
float osgManipulator::Scale1DDragger::getLeftHandlePosition | ( | ) | const [inline] |
void osgManipulator::Scale1DDragger::setRightHandlePosition | ( | float | pos | ) | [inline] |
float osgManipulator::Scale1DDragger::getRightHandlePosition | ( | ) | [inline] |
osg::ref_ptr< LineProjector > osgManipulator::Scale1DDragger::_projector [protected] |
float osgManipulator::Scale1DDragger::_scaleCenter [protected] |
float osgManipulator::Scale1DDragger::_minScale [protected] |
osg::ref_ptr< osg::Node > osgManipulator::Scale1DDragger::_leftHandleNode [protected] |
osg::Vec4 osgManipulator::Scale1DDragger::_color [protected] |
osg::Vec4 osgManipulator::Scale1DDragger::_pickColor [protected] |
ScaleMode osgManipulator::Scale1DDragger::_scaleMode [protected] |