Cylinder VS Capsules (Screenshot included!)

bleubleu

15-01-2007 03:56:11

Hi!

In OgreODE there is 2 different classes for capped cylinders and capsules.
  1. OgreOde::CylinderGeometry = dCreateCCylinder[/*:m]
  2. OgreOde::CapsuleGeometry = dCreateCapsule[/*:m][/list:u]
    But in ODE they are the same exact thing, as you can see in ode/collision.h.

    #define dCreateCCylinder dCreateCapsule

    There is a *real* Cylinder class in ODE. Why not make the CylinderGeometry class use this class instead ? This would allow us to use cylinder for wheels instead of spheres or capsules. I realise they cylinder class in ODE is still pretty basic and does not have all the collisions implemented, but it would fit my purpose.

    It is a very simple modification, simply change all CCylinder calls to Cylinder and you are done! You may also want to change the debug object appearance so it doesnt look like a capsule.

    Does that make any sense ? Should I change it in CVS ?

    Here is a screenshot of the landscape demo modified to create barrels instead of boxes. Notice how cylinders can rolls and stand. Nice stuff.



    Mat

tuan kuranes

16-01-2007 13:52:22

Does that make any sense ? Should I change it in CVS ?
A patch is indeed very welcome.