1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
3 | <title>Open Dynamics Engine: World</title> |
---|
4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
6 | </head><body> |
---|
7 | <!-- Generated by Doxygen 1.5.3 --> |
---|
8 | <div class="tabs"> |
---|
9 | <ul> |
---|
10 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
11 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
12 | <li><a href="annotated.html"><span>Data Structures</span></a></li> |
---|
13 | <li><a href="files.html"><span>Files</span></a></li> |
---|
14 | </ul> |
---|
15 | </div> |
---|
16 | <h1>World</h1><table border="0" cellpadding="0" cellspacing="0"> |
---|
17 | <tr><td></td></tr> |
---|
18 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
---|
19 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dWorldID </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g929067266d630fb745f752042d685fc7">dWorldCreate</a> (void)</td></tr> |
---|
20 | |
---|
21 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Create a new, empty world and return its ID number. <a href="#g929067266d630fb745f752042d685fc7"></a><br></td></tr> |
---|
22 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g5a2e5b1d2d6a1376dca239b488e629f9">dWorldDestroy</a> (dWorldID world)</td></tr> |
---|
23 | |
---|
24 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Destroy a world and everything in it. <a href="#g5a2e5b1d2d6a1376dca239b488e629f9"></a><br></td></tr> |
---|
25 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga1b220b922215b335572c699cf8f8cad">dWorldSetGravity</a> (dWorldID, dReal x, dReal y, dReal z)</td></tr> |
---|
26 | |
---|
27 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the world's global gravity vector. <a href="#ga1b220b922215b335572c699cf8f8cad"></a><br></td></tr> |
---|
28 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge1a29b6a91cc1910a982c916ae4dee4a"></a><!-- doxytag: member="world::dWorldGetGravity" ref="ge1a29b6a91cc1910a982c916ae4dee4a" args="(dWorldID, dVector3 gravity)" --> |
---|
29 | ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ge1a29b6a91cc1910a982c916ae4dee4a">dWorldGetGravity</a> (dWorldID, dVector3 gravity)</td></tr> |
---|
30 | |
---|
31 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the gravity vector for a given world. <br></td></tr> |
---|
32 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gacd0778bdaa939d22f093fc2d5d5f868">dWorldSetERP</a> (dWorldID, dReal erp)</td></tr> |
---|
33 | |
---|
34 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the global ERP value, that controls how much error correction is performed in each time step. <a href="#gacd0778bdaa939d22f093fc2d5d5f868"></a><br></td></tr> |
---|
35 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g033cd87a0b22889a94d4d84149bda5a0">dWorldGetERP</a> (dWorldID)</td></tr> |
---|
36 | |
---|
37 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the error reduction parameter. <a href="#g033cd87a0b22889a94d4d84149bda5a0"></a><br></td></tr> |
---|
38 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g8b7913fe46d0afc468418c655da79233">dWorldSetCFM</a> (dWorldID, dReal cfm)</td></tr> |
---|
39 | |
---|
40 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the global CFM (constraint force mixing) value. <a href="#g8b7913fe46d0afc468418c655da79233"></a><br></td></tr> |
---|
41 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gc7a431f2b3fc6f887fe91ad676828ba3">dWorldGetCFM</a> (dWorldID)</td></tr> |
---|
42 | |
---|
43 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the constraint force mixing value. <a href="#gc7a431f2b3fc6f887fe91ad676828ba3"></a><br></td></tr> |
---|
44 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g8f547ebeb3deed27e0f7b8143d475f50">dWorldStep</a> (dWorldID, dReal stepsize)</td></tr> |
---|
45 | |
---|
46 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Step the world. <a href="#g8f547ebeb3deed27e0f7b8143d475f50"></a><br></td></tr> |
---|
47 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga9c564b4dd7d8fa4c6f4b32dd95fc33a">dWorldImpulseToForce</a> (dWorldID, dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force)</td></tr> |
---|
48 | |
---|
49 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Converts an impulse to a force. <a href="#ga9c564b4dd7d8fa4c6f4b32dd95fc33a"></a><br></td></tr> |
---|
50 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gc24fadc1d42b65ca3563e40bc1f0fec1">dWorldQuickStep</a> (dWorldID w, dReal stepsize)</td></tr> |
---|
51 | |
---|
52 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Step the world. <a href="#gc24fadc1d42b65ca3563e40bc1f0fec1"></a><br></td></tr> |
---|
53 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g9d852689d87d28a3d4947eda59c5ba7e">dWorldSetQuickStepNumIterations</a> (dWorldID, int num)</td></tr> |
---|
54 | |
---|
55 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the number of iterations that the QuickStep method performs per step. <a href="#g9d852689d87d28a3d4947eda59c5ba7e"></a><br></td></tr> |
---|
56 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga51acfac06347fd27ff926d37672ce3c">dWorldGetQuickStepNumIterations</a> (dWorldID)</td></tr> |
---|
57 | |
---|
58 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the number of iterations that the QuickStep method performs per step. <a href="#ga51acfac06347fd27ff926d37672ce3c"></a><br></td></tr> |
---|
59 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gf741ee61e3f9981ae102729f23aad535">dWorldSetQuickStepW</a> (dWorldID, dReal over_relaxation)</td></tr> |
---|
60 | |
---|
61 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the SOR over-relaxation parameter. <a href="#gf741ee61e3f9981ae102729f23aad535"></a><br></td></tr> |
---|
62 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#ga7fef06f7a8293f21778939dfea36951">dWorldGetQuickStepW</a> (dWorldID)</td></tr> |
---|
63 | |
---|
64 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the SOR over-relaxation parameter. <a href="#ga7fef06f7a8293f21778939dfea36951"></a><br></td></tr> |
---|
65 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g2cec4be3f40d49c5950ceac1a28440d8">dWorldSetContactMaxCorrectingVel</a> (dWorldID, dReal vel)</td></tr> |
---|
66 | |
---|
67 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum correcting velocity that contacts are allowed to generate. <a href="#g2cec4be3f40d49c5950ceac1a28440d8"></a><br></td></tr> |
---|
68 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g7673e6d0db3ddb319642caea7d14959d"></a><!-- doxytag: member="world::dWorldGetContactMaxCorrectingVel" ref="g7673e6d0db3ddb319642caea7d14959d" args="(dWorldID)" --> |
---|
69 | ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g7673e6d0db3ddb319642caea7d14959d">dWorldGetContactMaxCorrectingVel</a> (dWorldID)</td></tr> |
---|
70 | |
---|
71 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum correcting velocity that contacts are allowed to generated. <br></td></tr> |
---|
72 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g8f6f964bc15b6cf0937d3214f6e3a1f1">dWorldSetContactSurfaceLayer</a> (dWorldID, dReal depth)</td></tr> |
---|
73 | |
---|
74 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the depth of the surface layer around all geometry objects. <a href="#g8f6f964bc15b6cf0937d3214f6e3a1f1"></a><br></td></tr> |
---|
75 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API dReal </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#g97e1c98f55d9b56d00e7838900ad5e58">dWorldGetContactSurfaceLayer</a> (dWorldID)</td></tr> |
---|
76 | |
---|
77 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Get the depth of the surface layer around all geometry objects. <a href="#g97e1c98f55d9b56d00e7838900ad5e58"></a><br></td></tr> |
---|
78 | <tr><td class="memItemLeft" nowrap align="right" valign="top">ODE_API void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__world.html#gefa68c714bb3c8f70503f101ea062c03">dWorldStepFast1</a> (dWorldID, dReal stepsize, int maxiterations)</td></tr> |
---|
79 | |
---|
80 | <tr><td class="mdescLeft"> </td><td class="mdescRight">Step the world using the StepFast1 algorithm. <a href="#gefa68c714bb3c8f70503f101ea062c03"></a><br></td></tr> |
---|
81 | </table> |
---|
82 | <hr><a name="_details"></a><h2>Detailed Description</h2> |
---|
83 | The world object is a container for rigid bodies and joints. Objects in different worlds can not interact, for example rigid bodies from two different worlds can not collide.<p> |
---|
84 | All the objects in a world exist at the same point in time, thus one reason to use separate worlds is to simulate systems at different rates. Most applications will only need one world. <hr><h2>Function Documentation</h2> |
---|
85 | <a class="anchor" name="g929067266d630fb745f752042d685fc7"></a><!-- doxytag: member="objects.h::dWorldCreate" ref="g929067266d630fb745f752042d685fc7" args="(void)" --> |
---|
86 | <div class="memitem"> |
---|
87 | <div class="memproto"> |
---|
88 | <table class="memname"> |
---|
89 | <tr> |
---|
90 | <td class="memname">ODE_API dWorldID dWorldCreate </td> |
---|
91 | <td>(</td> |
---|
92 | <td class="paramtype">void </td> |
---|
93 | <td class="paramname"> </td> |
---|
94 | <td> ) </td> |
---|
95 | <td width="100%"></td> |
---|
96 | </tr> |
---|
97 | </table> |
---|
98 | </div> |
---|
99 | <div class="memdoc"> |
---|
100 | |
---|
101 | <p> |
---|
102 | Create a new, empty world and return its ID number. |
---|
103 | <p> |
---|
104 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>an identifier </dd></dl> |
---|
105 | |
---|
106 | </div> |
---|
107 | </div><p> |
---|
108 | <a class="anchor" name="g5a2e5b1d2d6a1376dca239b488e629f9"></a><!-- doxytag: member="objects.h::dWorldDestroy" ref="g5a2e5b1d2d6a1376dca239b488e629f9" args="(dWorldID world)" --> |
---|
109 | <div class="memitem"> |
---|
110 | <div class="memproto"> |
---|
111 | <table class="memname"> |
---|
112 | <tr> |
---|
113 | <td class="memname">ODE_API void dWorldDestroy </td> |
---|
114 | <td>(</td> |
---|
115 | <td class="paramtype">dWorldID </td> |
---|
116 | <td class="paramname"> <em>world</em> </td> |
---|
117 | <td> ) </td> |
---|
118 | <td width="100%"></td> |
---|
119 | </tr> |
---|
120 | </table> |
---|
121 | </div> |
---|
122 | <div class="memdoc"> |
---|
123 | |
---|
124 | <p> |
---|
125 | Destroy a world and everything in it. |
---|
126 | <p> |
---|
127 | This includes all bodies, and all joints that are not part of a joint group. Joints that are part of a joint group will be deactivated, and can be destroyed by calling, for example, <a class="el" href="group__joints.html#g6e055bac8a0a3261bda3b6d07499c4ea" title="Empty a joint group.">dJointGroupEmpty()</a>.<p> |
---|
128 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
129 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
130 | <tr><td valign="top"></td><td valign="top"><em>world</em> </td><td>the identifier for the world the be destroyed. </td></tr> |
---|
131 | </table> |
---|
132 | </dl> |
---|
133 | |
---|
134 | </div> |
---|
135 | </div><p> |
---|
136 | <a class="anchor" name="gc7a431f2b3fc6f887fe91ad676828ba3"></a><!-- doxytag: member="objects.h::dWorldGetCFM" ref="gc7a431f2b3fc6f887fe91ad676828ba3" args="(dWorldID)" --> |
---|
137 | <div class="memitem"> |
---|
138 | <div class="memproto"> |
---|
139 | <table class="memname"> |
---|
140 | <tr> |
---|
141 | <td class="memname">ODE_API dReal dWorldGetCFM </td> |
---|
142 | <td>(</td> |
---|
143 | <td class="paramtype">dWorldID </td> |
---|
144 | <td class="paramname"> </td> |
---|
145 | <td> ) </td> |
---|
146 | <td width="100%"></td> |
---|
147 | </tr> |
---|
148 | </table> |
---|
149 | </div> |
---|
150 | <div class="memdoc"> |
---|
151 | |
---|
152 | <p> |
---|
153 | Get the constraint force mixing value. |
---|
154 | <p> |
---|
155 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>CFM value </dd></dl> |
---|
156 | |
---|
157 | </div> |
---|
158 | </div><p> |
---|
159 | <a class="anchor" name="g97e1c98f55d9b56d00e7838900ad5e58"></a><!-- doxytag: member="objects.h::dWorldGetContactSurfaceLayer" ref="g97e1c98f55d9b56d00e7838900ad5e58" args="(dWorldID)" --> |
---|
160 | <div class="memitem"> |
---|
161 | <div class="memproto"> |
---|
162 | <table class="memname"> |
---|
163 | <tr> |
---|
164 | <td class="memname">ODE_API dReal dWorldGetContactSurfaceLayer </td> |
---|
165 | <td>(</td> |
---|
166 | <td class="paramtype">dWorldID </td> |
---|
167 | <td class="paramname"> </td> |
---|
168 | <td> ) </td> |
---|
169 | <td width="100%"></td> |
---|
170 | </tr> |
---|
171 | </table> |
---|
172 | </div> |
---|
173 | <div class="memdoc"> |
---|
174 | |
---|
175 | <p> |
---|
176 | Get the depth of the surface layer around all geometry objects. |
---|
177 | <p> |
---|
178 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>the depth </dd></dl> |
---|
179 | |
---|
180 | </div> |
---|
181 | </div><p> |
---|
182 | <a class="anchor" name="g033cd87a0b22889a94d4d84149bda5a0"></a><!-- doxytag: member="objects.h::dWorldGetERP" ref="g033cd87a0b22889a94d4d84149bda5a0" args="(dWorldID)" --> |
---|
183 | <div class="memitem"> |
---|
184 | <div class="memproto"> |
---|
185 | <table class="memname"> |
---|
186 | <tr> |
---|
187 | <td class="memname">ODE_API dReal dWorldGetERP </td> |
---|
188 | <td>(</td> |
---|
189 | <td class="paramtype">dWorldID </td> |
---|
190 | <td class="paramname"> </td> |
---|
191 | <td> ) </td> |
---|
192 | <td width="100%"></td> |
---|
193 | </tr> |
---|
194 | </table> |
---|
195 | </div> |
---|
196 | <div class="memdoc"> |
---|
197 | |
---|
198 | <p> |
---|
199 | Get the error reduction parameter. |
---|
200 | <p> |
---|
201 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>ERP value </dd></dl> |
---|
202 | |
---|
203 | </div> |
---|
204 | </div><p> |
---|
205 | <a class="anchor" name="ga51acfac06347fd27ff926d37672ce3c"></a><!-- doxytag: member="objects.h::dWorldGetQuickStepNumIterations" ref="ga51acfac06347fd27ff926d37672ce3c" args="(dWorldID)" --> |
---|
206 | <div class="memitem"> |
---|
207 | <div class="memproto"> |
---|
208 | <table class="memname"> |
---|
209 | <tr> |
---|
210 | <td class="memname">ODE_API int dWorldGetQuickStepNumIterations </td> |
---|
211 | <td>(</td> |
---|
212 | <td class="paramtype">dWorldID </td> |
---|
213 | <td class="paramname"> </td> |
---|
214 | <td> ) </td> |
---|
215 | <td width="100%"></td> |
---|
216 | </tr> |
---|
217 | </table> |
---|
218 | </div> |
---|
219 | <div class="memdoc"> |
---|
220 | |
---|
221 | <p> |
---|
222 | Get the number of iterations that the QuickStep method performs per step. |
---|
223 | <p> |
---|
224 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>nr of iterations </dd></dl> |
---|
225 | |
---|
226 | </div> |
---|
227 | </div><p> |
---|
228 | <a class="anchor" name="ga7fef06f7a8293f21778939dfea36951"></a><!-- doxytag: member="objects.h::dWorldGetQuickStepW" ref="ga7fef06f7a8293f21778939dfea36951" args="(dWorldID)" --> |
---|
229 | <div class="memitem"> |
---|
230 | <div class="memproto"> |
---|
231 | <table class="memname"> |
---|
232 | <tr> |
---|
233 | <td class="memname">ODE_API dReal dWorldGetQuickStepW </td> |
---|
234 | <td>(</td> |
---|
235 | <td class="paramtype">dWorldID </td> |
---|
236 | <td class="paramname"> </td> |
---|
237 | <td> ) </td> |
---|
238 | <td width="100%"></td> |
---|
239 | </tr> |
---|
240 | </table> |
---|
241 | </div> |
---|
242 | <div class="memdoc"> |
---|
243 | |
---|
244 | <p> |
---|
245 | Get the SOR over-relaxation parameter. |
---|
246 | <p> |
---|
247 | <dl class="return" compact><dt><b>Returns:</b></dt><dd>the over-relaxation setting </dd></dl> |
---|
248 | |
---|
249 | </div> |
---|
250 | </div><p> |
---|
251 | <a class="anchor" name="ga9c564b4dd7d8fa4c6f4b32dd95fc33a"></a><!-- doxytag: member="objects.h::dWorldImpulseToForce" ref="ga9c564b4dd7d8fa4c6f4b32dd95fc33a" args="(dWorldID, dReal stepsize, dReal ix, dReal iy, dReal iz, dVector3 force)" --> |
---|
252 | <div class="memitem"> |
---|
253 | <div class="memproto"> |
---|
254 | <table class="memname"> |
---|
255 | <tr> |
---|
256 | <td class="memname">ODE_API void dWorldImpulseToForce </td> |
---|
257 | <td>(</td> |
---|
258 | <td class="paramtype">dWorldID </td> |
---|
259 | <td class="paramname">, </td> |
---|
260 | </tr> |
---|
261 | <tr> |
---|
262 | <td class="paramkey"></td> |
---|
263 | <td></td> |
---|
264 | <td class="paramtype">dReal </td> |
---|
265 | <td class="paramname"> <em>stepsize</em>, </td> |
---|
266 | </tr> |
---|
267 | <tr> |
---|
268 | <td class="paramkey"></td> |
---|
269 | <td></td> |
---|
270 | <td class="paramtype">dReal </td> |
---|
271 | <td class="paramname"> <em>ix</em>, </td> |
---|
272 | </tr> |
---|
273 | <tr> |
---|
274 | <td class="paramkey"></td> |
---|
275 | <td></td> |
---|
276 | <td class="paramtype">dReal </td> |
---|
277 | <td class="paramname"> <em>iy</em>, </td> |
---|
278 | </tr> |
---|
279 | <tr> |
---|
280 | <td class="paramkey"></td> |
---|
281 | <td></td> |
---|
282 | <td class="paramtype">dReal </td> |
---|
283 | <td class="paramname"> <em>iz</em>, </td> |
---|
284 | </tr> |
---|
285 | <tr> |
---|
286 | <td class="paramkey"></td> |
---|
287 | <td></td> |
---|
288 | <td class="paramtype">dVector3 </td> |
---|
289 | <td class="paramname"> <em>force</em></td><td> </td> |
---|
290 | </tr> |
---|
291 | <tr> |
---|
292 | <td></td> |
---|
293 | <td>)</td> |
---|
294 | <td></td><td></td><td width="100%"></td> |
---|
295 | </tr> |
---|
296 | </table> |
---|
297 | </div> |
---|
298 | <div class="memdoc"> |
---|
299 | |
---|
300 | <p> |
---|
301 | Converts an impulse to a force. |
---|
302 | <p> |
---|
303 | <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>If you want to apply a linear or angular impulse to a rigid body, instead of a force or a torque, then you can use this function to convert the desired impulse into a force/torque vector before calling the BodyAdd... function. The current algorithm simply scales the impulse by 1/stepsize, where stepsize is the step size for the next step that will be taken. This function is given a dWorldID because, in the future, the force computation may depend on integrator parameters that are set as properties of the world. </dd></dl> |
---|
304 | |
---|
305 | </div> |
---|
306 | </div><p> |
---|
307 | <a class="anchor" name="gc24fadc1d42b65ca3563e40bc1f0fec1"></a><!-- doxytag: member="objects.h::dWorldQuickStep" ref="gc24fadc1d42b65ca3563e40bc1f0fec1" args="(dWorldID w, dReal stepsize)" --> |
---|
308 | <div class="memitem"> |
---|
309 | <div class="memproto"> |
---|
310 | <table class="memname"> |
---|
311 | <tr> |
---|
312 | <td class="memname">ODE_API void dWorldQuickStep </td> |
---|
313 | <td>(</td> |
---|
314 | <td class="paramtype">dWorldID </td> |
---|
315 | <td class="paramname"> <em>w</em>, </td> |
---|
316 | </tr> |
---|
317 | <tr> |
---|
318 | <td class="paramkey"></td> |
---|
319 | <td></td> |
---|
320 | <td class="paramtype">dReal </td> |
---|
321 | <td class="paramname"> <em>stepsize</em></td><td> </td> |
---|
322 | </tr> |
---|
323 | <tr> |
---|
324 | <td></td> |
---|
325 | <td>)</td> |
---|
326 | <td></td><td></td><td width="100%"></td> |
---|
327 | </tr> |
---|
328 | </table> |
---|
329 | </div> |
---|
330 | <div class="memdoc"> |
---|
331 | |
---|
332 | <p> |
---|
333 | Step the world. |
---|
334 | <p> |
---|
335 | <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>This uses an iterative method that takes time on the order of m*N and memory on the order of m, where m is the total number of constraint rows N is the number of iterations. For large systems this is a lot faster than <a class="el" href="group__world.html#g8f547ebeb3deed27e0f7b8143d475f50" title="Step the world.">dWorldStep()</a>, but it is less accurate. <p> |
---|
336 | QuickStep is great for stacks of objects especially when the auto-disable feature is used as well. However, it has poor accuracy for near-singular systems. Near-singular systems can occur when using high-friction contacts, motors, or certain articulated structures. For example, a robot with multiple legs sitting on the ground may be near-singular. <p> |
---|
337 | There are ways to help overcome QuickStep's inaccuracy problems: <ul> |
---|
338 | <li>Increase CFM. </li> |
---|
339 | <li>Reduce the number of contacts in your system (e.g. use the minimum number of contacts for the feet of a robot or creature). </li> |
---|
340 | <li>Don't use excessive friction in the contacts. </li> |
---|
341 | <li>Use contact slip if appropriate </li> |
---|
342 | <li>Avoid kinematic loops (however, kinematic loops are inevitable in legged creatures). </li> |
---|
343 | <li>Don't use excessive motor strength. force-based motors instead of velocity-based motors.</li> |
---|
344 | </ul> |
---|
345 | Increasing the number of QuickStep iterations may help a little bit, but it is not going to help much if your system is really near singular. </dd></dl> |
---|
346 | |
---|
347 | </div> |
---|
348 | </div><p> |
---|
349 | <a class="anchor" name="g8b7913fe46d0afc468418c655da79233"></a><!-- doxytag: member="objects.h::dWorldSetCFM" ref="g8b7913fe46d0afc468418c655da79233" args="(dWorldID, dReal cfm)" --> |
---|
350 | <div class="memitem"> |
---|
351 | <div class="memproto"> |
---|
352 | <table class="memname"> |
---|
353 | <tr> |
---|
354 | <td class="memname">ODE_API void dWorldSetCFM </td> |
---|
355 | <td>(</td> |
---|
356 | <td class="paramtype">dWorldID </td> |
---|
357 | <td class="paramname">, </td> |
---|
358 | </tr> |
---|
359 | <tr> |
---|
360 | <td class="paramkey"></td> |
---|
361 | <td></td> |
---|
362 | <td class="paramtype">dReal </td> |
---|
363 | <td class="paramname"> <em>cfm</em></td><td> </td> |
---|
364 | </tr> |
---|
365 | <tr> |
---|
366 | <td></td> |
---|
367 | <td>)</td> |
---|
368 | <td></td><td></td><td width="100%"></td> |
---|
369 | </tr> |
---|
370 | </table> |
---|
371 | </div> |
---|
372 | <div class="memdoc"> |
---|
373 | |
---|
374 | <p> |
---|
375 | Set the global CFM (constraint force mixing) value. |
---|
376 | <p> |
---|
377 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
378 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
379 | <tr><td valign="top"></td><td valign="top"><em>cfm</em> </td><td>Typical values are in the range {10^{-9}} -- 1. The default is 10^-5 if single precision is being used, or 10^-10 if double precision is being used. </td></tr> |
---|
380 | </table> |
---|
381 | </dl> |
---|
382 | |
---|
383 | </div> |
---|
384 | </div><p> |
---|
385 | <a class="anchor" name="g2cec4be3f40d49c5950ceac1a28440d8"></a><!-- doxytag: member="objects.h::dWorldSetContactMaxCorrectingVel" ref="g2cec4be3f40d49c5950ceac1a28440d8" args="(dWorldID, dReal vel)" --> |
---|
386 | <div class="memitem"> |
---|
387 | <div class="memproto"> |
---|
388 | <table class="memname"> |
---|
389 | <tr> |
---|
390 | <td class="memname">ODE_API void dWorldSetContactMaxCorrectingVel </td> |
---|
391 | <td>(</td> |
---|
392 | <td class="paramtype">dWorldID </td> |
---|
393 | <td class="paramname">, </td> |
---|
394 | </tr> |
---|
395 | <tr> |
---|
396 | <td class="paramkey"></td> |
---|
397 | <td></td> |
---|
398 | <td class="paramtype">dReal </td> |
---|
399 | <td class="paramname"> <em>vel</em></td><td> </td> |
---|
400 | </tr> |
---|
401 | <tr> |
---|
402 | <td></td> |
---|
403 | <td>)</td> |
---|
404 | <td></td><td></td><td width="100%"></td> |
---|
405 | </tr> |
---|
406 | </table> |
---|
407 | </div> |
---|
408 | <div class="memdoc"> |
---|
409 | |
---|
410 | <p> |
---|
411 | Set the maximum correcting velocity that contacts are allowed to generate. |
---|
412 | <p> |
---|
413 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
414 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
415 | <tr><td valign="top"></td><td valign="top"><em>vel</em> </td><td>The default value is infinity (i.e. no limit). </td></tr> |
---|
416 | </table> |
---|
417 | </dl> |
---|
418 | <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Reducing this value can help prevent "popping" of deeply embedded objects. </dd></dl> |
---|
419 | |
---|
420 | </div> |
---|
421 | </div><p> |
---|
422 | <a class="anchor" name="g8f6f964bc15b6cf0937d3214f6e3a1f1"></a><!-- doxytag: member="objects.h::dWorldSetContactSurfaceLayer" ref="g8f6f964bc15b6cf0937d3214f6e3a1f1" args="(dWorldID, dReal depth)" --> |
---|
423 | <div class="memitem"> |
---|
424 | <div class="memproto"> |
---|
425 | <table class="memname"> |
---|
426 | <tr> |
---|
427 | <td class="memname">ODE_API void dWorldSetContactSurfaceLayer </td> |
---|
428 | <td>(</td> |
---|
429 | <td class="paramtype">dWorldID </td> |
---|
430 | <td class="paramname">, </td> |
---|
431 | </tr> |
---|
432 | <tr> |
---|
433 | <td class="paramkey"></td> |
---|
434 | <td></td> |
---|
435 | <td class="paramtype">dReal </td> |
---|
436 | <td class="paramname"> <em>depth</em></td><td> </td> |
---|
437 | </tr> |
---|
438 | <tr> |
---|
439 | <td></td> |
---|
440 | <td>)</td> |
---|
441 | <td></td><td></td><td width="100%"></td> |
---|
442 | </tr> |
---|
443 | </table> |
---|
444 | </div> |
---|
445 | <div class="memdoc"> |
---|
446 | |
---|
447 | <p> |
---|
448 | Set the depth of the surface layer around all geometry objects. |
---|
449 | <p> |
---|
450 | <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Contacts are allowed to sink into the surface layer up to the given depth before coming to rest. </dd></dl> |
---|
451 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
452 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
453 | <tr><td valign="top"></td><td valign="top"><em>depth</em> </td><td>The default value is zero. </td></tr> |
---|
454 | </table> |
---|
455 | </dl> |
---|
456 | <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>Increasing this to some small value (e.g. 0.001) can help prevent jittering problems due to contacts being repeatedly made and broken. </dd></dl> |
---|
457 | |
---|
458 | </div> |
---|
459 | </div><p> |
---|
460 | <a class="anchor" name="gacd0778bdaa939d22f093fc2d5d5f868"></a><!-- doxytag: member="objects.h::dWorldSetERP" ref="gacd0778bdaa939d22f093fc2d5d5f868" args="(dWorldID, dReal erp)" --> |
---|
461 | <div class="memitem"> |
---|
462 | <div class="memproto"> |
---|
463 | <table class="memname"> |
---|
464 | <tr> |
---|
465 | <td class="memname">ODE_API void dWorldSetERP </td> |
---|
466 | <td>(</td> |
---|
467 | <td class="paramtype">dWorldID </td> |
---|
468 | <td class="paramname">, </td> |
---|
469 | </tr> |
---|
470 | <tr> |
---|
471 | <td class="paramkey"></td> |
---|
472 | <td></td> |
---|
473 | <td class="paramtype">dReal </td> |
---|
474 | <td class="paramname"> <em>erp</em></td><td> </td> |
---|
475 | </tr> |
---|
476 | <tr> |
---|
477 | <td></td> |
---|
478 | <td>)</td> |
---|
479 | <td></td><td></td><td width="100%"></td> |
---|
480 | </tr> |
---|
481 | </table> |
---|
482 | </div> |
---|
483 | <div class="memdoc"> |
---|
484 | |
---|
485 | <p> |
---|
486 | Set the global ERP value, that controls how much error correction is performed in each time step. |
---|
487 | <p> |
---|
488 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
489 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
490 | <tr><td valign="top"></td><td valign="top"><em>dWorldID</em> </td><td>the identifier of the world. </td></tr> |
---|
491 | <tr><td valign="top"></td><td valign="top"><em>erp</em> </td><td>Typical values are in the range 0.1--0.8. The default is 0.2. </td></tr> |
---|
492 | </table> |
---|
493 | </dl> |
---|
494 | |
---|
495 | </div> |
---|
496 | </div><p> |
---|
497 | <a class="anchor" name="ga1b220b922215b335572c699cf8f8cad"></a><!-- doxytag: member="objects.h::dWorldSetGravity" ref="ga1b220b922215b335572c699cf8f8cad" args="(dWorldID, dReal x, dReal y, dReal z)" --> |
---|
498 | <div class="memitem"> |
---|
499 | <div class="memproto"> |
---|
500 | <table class="memname"> |
---|
501 | <tr> |
---|
502 | <td class="memname">ODE_API void dWorldSetGravity </td> |
---|
503 | <td>(</td> |
---|
504 | <td class="paramtype">dWorldID </td> |
---|
505 | <td class="paramname">, </td> |
---|
506 | </tr> |
---|
507 | <tr> |
---|
508 | <td class="paramkey"></td> |
---|
509 | <td></td> |
---|
510 | <td class="paramtype">dReal </td> |
---|
511 | <td class="paramname"> <em>x</em>, </td> |
---|
512 | </tr> |
---|
513 | <tr> |
---|
514 | <td class="paramkey"></td> |
---|
515 | <td></td> |
---|
516 | <td class="paramtype">dReal </td> |
---|
517 | <td class="paramname"> <em>y</em>, </td> |
---|
518 | </tr> |
---|
519 | <tr> |
---|
520 | <td class="paramkey"></td> |
---|
521 | <td></td> |
---|
522 | <td class="paramtype">dReal </td> |
---|
523 | <td class="paramname"> <em>z</em></td><td> </td> |
---|
524 | </tr> |
---|
525 | <tr> |
---|
526 | <td></td> |
---|
527 | <td>)</td> |
---|
528 | <td></td><td></td><td width="100%"></td> |
---|
529 | </tr> |
---|
530 | </table> |
---|
531 | </div> |
---|
532 | <div class="memdoc"> |
---|
533 | |
---|
534 | <p> |
---|
535 | Set the world's global gravity vector. |
---|
536 | <p> |
---|
537 | The units are m/s^2, so Earth's gravity vector would be (0,0,-9.81), assuming that +z is up. The default is no gravity, i.e. (0,0,0). |
---|
538 | </div> |
---|
539 | </div><p> |
---|
540 | <a class="anchor" name="g9d852689d87d28a3d4947eda59c5ba7e"></a><!-- doxytag: member="objects.h::dWorldSetQuickStepNumIterations" ref="g9d852689d87d28a3d4947eda59c5ba7e" args="(dWorldID, int num)" --> |
---|
541 | <div class="memitem"> |
---|
542 | <div class="memproto"> |
---|
543 | <table class="memname"> |
---|
544 | <tr> |
---|
545 | <td class="memname">ODE_API void dWorldSetQuickStepNumIterations </td> |
---|
546 | <td>(</td> |
---|
547 | <td class="paramtype">dWorldID </td> |
---|
548 | <td class="paramname">, </td> |
---|
549 | </tr> |
---|
550 | <tr> |
---|
551 | <td class="paramkey"></td> |
---|
552 | <td></td> |
---|
553 | <td class="paramtype">int </td> |
---|
554 | <td class="paramname"> <em>num</em></td><td> </td> |
---|
555 | </tr> |
---|
556 | <tr> |
---|
557 | <td></td> |
---|
558 | <td>)</td> |
---|
559 | <td></td><td></td><td width="100%"></td> |
---|
560 | </tr> |
---|
561 | </table> |
---|
562 | </div> |
---|
563 | <div class="memdoc"> |
---|
564 | |
---|
565 | <p> |
---|
566 | Set the number of iterations that the QuickStep method performs per step. |
---|
567 | <p> |
---|
568 | <dl class="remark" compact><dt><b>Remarks:</b></dt><dd>More iterations will give a more accurate solution, but will take longer to compute. </dd></dl> |
---|
569 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
570 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
571 | <tr><td valign="top"></td><td valign="top"><em>num</em> </td><td>The default is 20 iterations. </td></tr> |
---|
572 | </table> |
---|
573 | </dl> |
---|
574 | |
---|
575 | </div> |
---|
576 | </div><p> |
---|
577 | <a class="anchor" name="gf741ee61e3f9981ae102729f23aad535"></a><!-- doxytag: member="objects.h::dWorldSetQuickStepW" ref="gf741ee61e3f9981ae102729f23aad535" args="(dWorldID, dReal over_relaxation)" --> |
---|
578 | <div class="memitem"> |
---|
579 | <div class="memproto"> |
---|
580 | <table class="memname"> |
---|
581 | <tr> |
---|
582 | <td class="memname">ODE_API void dWorldSetQuickStepW </td> |
---|
583 | <td>(</td> |
---|
584 | <td class="paramtype">dWorldID </td> |
---|
585 | <td class="paramname">, </td> |
---|
586 | </tr> |
---|
587 | <tr> |
---|
588 | <td class="paramkey"></td> |
---|
589 | <td></td> |
---|
590 | <td class="paramtype">dReal </td> |
---|
591 | <td class="paramname"> <em>over_relaxation</em></td><td> </td> |
---|
592 | </tr> |
---|
593 | <tr> |
---|
594 | <td></td> |
---|
595 | <td>)</td> |
---|
596 | <td></td><td></td><td width="100%"></td> |
---|
597 | </tr> |
---|
598 | </table> |
---|
599 | </div> |
---|
600 | <div class="memdoc"> |
---|
601 | |
---|
602 | <p> |
---|
603 | Set the SOR over-relaxation parameter. |
---|
604 | <p> |
---|
605 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
606 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
607 | <tr><td valign="top"></td><td valign="top"><em>over_relaxation</em> </td><td>value to use by SOR </td></tr> |
---|
608 | </table> |
---|
609 | </dl> |
---|
610 | |
---|
611 | </div> |
---|
612 | </div><p> |
---|
613 | <a class="anchor" name="g8f547ebeb3deed27e0f7b8143d475f50"></a><!-- doxytag: member="objects.h::dWorldStep" ref="g8f547ebeb3deed27e0f7b8143d475f50" args="(dWorldID, dReal stepsize)" --> |
---|
614 | <div class="memitem"> |
---|
615 | <div class="memproto"> |
---|
616 | <table class="memname"> |
---|
617 | <tr> |
---|
618 | <td class="memname">ODE_API void dWorldStep </td> |
---|
619 | <td>(</td> |
---|
620 | <td class="paramtype">dWorldID </td> |
---|
621 | <td class="paramname">, </td> |
---|
622 | </tr> |
---|
623 | <tr> |
---|
624 | <td class="paramkey"></td> |
---|
625 | <td></td> |
---|
626 | <td class="paramtype">dReal </td> |
---|
627 | <td class="paramname"> <em>stepsize</em></td><td> </td> |
---|
628 | </tr> |
---|
629 | <tr> |
---|
630 | <td></td> |
---|
631 | <td>)</td> |
---|
632 | <td></td><td></td><td width="100%"></td> |
---|
633 | </tr> |
---|
634 | </table> |
---|
635 | </div> |
---|
636 | <div class="memdoc"> |
---|
637 | |
---|
638 | <p> |
---|
639 | Step the world. |
---|
640 | <p> |
---|
641 | This uses a "big matrix" method that takes time on the order of m^3 and memory on the order of m^2, where m is the total number of constraint rows. For large systems this will use a lot of memory and can be very slow, but this is currently the most accurate method.<p> |
---|
642 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
643 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
644 | <tr><td valign="top"></td><td valign="top"><em>stepsize</em> </td><td>The number of seconds that the simulation has to advance. </td></tr> |
---|
645 | </table> |
---|
646 | </dl> |
---|
647 | |
---|
648 | </div> |
---|
649 | </div><p> |
---|
650 | <a class="anchor" name="gefa68c714bb3c8f70503f101ea062c03"></a><!-- doxytag: member="objects.h::dWorldStepFast1" ref="gefa68c714bb3c8f70503f101ea062c03" args="(dWorldID, dReal stepsize, int maxiterations)" --> |
---|
651 | <div class="memitem"> |
---|
652 | <div class="memproto"> |
---|
653 | <table class="memname"> |
---|
654 | <tr> |
---|
655 | <td class="memname">ODE_API void dWorldStepFast1 </td> |
---|
656 | <td>(</td> |
---|
657 | <td class="paramtype">dWorldID </td> |
---|
658 | <td class="paramname">, </td> |
---|
659 | </tr> |
---|
660 | <tr> |
---|
661 | <td class="paramkey"></td> |
---|
662 | <td></td> |
---|
663 | <td class="paramtype">dReal </td> |
---|
664 | <td class="paramname"> <em>stepsize</em>, </td> |
---|
665 | </tr> |
---|
666 | <tr> |
---|
667 | <td class="paramkey"></td> |
---|
668 | <td></td> |
---|
669 | <td class="paramtype">int </td> |
---|
670 | <td class="paramname"> <em>maxiterations</em></td><td> </td> |
---|
671 | </tr> |
---|
672 | <tr> |
---|
673 | <td></td> |
---|
674 | <td>)</td> |
---|
675 | <td></td><td></td><td width="100%"></td> |
---|
676 | </tr> |
---|
677 | </table> |
---|
678 | </div> |
---|
679 | <div class="memdoc"> |
---|
680 | |
---|
681 | <p> |
---|
682 | Step the world using the StepFast1 algorithm. |
---|
683 | <p> |
---|
684 | <dl compact><dt><b>Parameters:</b></dt><dd> |
---|
685 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
686 | <tr><td valign="top"></td><td valign="top"><em>stepsize</em> </td><td>the nr of seconds to advance the simulation. </td></tr> |
---|
687 | <tr><td valign="top"></td><td valign="top"><em>maxiterations</em> </td><td>The number of iterations to perform. </td></tr> |
---|
688 | </table> |
---|
689 | </dl> |
---|
690 | |
---|
691 | </div> |
---|
692 | </div><p> |
---|
693 | <hr size="1"><address style="text-align: right;"><small>Generated on Fri Oct 12 08:36:51 2007 for Open Dynamics Engine by |
---|
694 | <a href="http://www.doxygen.org/index.html"> |
---|
695 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
---|
696 | </body> |
---|
697 | </html> |
---|