[ODE] How to "Reset"
Michal Bacik
michal at lonelycatgames.com
Wed Mar 12 06:06:49 2003
This is a multi-part message in MIME format.
------=_NextPart_000_0002_01C2E8A0.197B0820
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Surely it is possible. I plan do so myself soon to implement a save-game
support on physics bodies. But I suppose you'll have to read/write directly
from dx??? interfaces - internal data structures, because not all data are
accessible through the ODE interface. You'll have to save all data which are
changing during the simulation - velocities, position, rotation, etc. You
may omit saving data which are initialized at init time and do not change -
e.g. mass, its inertia matrix, etc.
- michal
Is it possible to "clone" a physics setup? I could initialize a system,
make a backup and use copies of the backup whenever I wanted to reinitialize
the system.
----- Original Message -----
From: Henri Hakl
To: ode@q12.org
Sent: Tuesday, March 11, 2003 11:20 PM
Subject: [ODE] How to "Reset"
Hi ODE pplZ :)
I'm in the deep programming phase for my current project which involves
simulating a body in ODE numerous times. During each iteration the world
(specifically the body) need to be reset to initial conditions. What is the
best (speak fastest) way of accomplishing this?
Just reset all segment positions and orientations manually? Destroy and
recreate? Something else?
thanks! :)
Henri
------=_NextPart_000_0002_01C2E8A0.197B0820
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D164035912-12032003>Surely=20
it is possible. I plan do so myself soon to implement a save-game =
support on=20
physics bodies. But I suppose you'll have to read/write directly from =
dx???=20
interfaces - internal data structures, because not all data are =
accessible=20
through the ODE interface. You'll have to save all data which are =
changing=20
during the simulation - velocities, position, rotation, etc. You may =
omit saving=20
data which are initialized at init time and do not change - e.g. mass, =
its=20
inertia matrix, etc.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D164035912-12032003></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D164035912-12032003>-=20
michal</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid; MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DArial size=3D2>Is=20
it possible to "clone" a physics setup? I could initialize a system, =
make a=20
backup and use copies of the backup whenever I wanted to reinitialize =
the=20
system.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV=20
style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
<A title=3Dhenri@cs.sun.ac.za =
href=3D"mailto:henri@cs.sun.ac.za">Henri Hakl</A>=20
</DIV>
<DIV style=3D"FONT: 10pt arial"><B>To:</B> <A title=3Dode@q12.org=20
href=3D"mailto:ode@q12.org">ode@q12.org</A> </DIV>
<DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, March 11, 2003 =
11:20=20
PM</DIV>
<DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [ODE] How to =
"Reset"</DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Hi ODE pplZ :)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I'm in the deep programming phase =
for my=20
current project which involves simulating a body in ODE numerous =
times.=20
During each iteration the world (specifically the body) need to be =
reset to=20
initial conditions. What is the best (speak fastest) way of =
accomplishing=20
this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Just reset all segment positions =
and=20
orientations manually? Destroy and recreate? Something =
else?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>thanks! :)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =20
Henri</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0002_01C2E8A0.197B0820--