source: OGRE/trunk/ogrenew/Dependencies/include/ode/rotation.h @ 657

Revision 657, 3.0 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
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
30extern "C" {
31#endif
32
33
34void dRSetIdentity (dMatrix3 R);
35
36void dRFromAxisAndAngle (dMatrix3 R, dReal ax, dReal ay, dReal az,
37                         dReal angle);
38
39void dRFromEulerAngles (dMatrix3 R, dReal phi, dReal theta, dReal psi);
40
41void dRFrom2Axes (dMatrix3 R, dReal ax, dReal ay, dReal az,
42                  dReal bx, dReal by, dReal bz);
43
44void dRFromZAxis (dMatrix3 R, dReal ax, dReal ay, dReal az);
45
46void dQSetIdentity (dQuaternion q);
47
48void 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 */
53void dQMultiply0 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc);
54/* qa = rotate by qc, then by inverse of qb */
55void dQMultiply1 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc);
56/* qa = rotate by inverse of qc, then by qb */
57void dQMultiply2 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc);
58/* qa = rotate by inverse of qc, then by inverse of qb */
59void dQMultiply3 (dQuaternion qa, const dQuaternion qb, const dQuaternion qc);
60
61void dRfromQ (dMatrix3 R, const dQuaternion q);
62void dQfromR (dQuaternion q, const dMatrix3 R);
63void dDQfromW (dReal dq[4], const dVector3 w, const dQuaternion q);
64
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif
Note: See TracBrowser for help on using the repository browser.