[ODE] Re: Box on The Ground

Pete Baron sibaroni at hotmail.com
Mon Oct 4 16:03:01 MST 2004


nb is the 'number of bodies', in this case it means the number of bodies in
the island being processed.  If you look in the ODE source file called
"quickstep.c" at line 779 then you'll see the code I cut & pasted into my
last message.
To get the contact forces of the box on the ground, you must modify this
loop to copy the
facc[] and tacc[] values into your own data locations before the loop sets
them back to zero.
This loop runs every frame because it's inside the quickstep function which
you call every frame.

Hope this helps,

Pete Baron

sibaroni at hotmail.com

http://home.btconnect.com/pete/homepage.html

----- Original Message ----- 

From: "Liu" <liu.mailbox at msa.hinet.net>
To: "Pete Baron" <sibaroni at hotmail.com>; "Ode at Q12. Org" <ode at q12.org>
Sent: Monday, October 04, 2004 3:50 PM
Subject: Re: [ODE] Re: Box on The Ground


> sorry, what is nb ?
>
> is it initial setting ? or every loop must call it ?
>
> thanks a lot ..
>
>
>
> ----- Original Message ----- 
> From: "Pete Baron" <sibaroni at hotmail.com>
> To: <ode at q12.org>
> Sent: Wednesday, September 01, 2004 10:48 PM
> Subject: [ODE] Re: ODE Digest, Vol 12, Issue 40
>
>
> > Hi Liu,
> >
> > the forces are set to zero at the end of quickstep.c (line 779):
> >
> >  // zero all force accumulators
> >  for (i=0; i<nb; i++) {
> >   dSetZero (body[i]->facc,3);
> >   dSetZero (body[i]->tacc,3);
> >  }
> >
> > you should be able to copy them somewhere safe inside this loop and use
> the
> > copied values.
> >
> > cheers,
> >
> > Pete Baron
> > sibaroni at hotmail.com
> > http://home.btconnect.com/pete/homepage.html
> >
> > >Date: Tue, 31 Aug 2004 23:36:29 +0800
> > >From: "Liu" <liu.mailbox at msa.hinet.net>
> > >Subject: Re: [ODE] Re: Box on The Ground
> > >To: "Ode at Q12. Org" <ode at q12.org>
> > >Message-ID: <000d01c48f70$4a64ddd0$52fb8bdc at boycomputer>
> > >Content-Type: text/plain; charset="big5"
> > >
> > >If I want to get the Box force from the ground, how can i get it ?
> > >I use body.getForce( );
> > >but it always get none.
> > >
> > >thanks a lot.


More information about the ODE mailing list