[ODE] AutoDisable: Alternatives

Aras Pranckevicius nearaz at interamotion.com
Mon Mar 1 10:57:15 MST 2004


> 4. add your own solution here

I'll do like this: have "default" params in World (newly created bodies get
that, there's also a function "set default params on my body!"). AND there
are per-body params (gets defaults from world, but you can set them to other
values).

> The parameters would consists of three values:
> -angVel, linVel and stepCount?

Yes.

> Is there an real performance (speed / memory) issue against using per
> body specified parameters? This would be more flexible than global
> parameters.

Memory: 2 dReals and 2 ints per body. So, on most architectues, 24 or 16
bytes per body (float vs double). I think that's reasonable...
CPU: in each step, for each body (if it's not disabled already), a one or
two dotproducts+compares+branches. I didn't notice any speed impact - it's
really a tiny work, compared to other things.

However, if there's really a need, we can make auto-disabling conditionally
compiled (like trimesh). This way, there won't be any memory/cpu impact if
you just disable it :)

> Also different geoms, e.g. sphere vs. box, can require different auto
> disable values, don't you agree?

Yes. Boxes at least need larger "steps" value.


I've implemented whole thing I've written above, now testing.


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/



More information about the ODE mailing list