SteveBaker wrote:From reading the demo programs, it seems that the only way to perform some operations on btRigidBody objects is to access the raw member variables of the base class (eg, the Demos/OpenGL/DemoApplication.cpp reads and writes 'm_worldTransform'). This is kinda nasty because it means you can't tell when one of these fields has been touched if you ever need to in the future.
There should be inlined access functions for these things with all of the member variables of public classes made 'private'.
(Also, there is a typo: m_ccdSweptMotionTreshold ...should be 'Threshold')
Thanks for pointing out the typo, I'll rename it.
Bullet software makes distinguishment between classes and structs. The btCollisionObject is a struct at the moment, and for structs I allow direct data access. However, I agree it is not a good habbit. We can clean this up, but in general some structs are really mostly public data, which is not intended to be private.
More important, the world transform should be read/written by btMotionState. I'll probably remove the btRigidBody constructor that passes in a worldtransform, and you just pass the btMotionState (that contains the graphics worldtransform, including potential center-of-mass shifts etc).
Thanks for the useful feedback,
Erwin