OpenSceneGraph
3.0.1
|
FirstPersonManipulator is base class for camera control based on position and orientation of camera, like walk, drive, and flight manipulators. More...
Classes | |
class | FirstPersonAnimationData |
Public Member Functions | |
FirstPersonManipulator (int flags=DEFAULT_SETTINGS) | |
FirstPersonManipulator (const FirstPersonManipulator &fpm, const osg::CopyOp ©Op=osg::CopyOp::SHALLOW_COPY) | |
META_Object (osgGA, FirstPersonManipulator) | |
virtual void | setByMatrix (const osg::Matrixd &matrix) |
set the position of the matrix manipulator using a 4x4 Matrix. | |
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 | setTransformation (const osg::Vec3d &eye, const osg::Quat &rotation) |
Sets manipulator by eye position and eye orientation. | |
virtual void | setTransformation (const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up) |
Sets manipulator by eye position, center of rotation, and up vector. | |
virtual void | getTransformation (osg::Vec3d &eye, osg::Quat &rotation) const |
Gets manipulator's eye position and eye orientation. | |
virtual void | getTransformation (osg::Vec3d &eye, osg::Vec3d ¢er, osg::Vec3d &up) const |
Gets manipulator's focal center, eye position, and up vector. | |
virtual void | setVelocity (const double &velocity) |
double | getVelocity () const |
Returns velocity. | |
virtual void | setAcceleration (const double &acceleration, bool relativeToModelSize=false) |
double | getAcceleration (bool *relativeToModelSize=NULL) const |
virtual void | setMaxVelocity (const double &maxVelocity, bool relativeToModelSize=false) |
double | getMaxVelocity (bool *relativeToModelSize=NULL) const |
virtual void | setWheelMovement (const double &wheelMovement, bool relativeToModelSize=false) |
double | getWheelMovement (bool *relativeToModelSize=NULL) const |
virtual void | home (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) |
Move the camera to the default position. | |
virtual void | home (double) |
Move the camera to the default position. | |
virtual void | init (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) |
Start/restart the manipulator. | |
Protected Member Functions | |
virtual bool | handleMouseWheel (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) |
virtual bool | performMovementLeftMouseButton (const double eventTimeDelta, const double dx, const double dy) |
virtual bool | performMouseDeltaMovement (const float dx, const float dy) |
virtual void | applyAnimationStep (const double currentProgress, const double prevProgress) |
virtual bool | startAnimationByMousePointerIntersection (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &us) |
void | moveForward (const double distance) |
void | moveForward (const osg::Quat &rotation, const double distance) |
void | moveRight (const double distance) |
void | moveUp (const double distance) |
virtual void | allocAnimationData () |
Protected Attributes | |
osg::Vec3d | _eye |
osg::Quat | _rotation |
double | _velocity |
double | _acceleration |
double | _maxVelocity |
double | _wheelMovement |
Static Protected Attributes | |
static int | _accelerationFlagIndex |
static int | _maxVelocityFlagIndex |
static int | _wheelMovementFlagIndex |
FirstPersonManipulator is base class for camera control based on position and orientation of camera, like walk, drive, and flight manipulators.
osgGA::FirstPersonManipulator::FirstPersonManipulator | ( | int | flags = DEFAULT_SETTINGS | ) |
osgGA::FirstPersonManipulator::FirstPersonManipulator | ( | const FirstPersonManipulator & | fpm, |
const osg::CopyOp & | copyOp = osg::CopyOp::SHALLOW_COPY |
||
) |
virtual void osgGA::FirstPersonManipulator::allocAnimationData | ( | ) | [inline, protected, virtual] |
Reimplemented from osgGA::StandardManipulator.
virtual void osgGA::FirstPersonManipulator::applyAnimationStep | ( | const double | currentProgress, |
const double | prevProgress | ||
) | [protected, virtual] |
Reimplemented from osgGA::StandardManipulator.
double osgGA::FirstPersonManipulator::getAcceleration | ( | bool * | relativeToModelSize = NULL | ) | const |
virtual osg::Matrixd osgGA::FirstPersonManipulator::getInverseMatrix | ( | ) | const [virtual] |
get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.
Implements osgGA::CameraManipulator.
virtual osg::Matrixd osgGA::FirstPersonManipulator::getMatrix | ( | ) | const [virtual] |
get the position of the manipulator as 4x4 Matrix.
Implements osgGA::CameraManipulator.
double osgGA::FirstPersonManipulator::getMaxVelocity | ( | bool * | relativeToModelSize = NULL | ) | const |
virtual void osgGA::FirstPersonManipulator::getTransformation | ( | osg::Vec3d & | eye, |
osg::Quat & | rotation | ||
) | const [virtual] |
Gets manipulator's eye position and eye orientation.
Implements osgGA::StandardManipulator.
virtual void osgGA::FirstPersonManipulator::getTransformation | ( | osg::Vec3d & | eye, |
osg::Vec3d & | center, | ||
osg::Vec3d & | up | ||
) | const [virtual] |
Gets manipulator's focal center, eye position, and up vector.
Implements osgGA::StandardManipulator.
double osgGA::FirstPersonManipulator::getVelocity | ( | ) | const [inline] |
Returns velocity.
References _velocity.
double osgGA::FirstPersonManipulator::getWheelMovement | ( | bool * | relativeToModelSize = NULL | ) | const |
virtual bool osgGA::FirstPersonManipulator::handleMouseWheel | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | us | ||
) | [protected, virtual] |
Reimplemented from osgGA::StandardManipulator.
virtual void osgGA::FirstPersonManipulator::home | ( | const osgGA::GUIEventAdapter & | , |
osgGA::GUIActionAdapter & | |||
) | [virtual] |
Move the camera to the default position.
May be ignored by manipulators if home functionality is not appropriate.
Reimplemented from osgGA::StandardManipulator.
Reimplemented in osgGA::FlightManipulator.
virtual void osgGA::FirstPersonManipulator::home | ( | double | ) | [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 from osgGA::StandardManipulator.
virtual void osgGA::FirstPersonManipulator::init | ( | const osgGA::GUIEventAdapter & | , |
osgGA::GUIActionAdapter & | |||
) | [virtual] |
Start/restart the manipulator.
FIXME: what does this actually mean? Provide examples.
Reimplemented from osgGA::StandardManipulator.
Reimplemented in osgGA::FlightManipulator.
osgGA::FirstPersonManipulator::META_Object | ( | osgGA | , |
FirstPersonManipulator | |||
) |
void osgGA::FirstPersonManipulator::moveForward | ( | const double | distance | ) | [protected] |
void osgGA::FirstPersonManipulator::moveForward | ( | const osg::Quat & | rotation, |
const double | distance | ||
) | [protected] |
void osgGA::FirstPersonManipulator::moveRight | ( | const double | distance | ) | [protected] |
void osgGA::FirstPersonManipulator::moveUp | ( | const double | distance | ) | [protected] |
virtual bool osgGA::FirstPersonManipulator::performMouseDeltaMovement | ( | const float | dx, |
const float | dy | ||
) | [protected, virtual] |
Reimplemented from osgGA::StandardManipulator.
virtual bool osgGA::FirstPersonManipulator::performMovementLeftMouseButton | ( | const double | eventTimeDelta, |
const double | dx, | ||
const double | dy | ||
) | [protected, virtual] |
Reimplemented from osgGA::StandardManipulator.
Reimplemented in osgGA::FlightManipulator.
virtual void osgGA::FirstPersonManipulator::setAcceleration | ( | const double & | acceleration, |
bool | relativeToModelSize = false |
||
) | [virtual] |
virtual void osgGA::FirstPersonManipulator::setByInverseMatrix | ( | const osg::Matrixd & | matrix | ) | [virtual] |
set the position of the matrix manipulator using a 4x4 Matrix.
Implements osgGA::CameraManipulator.
virtual void osgGA::FirstPersonManipulator::setByMatrix | ( | const osg::Matrixd & | matrix | ) | [virtual] |
set the position of the matrix manipulator using a 4x4 Matrix.
Implements osgGA::CameraManipulator.
virtual void osgGA::FirstPersonManipulator::setMaxVelocity | ( | const double & | maxVelocity, |
bool | relativeToModelSize = false |
||
) | [virtual] |
virtual void osgGA::FirstPersonManipulator::setTransformation | ( | const osg::Vec3d & | eye, |
const osg::Quat & | rotation | ||
) | [virtual] |
Sets manipulator by eye position and eye orientation.
Implements osgGA::StandardManipulator.
virtual void osgGA::FirstPersonManipulator::setTransformation | ( | const osg::Vec3d & | eye, |
const osg::Vec3d & | center, | ||
const osg::Vec3d & | up | ||
) | [virtual] |
Sets manipulator by eye position, center of rotation, and up vector.
Implements osgGA::StandardManipulator.
virtual void osgGA::FirstPersonManipulator::setVelocity | ( | const double & | velocity | ) | [virtual] |
virtual void osgGA::FirstPersonManipulator::setWheelMovement | ( | const double & | wheelMovement, |
bool | relativeToModelSize = false |
||
) | [virtual] |
virtual bool osgGA::FirstPersonManipulator::startAnimationByMousePointerIntersection | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | us | ||
) | [protected, virtual] |
Reimplemented from osgGA::StandardManipulator.
double osgGA::FirstPersonManipulator::_acceleration [protected] |
int osgGA::FirstPersonManipulator::_accelerationFlagIndex [static, protected] |
osg::Vec3d osgGA::FirstPersonManipulator::_eye [protected] |
double osgGA::FirstPersonManipulator::_maxVelocity [protected] |
int osgGA::FirstPersonManipulator::_maxVelocityFlagIndex [static, protected] |
osg::Quat osgGA::FirstPersonManipulator::_rotation [protected] |
double osgGA::FirstPersonManipulator::_velocity [protected] |
Referenced by getVelocity().
double osgGA::FirstPersonManipulator::_wheelMovement [protected] |
int osgGA::FirstPersonManipulator::_wheelMovementFlagIndex [static, protected] |
![]() | Generated at Mon Oct 3 2011 12:39:47 for the OpenSceneGraph by doxygen 1.7.5. |