CF_STATIC_OBJECT: object has 0 mass (or infinite mass in a certain sense). It can take arbitrary abuse and stand still. Management is easier as it is guaranteed to not move. This is set automatically by btRigidBody::setMassProps, so (Q1) being this a function of mass, what's the point in using it?
Considering soft bodies don't appear to have a mass (or perhaps I just overlooked at them) (Q2a) is this geared towards saving a few bits? Or perhaps (Q2b) avoiding a virtual call (see below)?
(Q3) How does a static soft body work like?
btCollisionObject::activate will be nop for static or kinematic objects. All CollisionObjects are born static. (Q4) Am I correct in saying I can change this with no trouble?
Because those objects do not move nor need to be tracked, I'd personally not use a MotionState when creating them. I understand the manual suggests to use them "because they're easier" but I don't understand what's the benefit for static objects. (Q5a) Is this considered bad habit? (Q5b) What's the problem with interpolation for static objects? (Q5c) Isn't providing unnecessary MotionStates for static objects just cruft? I thought it was just for easiness of explanation in the demos.
CF_KINEMATIC_OBJECT: this has 0 mass as well but it might move because of user control. The user moves it by providing a MotionState and messing with it. In line of concept I'm tempted to say that if mass is 0 and there's a MotionState then the objects is kinematic. But btCollisionObject cannot figure out this as only btRigidBody seems to keep track of the MotionState. Kinematic objects will push dynamic objects around to avoid visible intersection. Static and kinematic objects have no collision response but have detection only (btCollisionDispatcher::needsResponse).
So I'd say I see the point of having this flag.
But I still wonder why to not just give btCollisionObject a way to understand if a MotionState is there and simply work by inference. Like:
Code: Select all
if(mass) { /* dynamic */ }
else if(motionState) { /* kinematic */ }
else { /* static */ }
CF_NO_CONTACT_RESPONSE: pretty self-explanatory. I guess that's useful to make an object temporarily non-solid. Ok.
CF_CUSTOM_MATERIAL_CALLBACK: used in many demos in a way I don't quite understand. This seems to be "experimental", per-triangle friction/restitution. I think I don't need it for the time being.
CF_CHARACTER_OBJECT: this matches only twice in the demos. I wonder what's good for. I mean, if it's not used, (Q6) why is it there in the first place? Perhaps it is legacy?
CF_DISABLE_VISUALIZE_OBJECT and CF_DISABLE_SPU_COLLISION_PROCESSING are just ok.
I ask clarifications as I am trying to figure out when to modify what flags, and why (designing the interfaces to interact with the physics system).
Thank you.