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

gfx::TrackballManipulator Class Reference

Inheritance diagram for gfx::TrackballManipulator:

Inheritance graph
[legend]
Collaboration diagram for gfx::TrackballManipulator:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TrackballManipulator ()
virtual const char * className () const
virtual void setByMatrix (const osg::Matrixd &matrix)
virtual void setByInverseMatrix (const osg::Matrixd &matrix)
virtual osg::Matrixd getMatrix () const
virtual osg::Matrixd getInverseMatrix () const
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 home (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
void setModelScale (float scale)
virtual void init (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us)
virtual void getUsage (osg::ApplicationUsage &usage) const
void computePosition (const osg::Vec3 &eye, const osg::Vec3 &lv, const osg::Vec3 &up)

Protected Member Functions

virtual ~TrackballManipulator ()
void flushMouseEventStack ()
void addMouseEvent (const osgGA::GUIEventAdapter &ea)
bool calcMovement ()
void trackball (osg::Vec3 &axis, float &angle, float p1x, float p1y, float p2x, float p2y)
float tb_project_to_sphere (float r, float x, float y)
bool isMouseMoving ()

Protected Attributes

osg::ref_ptr< const osgGA::GUIEventAdapter > _ga_t1
osg::ref_ptr< const osgGA::GUIEventAdapter > _ga_t0
osg::ref_ptr< osg::Node > _node
float _modelScale
float _minimumZoomScale
bool _thrown
osg::Vec3 _center
osg::Quat _rotation
float _distance

Constructor & Destructor Documentation

gfx::TrackballManipulator::TrackballManipulator  ) 
 

virtual gfx::TrackballManipulator::~TrackballManipulator  )  [protected, virtual]
 


Member Function Documentation

void gfx::TrackballManipulator::addMouseEvent const osgGA::GUIEventAdapter &  ea  )  [protected]
 

Add the current mouse GUIEvent to internal stack.

bool gfx::TrackballManipulator::calcMovement  )  [protected]
 

For the give mouse movement calculate the movement of the camera. Return true is camera has moved and a redraw is required.

virtual const char* gfx::TrackballManipulator::className  )  const [inline, virtual]
 

Definition at line 33 of file TrackballManipulator.

void gfx::TrackballManipulator::computePosition const osg::Vec3 &  eye,
const osg::Vec3 &  lv,
const osg::Vec3 &  up
 

void gfx::TrackballManipulator::flushMouseEventStack  )  [protected]
 

Reset the internal GUIEvent stack.

virtual osgUtil::SceneView::FusionDistanceMode gfx::TrackballManipulator::getFusionDistanceMode  )  const [inline, virtual]
 

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

Definition at line 48 of file TrackballManipulator.

virtual float gfx::TrackballManipulator::getFusionDistanceValue  )  const [inline, virtual]
 

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

Definition at line 51 of file TrackballManipulator.

References _distance.

virtual osg::Matrixd gfx::TrackballManipulator::getInverseMatrix  )  const [virtual]
 

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

virtual osg::Matrixd gfx::TrackballManipulator::getMatrix  )  const [virtual]
 

get the position of the manipulator as 4x4 Matrix.

virtual osg::Node* gfx::TrackballManipulator::getNode  )  [virtual]
 

Return node if attached.

virtual const osg::Node* gfx::TrackballManipulator::getNode  )  const [virtual]
 

Return node if attached.

virtual void gfx::TrackballManipulator::getUsage osg::ApplicationUsage &  usage  )  const [virtual]
 

Get the keyboard and mouse usage of this manipulator.

virtual bool gfx::TrackballManipulator::handle const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  us
[virtual]
 

handle events, return true if handled, false otherwise.

virtual void gfx::TrackballManipulator::home const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  us
[virtual]
 

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

virtual void gfx::TrackballManipulator::init const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  us
[virtual]
 

Start/restart the manipulator.

bool gfx::TrackballManipulator::isMouseMoving  )  [protected]
 

Check the speed at which the mouse is moving. If speed is below a threshold then return false, otherwise return true.

virtual void gfx::TrackballManipulator::setByInverseMatrix const osg::Matrixd &  matrix  )  [inline, virtual]
 

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

Definition at line 39 of file TrackballManipulator.

References setByMatrix().

virtual void gfx::TrackballManipulator::setByMatrix const osg::Matrixd &  matrix  )  [virtual]
 

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

Referenced by setByInverseMatrix().

void gfx::TrackballManipulator::setModelScale float  scale  )  [inline]
 

Definition at line 69 of file TrackballManipulator.

References _modelScale.

virtual void gfx::TrackballManipulator::setNode osg::Node *   )  [virtual]
 

Attach a node to the manipulator. Automatically detaches previously attached node. setNode(NULL) detaches previously nodes. Is ignored by manipulators which do not require a reference model.

float gfx::TrackballManipulator::tb_project_to_sphere float  r,
float  x,
float  y
[protected]
 

void gfx::TrackballManipulator::trackball osg::Vec3 &  axis,
float &  angle,
float  p1x,
float  p1y,
float  p2x,
float  p2y
[protected]
 


Member Data Documentation

osg::Vec3 gfx::TrackballManipulator::_center [protected]
 

Definition at line 113 of file TrackballManipulator.

float gfx::TrackballManipulator::_distance [protected]
 

Definition at line 115 of file TrackballManipulator.

Referenced by getFusionDistanceValue().

osg::ref_ptr<const osgGA::GUIEventAdapter> gfx::TrackballManipulator::_ga_t0 [protected]
 

Definition at line 104 of file TrackballManipulator.

osg::ref_ptr<const osgGA::GUIEventAdapter> gfx::TrackballManipulator::_ga_t1 [protected]
 

Definition at line 103 of file TrackballManipulator.

float gfx::TrackballManipulator::_minimumZoomScale [protected]
 

Definition at line 109 of file TrackballManipulator.

float gfx::TrackballManipulator::_modelScale [protected]
 

Definition at line 108 of file TrackballManipulator.

Referenced by setModelScale().

osg::ref_ptr<osg::Node> gfx::TrackballManipulator::_node [protected]
 

Definition at line 106 of file TrackballManipulator.

osg::Quat gfx::TrackballManipulator::_rotation [protected]
 

Definition at line 114 of file TrackballManipulator.

bool gfx::TrackballManipulator::_thrown [protected]
 

Definition at line 111 of file TrackballManipulator.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:39:53 2004 for OpenSim by doxygen 1.3.6