iversons
29-10-2006 10:38:54
I have read the documentation for many days about the mass/force, but i really cannot understand the following code about mass.
anyone can help would be appreciated.
Ogre::Vector3 inertia = OgreNewt::MomentOfInertia::CalcSphereSolid( 10.0, 1.0 );
body->setMassMatrix( 10, inertia );
Thanks
jorrit5477
29-10-2006 14:42:19
What part do you not understand?
If you do not know what the moment of inertia method does, I'll try to give some short explanation. Please correct me if I am wrong.
Moment of inertia defines how the mass of an object is spread over the object. A ring of the same dimensions and mass has a completely different spread of this mass as opposed to a closed cylinder, or a solid sphere, or a hollow sphere.
The first function calculates a Matrix holding information about this spread, which you can apply to a rigid body (done in the second function).
Game_Ender
29-10-2006 16:29:21
Moment of Inertia is like mass but for rotations only. This page has a good list of parallels:
here. Remember Newton is a dynamics engine, so its helpful that you have a basic grasp of the physics behind dynamics to use it.
jorrit5477
29-10-2006 18:37:19
Mmm, yups, my mistake...
Clear page though on the subject, good to see these equivalents next to eachother