[ODE] Creating a 2d wrapper class around the ODE lib

David Walters hidden.asbestos at googlemail.com
Wed Aug 9 06:22:29 MST 2006


> I would like to see a good Plane2D joint in the trunk; I think this is
> being worked on.

Excellent. I'm really looking forward to this!  How far is it from
submission do you know?

>
> I am a little uncomfortable with the idea of adding pure 2D collision
> primitives. Couldn't you just use the existing 3D primitives? If
> everything is constrained to Z==0 anyway it doesn't matter how "thick"
> they are (and to Christoph - this has nothing to do with
> mass/proportions, that's the rigid body).

I'm just wondering though - wouldn't it be much more efficient to
write a collision function and AABB generation for a circle rather
than a capsule/cylinder ? and for a rectangle vs. a box ? and a
polygon primitive would be a lot easier to write if you knew it was
2D.

I don't see why you'd want to use an actual sphere when the only
colliding edge is a _circular_ cross-section...

The only downside I can think of is that you'd have to write 2D / 3D
interaction functions - but they could fall back to cylinder and box
calls couldn't they?

I think if the names are clear, ie. sticking 2D everywhere, the API
won't become messy as there are a lot fewer specifically 2D primitives
required (polygon, box, circle). Also, on reflection I don't think a
special collision space is really required - more efficient versions
could be made, but there's nothing stopping you using the exsiting
ones. It's shouldn't really be up to ODE to say you can't mix 2D and
3D...

Just my thoughts,
Dave


More information about the ODE mailing list