diff options
Diffstat (limited to 'libraries/ode-0.9/contrib/DotNetManaged/JointHinge.h')
-rw-r--r-- | libraries/ode-0.9/contrib/DotNetManaged/JointHinge.h | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/libraries/ode-0.9/contrib/DotNetManaged/JointHinge.h b/libraries/ode-0.9/contrib/DotNetManaged/JointHinge.h new file mode 100644 index 0000000..3115845 --- /dev/null +++ b/libraries/ode-0.9/contrib/DotNetManaged/JointHinge.h | |||
@@ -0,0 +1,195 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "Joint.h" | ||
4 | #include "CommonMgd.h" | ||
5 | |||
6 | namespace ODEManaged | ||
7 | { | ||
8 | __gc public class JointHinge : public Joint | ||
9 | { | ||
10 | public: | ||
11 | |||
12 | //Constructors | ||
13 | |||
14 | JointHinge(void); | ||
15 | JointHinge(World &world); | ||
16 | JointHinge(World &world, JointGroup &jointGroup); | ||
17 | |||
18 | |||
19 | //Destructor | ||
20 | |||
21 | virtual~JointHinge(void); | ||
22 | |||
23 | |||
24 | //Methods | ||
25 | |||
26 | //Overloaded Create | ||
27 | void Create(World &world, JointGroup &jointGroup); | ||
28 | void Create(World &world); | ||
29 | |||
30 | //Overloaded Attach | ||
31 | void Attach(Body &body1, Body &body2); | ||
32 | void Attach(Body &body1); | ||
33 | |||
34 | void SetAnchor(double x, double y, double z); | ||
35 | Vector3 GetAnchor(void); | ||
36 | |||
37 | void SetAxis(double x, double y, double z); | ||
38 | Vector3 GetAxis(void); | ||
39 | |||
40 | void SetAllMovParams(double LoStop, double HiStop, | ||
41 | double Velocity, double MaxForce, | ||
42 | double FudgeFactor, double Bounce, | ||
43 | double StopERP, double StopCFM); | ||
44 | |||
45 | |||
46 | //Properties | ||
47 | |||
48 | //LoStop | ||
49 | __property double get_LoStop(void) | ||
50 | { | ||
51 | return dJointGetHingeParam(this->_id, dParamLoStop); | ||
52 | } | ||
53 | |||
54 | __property void set_LoStop(double value) | ||
55 | { | ||
56 | if (value > -3.141592653 && value <= 0) | ||
57 | dJointSetHingeParam(this->_id, dParamLoStop, value); | ||
58 | } | ||
59 | |||
60 | |||
61 | //HiStop | ||
62 | __property double get_HiStop(void) | ||
63 | { | ||
64 | return dJointGetHingeParam(this->_id, dParamHiStop); | ||
65 | } | ||
66 | |||
67 | __property void set_HiStop(double value) | ||
68 | { | ||
69 | if (value < 3.141592653 && value >= 0) | ||
70 | dJointSetHingeParam(this->_id, dParamHiStop, value); | ||
71 | } | ||
72 | |||
73 | |||
74 | //Velocity | ||
75 | __property double get_Velocity(void) | ||
76 | { | ||
77 | return dJointGetHingeParam(this->_id, dParamVel); | ||
78 | } | ||
79 | |||
80 | __property void set_Velocity(double value) | ||
81 | { | ||
82 | dJointSetHingeParam(this->_id, dParamVel, value); | ||
83 | } | ||
84 | |||
85 | |||
86 | //MaxForce | ||
87 | __property double get_MaxForce(void) | ||
88 | { | ||
89 | return dJointGetHingeParam(this->_id, dParamFMax); | ||
90 | } | ||
91 | |||
92 | __property void set_MaxForce(double value) | ||
93 | { | ||
94 | dJointSetHingeParam(this->_id, dParamFMax, value); | ||
95 | } | ||
96 | |||
97 | |||
98 | //FudgeFactor | ||
99 | __property double get_FudgeFactor(void) | ||
100 | { | ||
101 | return dJointGetHingeParam(this->_id, dParamFudgeFactor); | ||
102 | } | ||
103 | |||
104 | __property void set_FudgeFactor(double value) | ||
105 | { | ||
106 | dJointSetHingeParam(this->_id, dParamFudgeFactor, value); | ||
107 | } | ||
108 | |||
109 | |||
110 | //Bounce | ||
111 | __property double get_Bounce(void) | ||
112 | { | ||
113 | return dJointGetHingeParam(this->_id, dParamBounce); | ||
114 | } | ||
115 | |||
116 | __property void set_Bounce(double value) | ||
117 | { | ||
118 | dJointSetHingeParam(this->_id, dParamBounce, value); | ||
119 | } | ||
120 | |||
121 | |||
122 | //StopERP | ||
123 | __property double get_StopERP(void) | ||
124 | { | ||
125 | return dJointGetHingeParam(this->_id, dParamStopERP); | ||
126 | } | ||
127 | |||
128 | __property void set_StopERP(double value) | ||
129 | { | ||
130 | dJointSetHingeParam(this->_id, dParamStopERP, value); | ||
131 | } | ||
132 | |||
133 | |||
134 | //StopCFM | ||
135 | __property double get_StopCFM(void) | ||
136 | { | ||
137 | return dJointGetHingeParam(this->_id, dParamStopCFM); | ||
138 | } | ||
139 | |||
140 | __property void set_StopCFM(double value) | ||
141 | { | ||
142 | dJointSetHingeParam(this->_id, dParamStopCFM, value); | ||
143 | } | ||
144 | |||
145 | |||
146 | //GetAngle | ||
147 | __property double get_Angle(void) | ||
148 | { | ||
149 | return dJointGetHingeAngle(this->_id); | ||
150 | } | ||
151 | |||
152 | |||
153 | //GetAngleRate | ||
154 | __property double get_AngleRate(void) | ||
155 | { | ||
156 | return dJointGetHingeAngleRate(this->_id); | ||
157 | } | ||
158 | |||
159 | }; | ||
160 | |||
161 | } | ||
162 | |||
163 | // void SetSuspensionERP(double value); | ||
164 | // double GetSuspensionERP(void); | ||
165 | |||
166 | // void SetSuspensionCFM(double value); | ||
167 | // double GetSuspensionCFM(void); | ||
168 | |||
169 | /* | ||
170 | //SetSuspensionERP | ||
171 | void JointHinge::SetSuspensionERP(double value) | ||
172 | { | ||
173 | dJointSetHingeParam(this->_id, dParamSuspensionERP, value); | ||
174 | } | ||
175 | |||
176 | //GetSuspensionERP | ||
177 | double JointHinge::GetSuspensionERP(void) | ||
178 | { | ||
179 | return dJointGetHingeParam(this->_id, dParamSuspensionERP); | ||
180 | } | ||
181 | |||
182 | |||
183 | //SetSuspensionCFM | ||
184 | void JointHinge::SetSuspensionCFM(double value) | ||
185 | { | ||
186 | dJointSetHingeParam(this->_id, dParamSuspensionCFM, value); | ||
187 | } | ||
188 | |||
189 | //GetSuspensionCFM | ||
190 | double JointHinge::GetSuspensionCFM(void) | ||
191 | { | ||
192 | return dJointGetHingeParam(this->_id, dParamSuspensionCFM); | ||
193 | } | ||
194 | |||
195 | */ | ||