Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | Namespace Members | Class Members

ShortestAngleAttitudeCorrection Class Reference

#include <src/ShortestAngleAttitudeCorrection.h>

Inheritance diagram for ShortestAngleAttitudeCorrection:

Inheritance graph
[legend]
Collaboration diagram for ShortestAngleAttitudeCorrection:

Collaboration graph
[legend]
List of all members.

Detailed Description

Uses the shortest angle rotation to map the old forward vector to the new forward vector.

This should be equivalent to minimizing the change in the up vector in the OpenSteer Library, as we combine both of their rotations, but this is implemented with quaternions.

No costly acos or sin are used, the quaternion is found only with fast geometrical properties. See for example http://logiciels.cnes.fr/MARMOTTES/marmottes-mathematique.pdf for an explanation of the math used.

Care is taken for reconditionning the quaternion after too many rotations, when this becomes necessary.

Author:
Nicolas Brodu


Public Member Functions

virtual void updateAttitude (osg::Quat &newAttitude, const osg::Quat &oldAttitude, const osg::Vec3d &newForward, const osg::Vec3d &oldForward)


The documentation for this class was generated from the following files:
Generated on Mon Mar 28 11:27:45 2005 for Crogai by  doxygen 1.4.1