diff options
author | dan miller | 2007-10-19 05:24:38 +0000 |
---|---|---|
committer | dan miller | 2007-10-19 05:24:38 +0000 |
commit | f205de7847da7ae1c10212d82e7042d0100b4ce0 (patch) | |
tree | 9acc9608a6880502aaeda43af52c33e278e95b9c /libraries/ode-0.9/OPCODE/Ice/IceMatrix3x3.cpp | |
parent | trying to fix my screwup part deux (diff) | |
download | opensim-SC_OLD-f205de7847da7ae1c10212d82e7042d0100b4ce0.zip opensim-SC_OLD-f205de7847da7ae1c10212d82e7042d0100b4ce0.tar.gz opensim-SC_OLD-f205de7847da7ae1c10212d82e7042d0100b4ce0.tar.bz2 opensim-SC_OLD-f205de7847da7ae1c10212d82e7042d0100b4ce0.tar.xz |
from the start... checking in ode-0.9
Diffstat (limited to 'libraries/ode-0.9/OPCODE/Ice/IceMatrix3x3.cpp')
-rw-r--r-- | libraries/ode-0.9/OPCODE/Ice/IceMatrix3x3.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libraries/ode-0.9/OPCODE/Ice/IceMatrix3x3.cpp b/libraries/ode-0.9/OPCODE/Ice/IceMatrix3x3.cpp new file mode 100644 index 0000000..af56d3e --- /dev/null +++ b/libraries/ode-0.9/OPCODE/Ice/IceMatrix3x3.cpp | |||
@@ -0,0 +1,48 @@ | |||
1 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
2 | /** | ||
3 | * Contains code for 3x3 matrices. | ||
4 | * \file IceMatrix3x3.cpp | ||
5 | * \author Pierre Terdiman | ||
6 | * \date April, 4, 2000 | ||
7 | */ | ||
8 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
9 | |||
10 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
11 | /** | ||
12 | * 3x3 matrix. | ||
13 | * DirectX-compliant, ie row-column order, ie m[Row][Col]. | ||
14 | * Same as: | ||
15 | * m11 m12 m13 first row. | ||
16 | * m21 m22 m23 second row. | ||
17 | * m31 m32 m33 third row. | ||
18 | * Stored in memory as m11 m12 m13 m21... | ||
19 | * | ||
20 | * Multiplication rules: | ||
21 | * | ||
22 | * [x'y'z'] = [xyz][M] | ||
23 | * | ||
24 | * x' = x*m11 + y*m21 + z*m31 | ||
25 | * y' = x*m12 + y*m22 + z*m32 | ||
26 | * z' = x*m13 + y*m23 + z*m33 | ||
27 | * | ||
28 | * \class Matrix3x3 | ||
29 | * \author Pierre Terdiman | ||
30 | * \version 1.0 | ||
31 | */ | ||
32 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
33 | |||
34 | /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
35 | // Precompiled Header | ||
36 | #include "Stdafx.h" | ||
37 | |||
38 | using namespace IceMaths; | ||
39 | |||
40 | // Cast operator | ||
41 | Matrix3x3::operator Matrix4x4() const | ||
42 | { | ||
43 | return Matrix4x4( | ||
44 | m[0][0], m[0][1], m[0][2], 0.0f, | ||
45 | m[1][0], m[1][1], m[1][2], 0.0f, | ||
46 | m[2][0], m[2][1], m[2][2], 0.0f, | ||
47 | 0.0f, 0.0f, 0.0f, 1.0f); | ||
48 | } | ||