#include <cameramanipulator.h>
Inherited by CameraManipulatorFollow, CameraManipulatorRace, and CameraManipulatorTV.
Inheritance diagram for CameraManipulator:


Public Member Functions | |
| CameraManipulator (osg::Node *node, GlobalData &global) | |
| virtual const char * | className () const |
| returns the classname of the manipulator it's NECCESSARY to define this funtion, otherwise the new manipulator WON'T WORK! (but ask me not why) | |
| virtual void | setByMatrix (const osg::Matrixd &matrix) |
| normally called only when this manipulator is choosed | |
| virtual void | setByInverseMatrix (const osg::Matrixd &matrix) |
| set the position of the matrix manipulator using a 4x4 Matrix. | |
| virtual osg::Matrixd | getMatrix () const |
| get the position of the manipulator as 4x4 Matrix. | |
| virtual osg::Matrixd | getInverseMatrix () const |
| get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix. | |
| virtual void | setNode (osg::Node *) |
| is called every time the draw is updated. | |
| virtual const osg::Node * | getNode () const |
| virtual osg::Node * | getNode () |
| virtual void | setHome (const osg::Vec3 &eye, const osg::Vec3 &view) |
| set the home position of the camera. (and place it there) | |
| virtual void | home (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) |
| place the camera at its home position | |
| 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 |
| Get the keyboard and mouse usage of this manipulator. | |
| virtual void | update () |
| updates the camera module at every drawstep should be called from the simulation loop | |
Protected Member Functions | |
| virtual | ~CameraManipulator () |
| virtual void | flushMouseEventStack () |
| Reset the internal GUIEvent stack. | |
| virtual void | addMouseEvent (const osgGA::GUIEventAdapter &ea) |
| Add the current mouse GUIEvent to internal stack. | |
| virtual void | computeMatrix () |
| virtual bool | calcMovement () |
| For the give mouse movement calculate the movement of the camera. | |
| virtual void | manageAgents (const int &fkey) |
| This manages the robots, switching between them and so on Is normally called from handle(...). | |
| virtual void | calcMovementByAgent () |
| This handles robot movements, so that the camera movemenent is right affected. | |
| virtual void | setHomeViewByAgent () |
| Sets the right view and eye if the robot has changed. | |
| virtual void | setHomeEyeByAgent () |
| virtual void | moveBehindAgent () |
| moves behind the robot which is actually watched | |
| virtual void | centerOnAgent () |
| centers on the robot which is actually watched | |
Protected Attributes | |
| osg::ref_ptr< const osgGA::GUIEventAdapter > | event_old |
| osg::ref_ptr< const osgGA::GUIEventAdapter > | event |
| osg::ref_ptr< osg::Node > | node |
| float | modelScale |
| osg::Matrixd | pose |
| GlobalData & | globalData |
| double | degreeSmoothness |
| double | lengthSmoothness |
| double | degreeAccuracy |
| double | lengthAccuracy |
Static Protected Attributes | |
| osg::Vec3 | eye |
| osg::Vec3 | view |
| osg::Vec3 | home_eye |
| osg::Vec3 | home_view |
| bool | home_externally_set = false |
| osg::Vec3 | desiredEye |
| osg::Vec3 | desiredView |
| OdeAgent * | watchingAgent |
| bool | watchingAgentDefined = false |
| Position | oldPositionOfAgent |
| bool | oldPositionOfAgentDefined = false |
| int | i |
Left mouse button: Pan and tilt Right mouse button: forward and sideways Middle mouse button: up and sideways
|
||||||||||||
|
|
|
|
|
|
|
Add the current mouse GUIEvent to internal stack.
|
|
|
For the give mouse movement calculate the movement of the camera. Return true is camera has moved and a redraw is required. |
|
|
This handles robot movements, so that the camera movemenent is right affected. should normally be overwritten by new cameramanipulator Reimplemented in CameraManipulatorFollow, CameraManipulatorRace, and CameraManipulatorTV.
|
|
|
centers on the robot which is actually watched
|
|
|
returns the classname of the manipulator it's NECCESSARY to define this funtion, otherwise the new manipulator WON'T WORK! (but ask me not why)
Reimplemented in CameraManipulatorFollow, CameraManipulatorRace, and CameraManipulatorTV.
|
|
|
|
|
|
Reset the internal GUIEvent stack.
|
|
|
get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.
|
|
|
get the position of the manipulator as 4x4 Matrix.
|
|
|
|
|
|
|
|
|
Get the keyboard and mouse usage of this manipulator.
|
|
||||||||||||
|
|
|
||||||||||||
|
place the camera at its home position
|
|
||||||||||||
|
|
|
|
This manages the robots, switching between them and so on Is normally called from handle(...).
|
|
|
moves behind the robot which is actually watched
|
|
|
set the position of the matrix manipulator using a 4x4 Matrix.
|
|
|
normally called only when this manipulator is choosed
|
|
||||||||||||
|
set the home position of the camera. (and place it there)
|
|
|
Reimplemented in CameraManipulatorTV.
|
|
|
Sets the right view and eye if the robot has changed. Is called from manageRobots(); should be overwritten by new cameramanipulator (if needed) Reimplemented in CameraManipulatorFollow, and CameraManipulatorTV.
|
|
|
is called every time the draw is updated. computes the movement of the camera, which is a difference between the desired pos and view and the actual pos and view. |
|
|
updates the camera module at every drawstep should be called from the simulation loop
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.8