Fovia's C++ Client/Server API
|
Public Member Functions | |
QUATD | add (const QUATD &b) |
double | B1 (double t) |
double | B2 (double t) |
double | B3 (double t) |
double | B4 (double t) |
double | dot (const QUATD &a) |
QUATD | exp () |
QUATD | innerQuadPoint (QUATD &q0, QUATD &q1, QUATD &q2) |
void | invert () |
QUATD | lerp (QUATD &b, double t) |
QUATD | log () |
QUATD | mul (const QUATD &b) |
void | normalize () |
QUATD & | operator= (const QUATD &r) |
QUATD () | |
QUATD (double x, double y, double z, double w) | |
QUATD (const QUATD ©) | |
QUATD (double angle, const VECTOR3D &axis) | |
void | reset () |
QUATD | scale (double s) |
QUATD | scatrom (QUATD &prev, QUATD &b, QUATD &next, double t) |
void | setAxis (double degrees, double fX, double fY, double fZ) |
QUATD | slerp (QUATD &b, double t) |
QUATD | slerpNoInvert (QUATD &b, double t) |
QUATD | squad (QUATD &prev, QUATD &b, QUATD &next, double t) |
QUATD | sub (QUATD b) |
MATRIX44D | toMatrix () |
std::string | toString () |
Static Public Member Functions | |
static QUATD | quatFromBallPoints (const VECTOR3D &vFrom, const VECTOR3D &vTo) |
static QUATD | quatFromTrackBallPoints (const POINT &ptCenter, const POINT &ptPos, const POINT &ptPrev, double dRadius, double sensitivity) |
Public Attributes | |
double | w |
double | x |
double | y |
double | z |
Object that represents a quaternion with double precision floating point member fields.
|
inline |
Constructs a new quaternion. The member fields are not initialized.
|
inline |
|
inline |
Constructs a new quaternion where the member fields are copied from copy into the new object.
copy | The x,y,z,w members of this variable are copied into the new x,y,z,w member of the returned object. |
|
inline |
Constructs a new quaternion from the specified angle (in degrees) and axis pair.
angle | The angle in degrees of the new quaternion. |
axis | The axis of the new quaternion. |
References setAxis(), VECTOR3D::x, VECTOR3D::y, and VECTOR3D::z.
Returns the result of a quaternion add of this quaternion with the one contained in the parameter b.
b | The right hand side of the quaternion add operation. |
Referenced by innerQuadPoint(), lerp(), scatrom(), slerp(), and slerpNoInvert().
|
inline |
Returns the first Catmull-Rom interpolation coefficient for the value t.
t | The value before the start point in the Catmull-Rom interpolation. |
Referenced by scatrom().
|
inline |
Returns the second Catmull-Rom interpolation coefficient for the value t.
t | The start point in the Catmull-Rom interpolation. |
Referenced by scatrom().
|
inline |
Returns the third Catmull-Rom interpolation coefficient for the value t.
t | The finish point in the Catmull-Rom interpolation. |
Referenced by scatrom().
|
inline |
Returns the fourth Catmull-Rom interpolation coefficient for the value t.
t | The value after the finish point in the Catmull-Rom interpolation. |
Referenced by scatrom().
|
inline |
Returns the result of a quaternion dot product of this quaternion with the one contained in the parameter b.
a | The right hand side of the quaternion dot product operation. |
Referenced by scatrom(), slerp(), slerpNoInvert(), and squad().
|
inline |
Returns the exponent of this quaternion.
Referenced by innerQuadPoint().
|
inline |
Returns the result of a linear interpolation between this quaternion and the one contained in b. If t is 0, this quaternion is returned. If t is 1, the quaternion b is returned.
b | The quaternion that represents interpolation by a t value of 1. |
t | The interpolation coefficient. At t=0, this quaternion is returned. At t=1, b is returned. |
References add(), and scale().
Referenced by slerpNoInvert().
|
inline |
Returns the logarithm of this quaternion.
Referenced by innerQuadPoint().
Returns the result of a quaternion multiply of this quaternion with the one contained in the parameter b.
b | The right hand side of the quaternion multiply operation. |
Referenced by innerQuadPoint().
|
inline |
|
inlinestatic |
Returns a quaternion that represents the trackball rotation from point vFrom to point vTo.
vFrom | The start trackball location. |
vTo | The end trackball location. |
References w, VECTOR3D::x, x, VECTOR3D::y, y, VECTOR3D::z, and z.
Referenced by quatFromTrackBallPoints().
|
inlinestatic |
Returns a quaternion that represents the trackball rotation from point ptPrev to point ptPos.
ptCenter | The center of the virtual trackball. |
ptPos | The new location of the mouse. |
ptPrev | The previous location of the mouse. |
dRadius | The radius of the trackball. |
sensitivity | The sensitivity of the trackball. |
References quatFromBallPoints(), POINT::x, VECTOR3D::x, POINT::y, VECTOR3D::y, and VECTOR3D::z.
|
inline |
|
inline |
Returns a new quaternion where each member of the new quaternion is the result of the corresponding member of this object multiplied by s.
s | The value by which each member variable will be multiplied. |
Referenced by innerQuadPoint(), lerp(), normalize(), scatrom(), slerp(), slerpNoInvert(), and squad().
Performs spherical Catmull-Rom interpolation using this quaternion as the start point. This is useful in performing smooth interpolation between orientation vectors.
prev | The point before the this quaternion in the series. |
b | The point after this quaternion in the series. |
next | The next point after b in this series. |
t | The interpolation coefficient. If t=0, this quaternion is returned. If t=1, b is returned. |
References add(), B1(), B2(), B3(), B4(), dot(), and scale().
|
inline |
Sets the angle (in degrees) of this quaternion to degrees and the axis to fX, fY, fZ.
degrees | The angle in degrees to apply to this quaternion. |
fX | The x component of the axis to apply to this quaternion. |
fY | The y component of the axis to apply to this quaternion. |
fZ | The z component of the axis to apply to this quaternion. |
Referenced by QUATD().
Returns the result of a spherical linear interpolation (with inversion) between this quaternion and the one contained in b. If t is 0, this quaternion is returned. If t is 1, the quaternion b is returned.
b | The quaternion that represents interpolation by a t value of 1. |
t | The interpolation coefficient. At t=0, this quaternion is returned. At t=1, b is returned. |
References add(), dot(), and scale().
Referenced by squad().
Returns the result of a spherical linear interpolation (without inversion) between this quaternion and the one contained in b. If t is 0, this quaternion is returned. If t is 1, the quaternion b is returned.
b | The quaternion that represents interpolation by a t value of 1. |
t | The interpolation coefficient. At t=0, this quaternion is returned. At t=1, b is returned. |
References add(), dot(), lerp(), and scale().
Referenced by squad().
Performs spherical quadrangle interpolation using this quaternion as the start point. This is useful in performing smooth interpolation between orientation vectors.
prev | The point before the this quaternion in the series. |
b | The point after this quaternion in the series. |
next | The next point after b in this series. |
t | The interpolation coefficient. If t=0, this quaternion is returned. If t=1, b is returned. |
References dot(), innerQuadPoint(), scale(), slerp(), and slerpNoInvert().
|
inline |
|
inline |
double QUATD::w |
The w member field.
Referenced by add(), dot(), innerQuadPoint(), log(), mul(), normalize(), MATRIX44DtoQuat::operator()(), QUATD(), quatFromBallPoints(), reset(), scale(), setAxis(), sub(), toMatrix(), and toString().
double QUATD::x |
The x member field.
Referenced by add(), dot(), exp(), innerQuadPoint(), invert(), log(), mul(), normalize(), MATRIX44DtoQuat::operator()(), QUATD(), quatFromBallPoints(), reset(), scale(), setAxis(), sub(), toMatrix(), and toString().
double QUATD::y |
The y member field.
Referenced by add(), dot(), exp(), innerQuadPoint(), invert(), log(), mul(), normalize(), MATRIX44DtoQuat::operator()(), QUATD(), quatFromBallPoints(), reset(), scale(), setAxis(), sub(), toMatrix(), and toString().
double QUATD::z |
The z member field.
Referenced by add(), dot(), exp(), innerQuadPoint(), invert(), log(), mul(), normalize(), MATRIX44DtoQuat::operator()(), QUATD(), quatFromBallPoints(), reset(), scale(), setAxis(), sub(), toMatrix(), and toString().