|
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_ODE_H_ |
|
24 #define _ODE_ODE_H_ |
|
25 |
|
26 /* include *everything* here */ |
|
27 |
|
28 #include <ode/config.h> |
|
29 #include <ode/compatibility.h> |
|
30 #include <ode/common.h> |
|
31 #include <ode/contact.h> |
|
32 #include <ode/error.h> |
|
33 #include <ode/memory.h> |
|
34 #include <ode/odemath.h> |
|
35 #include <ode/matrix.h> |
|
36 #include <ode/timer.h> |
|
37 #include <ode/rotation.h> |
|
38 #include <ode/mass.h> |
|
39 #include <ode/misc.h> |
|
40 #include <ode/objects.h> |
|
41 //#include "odecpp.h" |
|
42 #include <ode/collision_space.h> |
|
43 #include <ode/collision.h> |
|
44 //#include "odecpp_collision.h" |
|
45 |
|
46 struct dxPosR; |
|
47 |
|
48 // function pointers and modes for n^2 class collider functions |
|
49 |
|
50 struct dColliderEntry { |
|
51 dColliderFn *fn; // collider function, 0 = no function available |
|
52 int reverse; // 1 = reverse o1 and o2 |
|
53 }; |
|
54 |
|
55 // MAXNUM is the array size for events used by the test timer for debugging |
|
56 // purposes. This value was decreased from 100 to 1 to reduce the amount |
|
57 // of WSD used by ODE. If the timer is used ("TIMING" flag defined) then also |
|
58 // this value has to be increased. |
|
59 #define MAXNUM 1 |
|
60 |
|
61 struct TEventData |
|
62 { |
|
63 unsigned long cc[2]; // clock counts |
|
64 double total_t; // total clocks used in this slot. |
|
65 double total_p; // total percentage points used in this slot. |
|
66 int count; // number of times this slot has been updated. |
|
67 char *description; // pointer to static string |
|
68 }; |
|
69 |
|
70 // struct used to overcome writable static data |
|
71 struct TOdeStaticData |
|
72 { |
|
73 dxPosR* s_cachedPosR; |
|
74 int colliders_initialized; |
|
75 int num_user_classes; |
|
76 dGeomClass user_classes [dMaxUserClasses]; |
|
77 dMessageFunction *error_function; |
|
78 dMessageFunction *debug_function; |
|
79 dMessageFunction *message_function; |
|
80 dAllocFunction *allocfn; |
|
81 dReallocFunction *reallocfn; |
|
82 dFreeFunction *freefn; |
|
83 int autoEnableDepth; |
|
84 int num; |
|
85 unsigned long seed; |
|
86 dColliderEntry colliders[dGeomNumClasses][dGeomNumClasses]; |
|
87 bool hit; |
|
88 struct TEventData event[MAXNUM]; |
|
89 }; |
|
90 |
|
91 struct TOdeStaticData* GetGlobalData(); |
|
92 |
|
93 #endif |