# [ODE] Quick fundamental questions about ODE.

Bram Stolk b.stolk at gmail.com
Thu Sep 6 06:37:34 MST 2007

```On 9/6/07, Jeremy Roberts <jroberts at digipen.edu> wrote:

> Hello,
>      I am new to ODE and have two quick fundamental questions about ODE for
> people with more ODE experience.  The first has to do with body/mass and
> approximations.  The second has to do with simple spaces and culling.
>      Question 1)  Ok, so it is my understanding that the general outline for
> creating a complex static object (no joints etc.) would be ... many geoms
> attached to a single body/mass.  These would be inserted into a containing
> space (for quicker collision detection) which is then inserted into the
> global collision space.  Approximating the general object with geoms is
> pretty straight forward but what confuses me is the single body and mass.
>      My question is ... is approximating a large complex object like a robot
> with a single body/mass such as a sphere or box convincing enough for all
> intents and purposes or does one have to connect multiple bodies/masses say
> with joints or create complex inertia matrices for every complex object?

I think the idea is to use dMassAdd(), so you can create a sphere geom,
a box geom, a single body. Then you create a spherical mass, a box mass,
add the masses, and set the single mass to the body.

>
>      Question 2) Trying to figure out how to cull objects efficiently with
> spaces.
>      My question is ... should all complex objects have their components
> inserted into a simple space which in turn is inserted into the global space
> for culling?  Is that the general procedure?

I use sub spaces primarily to control what gets tested against what.
If I create two cars, each with 4 wheels and a shell, then I do not want
collision testing of a wheel against its own shell. So I create two spaces,
each containing 4 wheels and a shell. I use dSpaceCollide2() to test
space against space, but do not test for collisions within a sub space.

ODE is pretty good in figuring out what objects are near to eachother
anyway, so it is efficient. You can use hash spaces, quad tree spaces,
etc.

Bram

>
> Thank you for your help.
> Jeremy (grill8)
> A.S. Real Time Interactive Simulation
> [Video Game Computer Science]
> DigiPen Institute of Technology
>
> - Make the world what it could be, not what it is.
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://ode.org/mailman/listinfo/ode
>

--
Zapp: Captain's log, stardate...er..
Kif: Ohhh. April 13th.
Zapp: April 13th. Point 2.
```