ChrisC wrote:
I'm wanting to make a class to encapsulate a physics "object" (body and shape) and visual (irrlicht scene node)
When creating my object with ODE I pass a flag which identifies the "type" of object and from the other parameters, scale and so forth I can create my new object.
Now I'm using bullet I'm having to rewrite sections of the class
Do I need a separate shape per object if they are different sizes?
or is there some way the body can apply different scales to the same
shape object?
All collision shapes in Bullet are derived from one base class, btCollisionShapes. You can get the type using getShapeType(). The local scaling is stored in the collision shapes, so for primitive shapes like box, sphere, cone, cylinder, capsule (= btMultisphereShape with 2 spheres) you need the same scaling to share.
For convex and concave triangle meshes, Bullet allows to share the mesh data among different collision shapes. Also, you can share the graphics mesh data for collision detection by indexing.
You can find more info by studying the demos, and Bullet_User_Manual.pdf. See also the Bullet/Demos/OpenGL/DemoApplication.cpp.
Erwin