diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/ode-0.9/include/ode/rotation.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/libraries/ode-0.9/include/ode/rotation.h b/libraries/ode-0.9/include/ode/rotation.h new file mode 100644 index 0000000..a72be27 --- /dev/null +++ b/libraries/ode-0.9/include/ode/rotation.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /************************************************************************* | ||
2 | * * | ||
3 | * Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith. * | ||
4 | * All rights reserved. Email: russ@q12.org Web: www.q12.org * | ||
5 | * * | ||
6 | * This library is free software; you can redistribute it and/or * | ||
7 | * modify it under the terms of EITHER: * | ||
8 | * (1) The GNU Lesser General Public License as published by the Free * | ||
9 | * Software Foundation; either version 2.1 of the License, or (at * | ||
10 | * your option) any later version. The text of the GNU Lesser * | ||
11 | * General Public License is included with this library in the * | ||
12 | * file LICENSE.TXT. * | ||
13 | * (2) The BSD-style license that is included with this library in * | ||
14 | * the file LICENSE-BSD.TXT. * | ||
15 | * * | ||
16 | * This library is distributed in the hope that it will be useful, * | ||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files * | ||
19 | * LICENSE.TXT and LICENSE-BSD.TXT for more details. * | ||
20 | * * | ||
21 | *************************************************************************/ | ||
22 | |||
23 | #ifndef _ODE_ROTATION_H_ | ||
24 | #define _ODE_ROTATION_H_ | ||
25 | |||
26 | #include <ode/common.h> | ||
27 | #include <ode/compatibility.h> | ||
28 | |||
29 | #ifdef __cplusplus | ||
30 | extern "C" { | ||
31 | #endif | ||
32 | |||
33 | |||
34 | ODE_API void dRSetIdentity (dMatrix3 R); | ||
35 | |||
36 | ODE_API void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az, | ||
37 | dReal angle); | ||
38 | |||
39 | ODE_API void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi); | ||
40 | |||
41 | ODE_API void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az, | ||
42 | dReal bx, dReal by, dReal bz); | ||
43 | |||
44 | ODE_API void dRFromZAxis (dMatrix3 R, dReal ax, dReal ay, dReal az); | ||
45 | |||
46 | ODE_API void dQSetIdentity (dQuaternion q); | ||
47 | |||
48 | ODE_API void dQFromAxisAndAngle (dQuaternion q, dReal ax, dReal ay, dReal az, | ||
49 | dReal angle); | ||
50 | |||
51 | /* Quaternion multiplication, analogous to the matrix multiplication routines. */ | ||
52 | /* qa = rotate by qc, then qb */ | ||
53 | ODE_API void dQMultiply0 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); | ||
54 | /* qa = rotate by qc, then by inverse of qb */ | ||
55 | ODE_API void dQMultiply1 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); | ||
56 | /* qa = rotate by inverse of qc, then by qb */ | ||
57 | ODE_API void dQMultiply2 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); | ||
58 | /* qa = rotate by inverse of qc, then by inverse of qb */ | ||
59 | ODE_API void dQMultiply3 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc); | ||
60 | |||
61 | ODE_API void dRfromQ (dMatrix3 R, const dQuaternion q); | ||
62 | ODE_API void dQfromR (dQuaternion q, const dMatrix3 R); | ||
63 | ODE_API void dDQfromW (dReal dq[4], const dVector3 w, const dQuaternion q); | ||
64 | |||
65 | |||
66 | #ifdef __cplusplus | ||
67 | } | ||
68 | #endif | ||
69 | |||
70 | #endif | ||