[ODE] gravity per object?

George Birbilis birbilis at kagi.com
Sun Apr 11 21:29:10 MST 2004


> > why not just add some extra force to that body?
> > ...
> > btw, is there any concept of force-fields in ODE?
> >
> > also, can one do bodies that pull each other? (static electricity or
> > magnetism for example)
>
> You kinda answered your own questions.... 'add extra forces to the body'
:)

Indeed, but having ready-made force field entities in ODE would be much
easier

I think force field has a function where you give as input a point in space
and you get back the force field effect at that point. It will give some
zero-effect value at places where the field has no effect. Don't think the
field function gives a force, but some value that helps calculate the force
given a body that has some property that can interact with this field (e.g.
if a body has mass it is affected by gravitational field, if it has
electrostatic charge it is affected by electrostatic field etc.).

So I suppose the field might have some
getFieldForce(dForceField, dBody, dVector)
function in ODE parlance (I'm in the process of reading the ODE main doc,
not read all of it yet) and that function would query object properties
related to that specific field class and parameters and if it sees the body
has properties that cause the body to interact with the field, it would do
so

...if bodies had a dictionary of gettable/settable properties it would be
easier, e.g. dBodyGetVector3(dBody theBody, char *theVector3PropertyName),
so that "mass", "charge" etc. dynamic properties could be added to bodies

I think though that body properties can also interact with a field in a way
that affects/changes the force field function itself sometimes (though that
might be just the effect of having some third body get affected by both the
outer field and a field that is arround the first body in the field and
vice-versa), so the above model might be OK in most force field cases.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
George Birbilis <birbilis at kagi.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ QuickTime VCL and ActiveX controls (for PowerPoint/VB/Delphi etc.)
+ Plugs VCL and ActiveX controls (InterProcess/Internet communication)
+ TransFormations, VB6 forms to ASP.net WebForms convertion
http://www.kagi.com/birbilis
+ Robotics
http://www.mech.upatras.gr/~robgroup
........................................................................



More information about the ODE mailing list