[ODE] Difference Between Bodies and Geoms

Vadim Macagon vadim_mcagon at hotmail.com
Sat Apr 10 18:49:10 MST 2004


> I'm wondering if I need a seperate Geom for every object in the ODE
> simulation. This would be rather memory expensive especially since I
> plan to use TriMeshes. I'd like to be able to re-use a geom, like have
> several objects(bodies) with the geom.

When you create the trimesh geom it doesn't copy the vertex/index data you
pass to it, so there's nothing that prevents you from reusing the same data
for multiple trimesh geoms (you only need one copy of that data).

> The reason I think this is because dGeomSetBody attaches a geom to a
> body, not the other way around. If I'm right that I'll need to have a
> seperate geom for _every_ object in my simulation, that's just a waste
> and I wonder if that can be changed?

Yes you do need a separate geom for every body because once a geom is
attached to a body, moving the geom will move the body and vice versa.


Vadim.


More information about the ODE mailing list