osgGA::MatrixManipulator Class Reference

Inheritance diagram for osgGA::MatrixManipulator:

osgGA::GUIEventHandler osg::NodeCallback osg::Drawable::EventCallback osg::Object osg::Object osg::Referenced osg::Referenced osgGA::AnimationPathManipulator osgGA::DriveManipulator osgGA::FlightManipulator osgGA::KeySwitchMatrixManipulator osgGA::NodeTrackerManipulator osgGA::TerrainManipulator osgGA::TrackballManipulator osgGA::UFOManipulator List of all members.

Public Member Functions

virtual const char * className () const
virtual void setMinimumDistance (float minimumDistance)
float getMinimumDistance () const
virtual void setCoordinateFrameCallback (CoordinateFrameCallback *cb)
CoordinateFrameCallbackgetCoordinateFrameCallback ()
const CoordinateFrameCallbackgetCoordinateFrameCallback () const
osg::CoordinateFrame getCoordinateFrame (const osg::Vec3d &position) const
osg::Vec3d getSideVector (const osg::CoordinateFrame &cf) const
osg::Vec3d getFrontVector (const osg::CoordinateFrame &cf) const
osg::Vec3d getUpVector (const osg::CoordinateFrame &cf) const
virtual void setByMatrix (const osg::Matrixd &matrix)=0
virtual void setByInverseMatrix (const osg::Matrixd &matrix)=0
virtual osg::Matrixd getMatrix () const =0
virtual osg::Matrixd getInverseMatrix () const =0
virtual osgUtil::SceneView::FusionDistanceMode getFusionDistanceMode () const
virtual float getFusionDistanceValue () const
void setIntersectTraversalMask (unsigned int mask)
unsigned int getIntersectTraversalMask () const
virtual void setNode (osg::Node *)
virtual const osg::NodegetNode () const
virtual osg::NodegetNode ()
virtual void setHomePosition (const osg::Vec3d &eye, const osg::Vec3d &center, const osg::Vec3d &up, bool autoComputeHomePosition=false)
virtual void getHomePosition (osg::Vec3d &eye, osg::Vec3d &center, osg::Vec3d &up) const
virtual void setAutoComputeHomePosition (bool flag)
bool getAutoComputeHomePosition () const
virtual void computeHomePosition ()
virtual void home (const GUIEventAdapter &, GUIActionAdapter &)
virtual void home (double)
virtual void init (const GUIEventAdapter &, GUIActionAdapter &)
virtual bool handle (const GUIEventAdapter &ea, GUIActionAdapter &us)
virtual void accept (GUIEventHandlerVisitor &v)

Protected Member Functions

 MatrixManipulator ()
virtual ~MatrixManipulator ()

Protected Attributes

double _minimumDistance
unsigned int _intersectTraversalMask
bool _autoComputeHomePosition
osg::Vec3d _homeEye
osg::Vec3d _homeCenter
osg::Vec3d _homeUp
osg::ref_ptr< CoordinateFrameCallback_coordinateFrameCallback

Classes

class  CoordinateFrameCallback

Detailed Description

MatrixManipulator is an abstract base class defining the interface, and a certain amount of default functionality, for classes which wish to control OSG cameras in response to GUI events.


Constructor & Destructor Documentation

osgGA::MatrixManipulator::MatrixManipulator (  )  [protected]

virtual osgGA::MatrixManipulator::~MatrixManipulator (  )  [protected, virtual]


Member Function Documentation

virtual void osgGA::MatrixManipulator::accept ( GUIEventHandlerVisitor v  )  [inline, virtual]

Handle visitations

Reimplemented from osgGA::GUIEventHandler.

virtual const char* osgGA::MatrixManipulator::className (  )  const [inline, virtual]

return the name of the object's class type. Must be defined by derived classes.

Implements osg::Object.

Reimplemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::computeHomePosition (  )  [inline, virtual]

Compute the home position.

Reimplemented in osgGA::DriveManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, and osgGA::UFOManipulator.

bool osgGA::MatrixManipulator::getAutoComputeHomePosition (  )  const [inline]

Get whether the automatic compute of the home position is enabled.

osg::CoordinateFrame osgGA::MatrixManipulator::getCoordinateFrame ( const osg::Vec3d position  )  const [inline]

get the coordinate frame.

const CoordinateFrameCallback* osgGA::MatrixManipulator::getCoordinateFrameCallback (  )  const [inline]

get the coordinate frame callback which tells the manipulator which way is up, east and north.

CoordinateFrameCallback* osgGA::MatrixManipulator::getCoordinateFrameCallback (  )  [inline]

get the coordinate frame callback which tells the manipulator which way is up, east and north.

osg::Vec3d osgGA::MatrixManipulator::getFrontVector ( const osg::CoordinateFrame cf  )  const [inline]

virtual osgUtil::SceneView::FusionDistanceMode osgGA::MatrixManipulator::getFusionDistanceMode (  )  const [inline, virtual]

Get the FusionDistanceMode. Used by SceneView for setting up setereo convergence.

Reimplemented in osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, and osgGA::TrackballManipulator.

virtual float osgGA::MatrixManipulator::getFusionDistanceValue (  )  const [inline, virtual]

