diff options
author | dan miller | 2007-10-19 05:20:48 +0000 |
---|---|---|
committer | dan miller | 2007-10-19 05:20:48 +0000 |
commit | d48ea5bb797037069d641da41da0f195f0124491 (patch) | |
tree | 40ff433d94859d629aac933d5ec73b382f62ba1a /libraries/ode-0.9/contrib/dRay/dxRay.h | |
parent | dont ask (diff) | |
download | opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.zip opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.tar.gz opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.tar.bz2 opensim-SC-d48ea5bb797037069d641da41da0f195f0124491.tar.xz |
one more for the gipper
Diffstat (limited to '')
-rw-r--r-- | libraries/ode-0.9/contrib/dRay/dxRay.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libraries/ode-0.9/contrib/dRay/dxRay.h b/libraries/ode-0.9/contrib/dRay/dxRay.h new file mode 100644 index 0000000..0fd1d2d --- /dev/null +++ b/libraries/ode-0.9/contrib/dRay/dxRay.h | |||
@@ -0,0 +1,32 @@ | |||
1 | struct dxRay{ | ||
2 | dReal Length; | ||
3 | }; | ||
4 | |||
5 | inline void Decompose(const dMatrix3 Matrix, dVector3 Right, dVector3 Up, dVector3 Direction){ | ||
6 | Right[0] = Matrix[0 * 4 + 0]; | ||
7 | Right[1] = Matrix[1 * 4 + 0]; | ||
8 | Right[2] = Matrix[2 * 4 + 0]; | ||
9 | Right[3] = Matrix[3 * 4 + 0]; | ||
10 | Up[0] = Matrix[0 * 4 + 1]; | ||
11 | Up[1] = Matrix[1 * 4 + 1]; | ||
12 | Up[2] = Matrix[2 * 4 + 1]; | ||
13 | Up[3] = Matrix[3 * 4 + 1]; | ||
14 | Direction[0] = Matrix[0 * 4 + 2]; | ||
15 | Direction[1] = Matrix[1 * 4 + 2]; | ||
16 | Direction[2] = Matrix[2 * 4 + 2]; | ||
17 | Direction[3] = Matrix[3 * 4 + 2]; | ||
18 | } | ||
19 | |||
20 | inline void Decompose(const dMatrix3 Matrix, dVector3 Vectors[3]){ | ||
21 | Decompose(Matrix, Vectors[0], Vectors[1], Vectors[2]); | ||
22 | } | ||
23 | |||
24 | inline dContactGeom* CONTACT(int Flags, dContactGeom* Contacts, int Index, int Stride){ | ||
25 | dIASSERT(Index >= 0 && Index < (Flags & 0x0ffff)); | ||
26 | return ((dContactGeom*)(((char*)Contacts) + (Index * Stride))); | ||
27 | } | ||
28 | |||
29 | int dCollidePR(dxGeom* RayGeom, dxGeom* PlaneGeom, int Flags, dContactGeom* Contacts, int Stride); | ||
30 | int dCollideSR(dxGeom* RayGeom, dxGeom* SphereGeom, int Flags, dContactGeom* Contacts, int Stride); | ||
31 | int dCollideBR(dxGeom* RayGeom, dxGeom* BoxGeom, int Flags, dContactGeom* Contacts, int Stride); | ||
32 | int dCollideCCR(dxGeom* RayGeom, dxGeom* CCylinderGeom, int Flags, dContactGeom* Contacts, int Stride); \ No newline at end of file | ||