Path: | lib/ode/quaternion.rb (CVS) |
Last Update: | Wed Jul 27 19:46:00 EDT 2005 |
This file contains the ODE::Quaternion (3D spinor) class. Instances of this class represent the orientation of an object in an ODE::World simulation.
From the The Matrix and Quaternions FAQ (skal.planet-d.net/demo/matrixfaq.htm):
Quaternions extend the concept of rotation in three dimensions to rotation in four dimensions. This avoids the problem of "gimbal-lock" and allows for the implementation of smooth and continuous rotation. In effect, they may be considered to add a additional rotation angle to spherical coordinates ie. Longitude, Latitude and Rotation angles A Quaternion is defined using four floating point values |x y z w|. These are calculated from the combination of the three coordinates of the rotation axis and the rotation angle.
This class is based on the GLIT::Quat class from the alg3d library by Issac Trotts.
Based on the GLIT::Quat class from the ‘alg3d’ library by Issac Trotts. Used under the following licensing terms:
alg3d.rb : an any-dimensional vector and 3D spinor (quaternion) Copyright (c) 2001, 2003 Issac Trotts <itrotts at idolminds dot com> Under the Ruby license
Modifications, additional code, and any mistakes by Michael Granger <ged@FaerieMUD.org>.
Copyright © 2002, 2003 The FaerieMUD Consortium.
This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit creativecommons.org/licenses/by/1.0 or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
$Id: quaternion.rb 91 2005-07-27 23:45:01Z ged $