Get the FusionDistanceValue. Used by SceneView for setting up setereo convergence.

Reimplemented in osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, and osgGA::TrackballManipulator.

virtual void osgGA::MatrixManipulator::getHomePosition ( osg::Vec3d eye,
osg::Vec3d center,
osg::Vec3d up 
) const [inline, virtual]

Get the mnaully set home position.

unsigned int osgGA::MatrixManipulator::getIntersectTraversalMask (  )  const [inline]

Get the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection.

virtual osg::Matrixd osgGA::MatrixManipulator::getInverseMatrix (  )  const [pure virtual]

get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.

Implemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual osg::Matrixd osgGA::MatrixManipulator::getMatrix (  )  const [pure virtual]

get the position of the manipulator as 4x4 Matrix.

Implemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

float osgGA::MatrixManipulator::getMinimumDistance (  )  const [inline]

get the minimum distance (as ratio) the eye point can be zoomed in

virtual osg::Node* osgGA::MatrixManipulator::getNode (  )  [inline, virtual]

Return node if attached.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual const osg::Node* osgGA::MatrixManipulator::getNode (  )  const [inline, virtual]

Return const node if attached.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

osg::Vec3d osgGA::MatrixManipulator::getSideVector ( const osg::CoordinateFrame cf  )  const [inline]

osg::Vec3d osgGA::MatrixManipulator::getUpVector ( const osg::CoordinateFrame cf  )  const [inline]

virtual bool osgGA::MatrixManipulator::handle ( const GUIEventAdapter ea,
GUIActionAdapter us 
) [virtual]

Handle events, return true if handled, false otherwise.

Reimplemented from osgGA::GUIEventHandler.

Reimplemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::home ( double   )  [inline, virtual]

Move the camera to the default position. This version does not require GUIEventAdapter and GUIActionAdapter so may be called from somewhere other than a handle() method in GUIEventHandler. Application must be aware of implications.

Reimplemented in osgGA::AnimationPathManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::home ( const GUIEventAdapter ,
GUIActionAdapter  
) [inline, virtual]

Move the camera to the default position. May be ignored by manipulators if home functionality is not appropriate.

Reimplemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::init ( const GUIEventAdapter ,
GUIActionAdapter  
) [inline, virtual]

Start/restart the manipulator. FIXME: what does this actually mean? Provide examples.

Reimplemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::setAutoComputeHomePosition ( bool  flag  )  [inline, virtual]

Set whether the automatic compute of the home position is enabled.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

virtual void osgGA::MatrixManipulator::setByInverseMatrix ( const osg::Matrixd matrix  )  [pure virtual]

set the position of the matrix manipulator using a 4x4 Matrix.

Implemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::setByMatrix ( const osg::Matrixd matrix  )  [pure virtual]

set the position of the matrix manipulator using a 4x4 Matrix.

Implemented in osgGA::AnimationPathManipulator, osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.

virtual void osgGA::MatrixManipulator::setCoordinateFrameCallback ( CoordinateFrameCallback cb  )  [inline, virtual]

set the coordinate frame which callback tells the manipulator which way is up, east and north.

virtual void osgGA::MatrixManipulator::setHomePosition ( const osg::Vec3d eye,
const osg::Vec3d center,
const osg::Vec3d up,
bool  autoComputeHomePosition = false 
) [inline, virtual]

Manually set the home position, and set the automatic compute of home position.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

void osgGA::MatrixManipulator::setIntersectTraversalMask ( unsigned int  mask  )  [inline]

Set the mask to use when set up intersection traversal such as used in manipulators that follow terrain or have collision detection. The intersection traversal mask is useful for controlling what parts of the scene graph should be used for intersection purposes.

virtual void osgGA::MatrixManipulator::setMinimumDistance ( float  minimumDistance  )  [inline, virtual]

set the minimum distance (as ratio) the eye point can be zoomed in towards the center before the center is pushed forward.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

virtual void osgGA::MatrixManipulator::setNode ( osg::Node  )  [inline, virtual]

Attach a node to the manipulator, automatically detaching any previously attached node. setNode(NULL) detaches previous nodes. May be ignored by manipulators which do not require a reference model.

Reimplemented in osgGA::DriveManipulator, osgGA::FlightManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::NodeTrackerManipulator, osgGA::TerrainManipulator, osgGA::TrackballManipulator, and osgGA::UFOManipulator.


Member Data Documentation

bool osgGA::MatrixManipulator::_autoComputeHomePosition [protected]

osg::ref_ptr<CoordinateFrameCallback> osgGA::MatrixManipulator::_coordinateFrameCallback [protected]

osg::Vec3d osgGA::MatrixManipulator::_homeCenter [protected]

osg::Vec3d osgGA::MatrixManipulator::_homeEye [protected]

osg::Vec3d osgGA::MatrixManipulator::_homeUp [protected]

unsigned int osgGA::MatrixManipulator::_intersectTraversalMask [protected]

double osgGA::MatrixManipulator::_minimumDistance [protected]


The documentation for this class was generated from the following file:
Generated on Sun Oct 1 13:17:09 2006 for openscenegraph by  doxygen 1.4.7