#include <src/ShortestAngleAttitudeCorrection.h>
Inheritance diagram for ShortestAngleAttitudeCorrection:
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.
Public Member Functions | |
virtual void | updateAttitude (osg::Quat &newAttitude, const osg::Quat &oldAttitude, const osg::Vec3d &newForward, const osg::Vec3d &oldForward) |