Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

osgGA::MatrixManipulator Class Reference

Inheritance diagram for osgGA::MatrixManipulator:

osgGA::GUIEventHandler osg::Object osg::Referenced osgGA::AnimationPathManipulator osgGA::DriveManipulator osgGA::FlightManipulator osgGA::KeySwitchMatrixManipulator osgGA::NodeTrackerManipulator osgGA::TerrainManipulator osgGA::TrackballManipulator 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)
CoordinateFrameCallback * getCoordinateFrameCallback ()
const CoordinateFrameCallback * getCoordinateFrameCallback () 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
virtual void setNode (osg::Node *)
virtual const osg::Node * getNode () const
virtual osg::Node * getNode ()
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 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
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, and osgGA::TrackballManipulator.

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

Compute the home position.

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

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.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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, and osgGA::TrackballManipulator.

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.

Reimplemented in osgGA::KeySwitchMatrixManipulator.

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.

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, and osgGA::TrackballManipulator.


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]
 

double osgGA::MatrixManipulator::_minimumDistance [protected]
 


The documentation for this class was generated from the following file:
Generated on Fri May 13 15:15:50 2005 for openscenegraph by  doxygen 1.4.2