SplitManipulator Class Reference

Manipulator that splits matrix getting/setting from events handling and that use two delegates (one for each task). More...

#include <SplitManipulator.h>

List of all members.

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

MatrixGetterpMatrixGetter
osgGA::GUIEventHandler * pDelegateHandler


Detailed Description

Manipulator that splits matrix getting/setting from events handling and that use two delegates (one for each task).

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).

Warning:
This class does NOT own its delegates.
See also:
This class is part of the Driven manipulator system
Author:
Sukender

KinoX (Transposed some code of KinoX from the former HumanManipulator)

Version:
0.2.0

Definition at line 89 of file SplitManipulator.h.


Constructor & Destructor Documentation

SplitManipulator::SplitManipulator ( MatrixGetter pMatrixGetter = NULL,
osgGA::GUIEventHandler *  pDelegateHandler = NULL 
) [inline]

Builds a manipulator with a matrix getter delegate and a handler delegate.

Parameters:
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.


Member Function Documentation

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]

Definition at line 109 of file SplitManipulator.h.

References ASSERT, and pDelegateHandler.

virtual bool SplitManipulator::handle ( const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  aa,
osg::Object *  pObject,
osg::NodeVisitor *  pNV 
) [inline, virtual]

Definition at line 108 of file SplitManipulator.h.

References ASSERT, and pDelegateHandler.

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.


Member Data Documentation

osgGA::GUIEventHandler* SplitManipulator::pDelegateHandler [protected]

Definition at line 113 of file SplitManipulator.h.

Referenced by handle().

Definition at line 112 of file SplitManipulator.h.

Referenced by getInverseMatrix(), getMatrix(), setByInverseMatrix(), and setByMatrix().


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

Generated on Sun Jan 17 11:39:29 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9