#include <SplitManipulator.h>
Public Member Functions | |
SplitManipulator (MatrixGetter *pMatrixGetter=NULL, osgGA::GUIEventHandler *pDelegateHandler=NULL) | |
Builds a manipulator with a matrix getter delegate and a handler delegate. | |
virtual void | init (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) |
Ensures the delegate handler to begin with mouse pointer at (0,0). | |
virtual void | setMatrixGetter (MatrixGetter *pMatrixGetter) |
Sets the delegate matrix getter/setter to which the manipulator will "stick" to. | |
virtual osg::Matrix | getMatrix () const |
virtual osg::Matrix | getInverseMatrix () const |
virtual void | setByMatrix (const osg::Matrix &matrix) |
virtual void | setByInverseMatrix (const osg::Matrix &matrix) |
virtual bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa, osg::Object *pObject, osg::NodeVisitor *pNV) |
virtual bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) |
Protected Attributes | |
MatrixGetter * | pMatrixGetter |
osgGA::GUIEventHandler * | pDelegateHandler |
Please note that the matrix getter has nothing to know about coordinate frame (this manipulator does the famous pi/2 rotation around the X axis).
Definition at line 89 of file SplitManipulator.h.
SplitManipulator::SplitManipulator | ( | MatrixGetter * | pMatrixGetter = NULL , |
|
osgGA::GUIEventHandler * | pDelegateHandler = NULL | |||
) | [inline] |
Builds a manipulator with a matrix getter delegate and a handler delegate.
pMatrixGetter | A pointer to a class that defines getMatrix() and getInverseMatrix(), and gives corresponding LocalToWorld and WorldToLocal matrices. | |
pDelegateHandler | A handler to which events will be passed. Allows this class to have a "plugable" way to pilot your vehicle. |
Definition at line 94 of file SplitManipulator.h.
virtual osg::Matrix SplitManipulator::getInverseMatrix | ( | ) | const [inline, virtual] |
Definition at line 103 of file SplitManipulator.h.
References ASSERT, MatrixGetter::getInverseMatrix(), and pMatrixGetter.
virtual osg::Matrix SplitManipulator::getMatrix | ( | ) | const [inline, virtual] |
Definition at line 102 of file SplitManipulator.h.
References ASSERT, MatrixGetter::getMatrix(), and pMatrixGetter.
virtual bool SplitManipulator::handle | ( | const osgGA::GUIEventAdapter & | ea, | |
osgGA::GUIActionAdapter & | aa | |||
) | [inline, virtual] |
virtual bool SplitManipulator::handle | ( | const osgGA::GUIEventAdapter & | ea, | |
osgGA::GUIActionAdapter & | aa, | |||
osg::Object * | pObject, | |||
osg::NodeVisitor * | pNV | |||
) | [inline, virtual] |
virtual void SplitManipulator::init | ( | const osgGA::GUIEventAdapter & | ea, | |
osgGA::GUIActionAdapter & | aa | |||
) | [inline, virtual] |
Ensures the delegate handler to begin with mouse pointer at (0,0).
Definition at line 97 of file SplitManipulator.h.
virtual void SplitManipulator::setByInverseMatrix | ( | const osg::Matrix & | matrix | ) | [inline, virtual] |
Definition at line 106 of file SplitManipulator.h.
References ASSERT, pMatrixGetter, and MatrixGetter::setByInverseMatrix().
virtual void SplitManipulator::setByMatrix | ( | const osg::Matrix & | matrix | ) | [inline, virtual] |
Definition at line 105 of file SplitManipulator.h.
References ASSERT, pMatrixGetter, and MatrixGetter::setByMatrix().
virtual void SplitManipulator::setMatrixGetter | ( | MatrixGetter * | pMatrixGetter | ) | [inline, virtual] |
Sets the delegate matrix getter/setter to which the manipulator will "stick" to.
Definition at line 100 of file SplitManipulator.h.
References ASSERT.
osgGA::GUIEventHandler* SplitManipulator::pDelegateHandler [protected] |
MatrixGetter* SplitManipulator::pMatrixGetter [protected] |
Definition at line 112 of file SplitManipulator.h.
Referenced by getInverseMatrix(), getMatrix(), setByInverseMatrix(), and setByMatrix().