Oolite 1.91.0.7645-241119-222d325
|
#include "OOMaths.h"
Go to the source code of this file.
Functions | |
Quaternion | quaternion_multiply (Quaternion q1, Quaternion q2) |
void | quaternion_set_random (Quaternion *quat) |
Vector | vector_forward_from_quaternion (Quaternion quat) |
HPVector | HPvector_forward_from_quaternion (Quaternion quat) |
Vector | vector_up_from_quaternion (Quaternion quat) |
Vector | vector_right_from_quaternion (Quaternion quat) |
void | basis_vectors_from_quaternion (Quaternion quat, Vector *outRight, Vector *outUp, Vector *outForward) |
Quaternion | quaternion_rotation_between (Vector v0, Vector v1) |
Quaternion | quaternion_rotation_betweenHP (HPVector v0, HPVector v1) |
Quaternion | quaternion_limited_rotation_between (Vector v0, Vector v1, float maxArc) |
void | quaternion_rotate_about_x (Quaternion *quat, OOScalar angle) |
void | quaternion_rotate_about_y (Quaternion *quat, OOScalar angle) |
void | quaternion_rotate_about_z (Quaternion *quat, OOScalar angle) |
void | quaternion_rotate_about_axis (Quaternion *quat, Vector axis, OOScalar angle) |
Vector | quaternion_rotate_vector (Quaternion q, Vector v) |
HPVector | quaternion_rotate_HPvector (Quaternion q, HPVector v) |
Variables | |
const Quaternion | kIdentityQuaternion = { 1.0f, 0.0f, 0.0f, 0.0f } |
const Quaternion | kZeroQuaternion = { 0.0f, 0.0f, 0.0f, 0.0f } |
void basis_vectors_from_quaternion | ( | Quaternion | quat, |
Vector * | outRight, | ||
Vector * | outUp, | ||
Vector * | outForward ) |
Definition at line 145 of file OOQuaternion.m.
HPVector HPvector_forward_from_quaternion | ( | Quaternion | quat | ) |
Definition at line 83 of file OOQuaternion.m.
References vector_forward_from_quaternion().
Quaternion quaternion_limited_rotation_between | ( | Vector | v0, |
Vector | v1, | ||
float | maxArc ) |
Definition at line 257 of file OOQuaternion.m.
References EXPECT, and kIdentityQuaternion.
Referenced by VectorRotationTo().
Quaternion quaternion_multiply | ( | Quaternion | q1, |
Quaternion | q2 ) |
Definition at line 33 of file OOQuaternion.m.
Referenced by HeadUpDisplay::hudRotateViewpointForVirtualDepth, quaternion_rotate_about_axis(), and QuaternionMultiply().
void quaternion_rotate_about_axis | ( | Quaternion * | quat, |
Vector | axis, | ||
OOScalar | angle ) |
Definition at line 350 of file OOQuaternion.m.
References quaternion_multiply().
Referenced by OOLaserShotEntity::dealloc, HeadUpDisplay::hudRotateViewpointForVirtualDepth, and QuaternionRotate().
void quaternion_rotate_about_x | ( | Quaternion * | quat, |
OOScalar | angle ) |
Definition at line 293 of file OOQuaternion.m.
Referenced by QuaternionRotateX().
void quaternion_rotate_about_y | ( | Quaternion * | quat, |
OOScalar | angle ) |
Definition at line 312 of file OOQuaternion.m.
Referenced by QuaternionRotateY().
void quaternion_rotate_about_z | ( | Quaternion * | quat, |
OOScalar | angle ) |
Definition at line 331 of file OOQuaternion.m.
Referenced by QuaternionRotateZ().
HPVector quaternion_rotate_HPvector | ( | Quaternion | q, |
HPVector | v ) |
Definition at line 401 of file OOQuaternion.m.
Referenced by VectorRotateBy().
Vector quaternion_rotate_vector | ( | Quaternion | q, |
Vector | v ) |
Definition at line 385 of file OOQuaternion.m.
Quaternion quaternion_rotation_between | ( | Vector | v0, |
Vector | v1 ) |
Definition at line 195 of file OOQuaternion.m.
References EXPECT, kBasisZVector, and kIdentityQuaternion.
Referenced by VectorRotationTo().
Quaternion quaternion_rotation_betweenHP | ( | HPVector | v0, |
HPVector | v1 ) |
Definition at line 226 of file OOQuaternion.m.
References EXPECT, kBasisZHPVector, and kIdentityQuaternion.
void quaternion_set_random | ( | Quaternion * | quat | ) |
Definition at line 46 of file OOQuaternion.m.
References Ranrot().
Vector vector_forward_from_quaternion | ( | Quaternion | quat | ) |
Definition at line 57 of file OOQuaternion.m.
Referenced by ShipEntity::abandonShip, OOLaserShotEntity::dealloc, EntityGetProperty(), HPvector_forward_from_quaternion(), and QuaternionVectorForward().
Vector vector_right_from_quaternion | ( | Quaternion | quat | ) |
Definition at line 117 of file OOQuaternion.m.
Referenced by ShipEntity::abandonShip, and QuaternionVectorRight().
Vector vector_up_from_quaternion | ( | Quaternion | quat | ) |
Definition at line 89 of file OOQuaternion.m.
Referenced by ShipEntity::abandonShip, OOLaserShotEntity::dealloc, HeadUpDisplay::hudRotateViewpointForVirtualDepth, and QuaternionVectorUp().
const Quaternion kIdentityQuaternion = { 1.0f, 0.0f, 0.0f, 0.0f } |
Definition at line 29 of file OOQuaternion.m.
Referenced by OOLaserShotEntity::dealloc, PlayerShipSetCustomView(), quaternion_limited_rotation_between(), quaternion_rotation_between(), quaternion_rotation_betweenHP(), QuaternionConstruct(), Verify_Quaternion(), and WaypointGetProperty().
const Quaternion kZeroQuaternion = { 0.0f, 0.0f, 0.0f, 0.0f } |
Definition at line 30 of file OOQuaternion.m.
Referenced by JSObjectGetQuaternion(), Verify_Quaternion(), and WaypointGetProperty().