Blender Git Commit Log
Git Commits -> Revision 4633e65
Revision 4633e65 by Lukas Toenne (master) July 11, 2014, 10:16 (GMT) |
Fix T41019: Calculate Mass does not calculate actual volume. This was a ToDo item, for mesh-based rigid body shapes (trimesh, convex) the operator was simply using the bounding box volume, which can grossly overestimate the volume and mass. Calculating the actual volume of a mesh is not so difficult after all, see e.g. http://research.microsoft.com/en-us/um/people/chazhang/publications/icip01_ChaZhang.pdf This patch also allows calculating the center-of-mass in the same way. This is currently unused, because the rigid body system assumes the CoM to be the same as the geometric object center. This is fine most of the time, adding such user settings for "center-of-mass offset" would also add quite a bit of complexity in user space, but it could be necessary at some point. A number of other physical properties could be calculated using the same principle, e.g. the moment of inertia. |
Commit Details:
Full Hash: 4633e655dc59b68d622e3319102d5050245a22eb
Parent Commit: 78d38a9
Lines Changed: +319, -73
7 Modified Paths:
/source/blender/blenkernel/BKE_mesh.h (+4, -0) (Diff)
/source/blender/blenkernel/BKE_rigidbody.h (+3, -0) (Diff)
/source/blender/blenkernel/intern/mesh_evaluate.c (+119, -0) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+179, -0) (Diff)
/source/blender/blenlib/BLI_math_geom.h (+1, -0) (Diff)
/source/blender/blenlib/intern/math_geom.c (+12, -0) (Diff)
/source/blender/editors/physics/rigidbody_object.c (+1, -73) (Diff)
/source/blender/blenkernel/BKE_rigidbody.h (+3, -0) (Diff)
/source/blender/blenkernel/intern/mesh_evaluate.c (+119, -0) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+179, -0) (Diff)
/source/blender/blenlib/BLI_math_geom.h (+1, -0) (Diff)
/source/blender/blenlib/intern/math_geom.c (+12, -0) (Diff)
/source/blender/editors/physics/rigidbody_object.c (+1, -73) (Diff)