[ODE] Damage!

Erwin de Vries erwin at vo.com
Mon Aug 5 13:00:02 2002


I just implemented this. I added a callback member to the dxJoint struct. It
can be added to every joint type, but i dont think its really useful to
joints other than contacts. This is it:

typedef void dJointCallback (dJointID j, dReal stepsize, dVector3 f1,
dVector3 t1, dVector3 f2, dVector3 t2);
j = the joint
stepsize = the current stepping rate
f1 = the to be added force on b1
t1 = the to be added torque on b1
f2 = the to be added force on b2 (zero if b2 == 0)
t2 = the to be added torque on b2 (zero if b2 == 0)

Note that these values are not const and thus may be changed, although its
not very advisable.

I've not yet tested how useful it all is. I just noticed
dJointGetContactData() is not available, and should be added as well.

It might also be pretty handy for debugging?

Erwin

----- Original Message -----
From: "Anselm Hook" <anselm@hook.org>
To: "Erwin de Vries" <erwin@vo.com>
Cc: <ode@q12.org>
Sent: Monday, July 22, 2002 03:53
Subject: Re: [ODE] Damage!


>
> This is the right way; my last post was inaccurate.  The forces are
> computed explicitly but not persisted outside of the solver - you have to
> find where they're computed and then persist them for your use later.
>
> -a
>
> On Sun, 21 Jul 2002, Erwin de Vries wrote:
>
> > > i think i need to know what happened inside the contact joints during
last
> > > iteration...?
> >
> > Thats also my thought. You need feedback from the dynamics solver.
Imagine
> > you have a car driving through a city at 100km/h. When you hit a
building
> > you are dead. When you hit a 10kg box you are (pretty) ok. Now you could
> > probably fiddle around with the body's mass and inertia tensor to get
> > something pretty convincing but its all a hack. I'm also looking for a
good
> > way to solve this problem.
> >
> > Erwin
> >
> > _______________________________________________
> > ODE mailing list
> > ODE@q12.org
> > http://q12.org/mailman/listinfo/ode
> >
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>
>