OpenSceneGraph 2.8.4
|
A UFO manipulator driven with keybindings. More...
Public Member Functions | |
UFOManipulator () | |
Default constructor. | |
virtual const char * | className () const |
return className | |
virtual void | setByMatrix (const osg::Matrixd &matrix) |
Set the current position with a matrix. | |
virtual void | setByInverseMatrix (const osg::Matrixd &invmat) |
Set the current position with the inverse matrix. | |
virtual osg::Matrixd | getMatrix () const |
Get the current viewmatrix. | |
virtual osg::Matrixd | getInverseMatrix () const |
Get the current inverse view matrix. | |
virtual void | setNode (osg::Node *node) |
Set the subgraph this manipulator is driving the eye through. | |
virtual const osg::Node * | getNode () const |
Get the root node of the subgraph this manipulator is driving the eye through (const) | |
virtual osg::Node * | getNode () |
Get the root node of the subgraph this manipulator is driving the eye through. | |
virtual void | computeHomePosition () |
Computes the home position based on the extents and scale of the scene graph rooted at node. | |
virtual void | home (const osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &) |
Sets the viewpoint matrix to the home position. | |
void | home (double) |
Move the camera to the default position. | |
virtual void | init (const GUIEventAdapter &, GUIActionAdapter &) |
Start/restart the manipulator. | |
bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa) |
Handles incoming osgGA events. | |
void | getUsage (osg::ApplicationUsage &usage) const |
Reports Usage parameters to the application. | |
void | getCurrentPositionAsLookAt (osg::Vec3 &eye, osg::Vec3 ¢er, osg::Vec3 &up) |
Report the current position as LookAt vectors. | |
void | setMinHeight (double in_min_height) |
double | getMinHeight () const |
void | setMinDistance (double in_min_dist) |
double | getMinDistance () const |
void | setForwardSpeed (double in_fs) |
double | getForwardSpeed () const |
void | setSideSpeed (double in_ss) |
double | getSideSpeed () const |
void | setRotationSpeed (double in_rot_speed) |
double | getRotationSpeed () const |
Protected Member Functions | |
virtual | ~UFOManipulator () |
bool | intersect (const osg::Vec3d &start, const osg::Vec3d &end, osg::Vec3d &intersection) const |
void | _stop () |
void | _keyDown (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &) |
void | _keyUp (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &) |
void | _frame (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &) |
void | _adjustPosition () |
Protected Attributes | |
osg::ref_ptr< osg::Node > | _node |
float | _viewAngle |
osg::Matrixd | _matrix |
osg::Matrixd | _inverseMatrix |
osg::Matrixd | _offset |
double | _minHeightAboveGround |
double | _minDistanceInFront |
double | _speedEpsilon |
double | _forwardSpeed |
double | _sideSpeed |
double | _upSpeed |
double | _speedAccelerationFactor |
double | _speedDecelerationFactor |
bool | _decelerateUpSideRate |
double | _directionRotationEpsilon |
double | _directionRotationRate |
double | _directionRotationAcceleration |
double | _directionRotationDeceleration |
double | _viewOffsetDelta |
double | _pitchOffsetRate |
double | _pitchOffset |
double | _yawOffsetRate |
double | _yawOffset |
double | _t0 |
double | _dt |
osg::Vec3d | _direction |
osg::Vec3d | _position |
bool | _shift |
bool | _ctrl |
bool | _decelerateOffsetRate |
bool | _straightenOffset |
A UFO manipulator driven with keybindings.
The UFOManipulator is better suited for applications that employ architectural walk-throughs, or situations where the eyepoint motion model must move slowly, deliberately and well controlled.
The UFO Manipulator allows the following movements with the listed Key combinations:
UpArrow | Acceleration forward. |
DownArrow | Acceleration backward (or deceleration forward). |
LeftArrow | Rotate view and direction of travel to the left. |
RightArrow | Rotate view and direction of travel to the right. |
SpaceBar | Brake. Gradually decelerates linear and rotational movement. |
Shift/UpArrow | Accelerate up. |
Shift/DownArrow | Accelerate down. |
Shift/LeftArrow | Accelerate (linearly) left. |
Shift/RightArrow | Accelerate (linearly) right. |
Shift/SpaceBar | Instant brake. Immediately stop all linear and rotational movement. |
When the Shift key is released, up, down, linear left and/or linear right movement is decelerated.
Ctrl/UpArrow | Rotate view (but not direction of travel) up. |
Ctrl/DownArrow | Rotate view (but not direction of travel) down. |
Ctrl/LeftArrow | Rotate view (but not direction of travel) left. |
Ctrl/RightArrow | Rotate view (but not direction of travel) right. |
Ctrl/Return | Straightens out the view offset. |
osgGA::UFOManipulator::UFOManipulator | ( | ) |
Default constructor.
virtual osgGA::UFOManipulator::~UFOManipulator | ( | ) | [protected, virtual] |
void osgGA::UFOManipulator::_adjustPosition | ( | ) | [protected] |
void osgGA::UFOManipulator::_frame | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | |||
) | [protected] |
void osgGA::UFOManipulator::_keyDown | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | |||
) | [protected] |
void osgGA::UFOManipulator::_keyUp | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | |||
) | [protected] |
void osgGA::UFOManipulator::_stop | ( | ) | [protected] |
virtual const char* osgGA::UFOManipulator::className | ( | ) | const [virtual] |
virtual void osgGA::UFOManipulator::computeHomePosition | ( | ) | [virtual] |
Computes the home position based on the extents and scale of the scene graph rooted at node.
Reimplemented from osgGA::MatrixManipulator.
void osgGA::UFOManipulator::getCurrentPositionAsLookAt | ( | osg::Vec3 & | eye, |
osg::Vec3 & | center, | ||
osg::Vec3 & | up | ||
) |
Report the current position as LookAt vectors.
double osgGA::UFOManipulator::getForwardSpeed | ( | ) | const [inline] |
virtual osg::Matrixd osgGA::UFOManipulator::getInverseMatrix | ( | ) | const [virtual] |
Get the current inverse view matrix.
Implements osgGA::MatrixManipulator.
virtual osg::Matrixd osgGA::UFOManipulator::getMatrix | ( | ) | const [virtual] |
Get the current viewmatrix.
Implements osgGA::MatrixManipulator.
double osgGA::UFOManipulator::getMinDistance | ( | ) | const [inline] |
double osgGA::UFOManipulator::getMinHeight | ( | ) | const [inline] |
virtual osg::Node* osgGA::UFOManipulator::getNode | ( | ) | [virtual] |
Get the root node of the subgraph this manipulator is driving the eye through.
Reimplemented from osgGA::MatrixManipulator.
virtual const osg::Node* osgGA::UFOManipulator::getNode | ( | ) | const [virtual] |
Get the root node of the subgraph this manipulator is driving the eye through (const)
Reimplemented from osgGA::MatrixManipulator.
double osgGA::UFOManipulator::getRotationSpeed | ( | ) | const [inline] |
double osgGA::UFOManipulator::getSideSpeed | ( | ) | const [inline] |
void osgGA::UFOManipulator::getUsage | ( | osg::ApplicationUsage & | usage | ) | const [virtual] |
Reports Usage parameters to the application.
Reimplemented from osgGA::GUIEventHandler.
bool osgGA::UFOManipulator::handle | ( | const osgGA::GUIEventAdapter & | ea, |
osgGA::GUIActionAdapter & | aa | ||
) | [virtual] |
Handles incoming osgGA events.
Reimplemented from osgGA::MatrixManipulator.
virtual void osgGA::UFOManipulator::home | ( | const osgGA::GUIEventAdapter & | , |
osgGA::GUIActionAdapter & | |||
) | [virtual] |
Sets the viewpoint matrix to the home position.
Reimplemented from osgGA::MatrixManipulator.
void osgGA::UFOManipulator::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::MatrixManipulator.
virtual void osgGA::UFOManipulator::init | ( | const GUIEventAdapter & | , |
GUIActionAdapter & | |||
) | [virtual] |
Start/restart the manipulator.
FIXME: what does this actually mean? Provide examples.
Reimplemented from osgGA::MatrixManipulator.
bool osgGA::UFOManipulator::intersect | ( | const osg::Vec3d & | start, |
const osg::Vec3d & | end, | ||
osg::Vec3d & | intersection | ||
) | const [protected] |
virtual void osgGA::UFOManipulator::setByInverseMatrix | ( | const osg::Matrixd & | invmat | ) | [virtual] |
Set the current position with the inverse matrix.
invmat | The inverse of a viewpoint matrix |
Implements osgGA::MatrixManipulator.
virtual void osgGA::UFOManipulator::setByMatrix | ( | const osg::Matrixd & | matrix | ) | [virtual] |
Set the current position with a matrix.
matrix | A viewpoint matrix. |
Implements osgGA::MatrixManipulator.
void osgGA::UFOManipulator::setForwardSpeed | ( | double | in_fs | ) | [inline] |
void osgGA::UFOManipulator::setMinDistance | ( | double | in_min_dist | ) | [inline] |
void osgGA::UFOManipulator::setMinHeight | ( | double | in_min_height | ) | [inline] |
virtual void osgGA::UFOManipulator::setNode | ( | osg::Node * | node | ) | [virtual] |
Set the subgraph this manipulator is driving the eye through.
node | root of subgraph |
Reimplemented from osgGA::MatrixManipulator.
void osgGA::UFOManipulator::setRotationSpeed | ( | double | in_rot_speed | ) | [inline] |
void osgGA::UFOManipulator::setSideSpeed | ( | double | in_ss | ) | [inline] |
bool osgGA::UFOManipulator::_ctrl [protected] |
bool osgGA::UFOManipulator::_decelerateOffsetRate [protected] |
bool osgGA::UFOManipulator::_decelerateUpSideRate [protected] |
osg::Vec3d osgGA::UFOManipulator::_direction [protected] |
double osgGA::UFOManipulator::_directionRotationAcceleration [protected] |
double osgGA::UFOManipulator::_directionRotationDeceleration [protected] |
double osgGA::UFOManipulator::_directionRotationEpsilon [protected] |
double osgGA::UFOManipulator::_directionRotationRate [protected] |
double osgGA::UFOManipulator::_dt [protected] |
double osgGA::UFOManipulator::_forwardSpeed [protected] |
osg::Matrixd osgGA::UFOManipulator::_inverseMatrix [protected] |
osg::Matrixd osgGA::UFOManipulator::_matrix [protected] |
double osgGA::UFOManipulator::_minDistanceInFront [protected] |
double osgGA::UFOManipulator::_minHeightAboveGround [protected] |
osg::ref_ptr<osg::Node> osgGA::UFOManipulator::_node [protected] |
osg::Matrixd osgGA::UFOManipulator::_offset [protected] |
double osgGA::UFOManipulator::_pitchOffset [protected] |
double osgGA::UFOManipulator::_pitchOffsetRate [protected] |
osg::Vec3d osgGA::UFOManipulator::_position [protected] |
bool osgGA::UFOManipulator::_shift [protected] |
double osgGA::UFOManipulator::_sideSpeed [protected] |
double osgGA::UFOManipulator::_speedAccelerationFactor [protected] |
double osgGA::UFOManipulator::_speedDecelerationFactor [protected] |
double osgGA::UFOManipulator::_speedEpsilon [protected] |
bool osgGA::UFOManipulator::_straightenOffset [protected] |
double osgGA::UFOManipulator::_t0 [protected] |
double osgGA::UFOManipulator::_upSpeed [protected] |
float osgGA::UFOManipulator::_viewAngle [protected] |
double osgGA::UFOManipulator::_viewOffsetDelta [protected] |
double osgGA::UFOManipulator::_yawOffset [protected] |
double osgGA::UFOManipulator::_yawOffsetRate [protected] |
![]() | Generated at Sun Jan 8 2012 13:16:35 for the OpenSceneGraph by doxygen 1.7.4. |