[ODE] How can I make a chair not to use dJointCreateFixed() ?

Tom De Muer tom.demuer at skynet.be
Wed Feb 4 08:57:08 MST 2004


> If I make a chair, I will connect boxes using dJointCreateFixed(). (4 leg
boxs, back box and box for seat)
> But at manual, I saw a comment like this :
>
> "Using this joint is almost never a good idea in practice, except when
debugging. If you need two bodies to
> be glued together it is better to represent that as a single body."
>
> I don't understand what this means...Does "a single body" mean to make a
triangle mesh of chair shape?
> Please explain that easily and in detail~ ^^
>

There is a difference between a body (dBody) used for the physics and a body
used for geometry (dGeom).  In your case you could speak of one body (the
chair) made up a non-trivial form.  Now you can both for physics or geometry
build up that body out of several more simple bodies.

For the physics you could create several physics bodies and attach them
through fixed joints, but there is no reason to do that: your chair is one
physical object with it's inertia properties.  What you are better off doing
is using one physical body (dBody) and setting it's inertia matrix properly,
ie matching a chair.

For the geometry part, which is the one used for the collision detection:
you attach the different pieces of your chair to that one physical body.
When your chair now falls over, the collision detection will generate the
contact points at the correct places.  After this forces are applied to the
one physical body that is related to the geometry.

Hope this clarifies things :)

Cheers,
Tom



More information about the ODE mailing list