How to get btShape volume?
-
- Posts: 6
- Joined: Thu Sep 04, 2014 1:23 pm
How to get btShape volume?
I wish to implement a water with buyoancy using concaveConvexcastDemo code, but i need to calculate object volume, and object mass to use archimed formula. Someone knows?
-
- Posts: 6
- Joined: Thu Sep 04, 2014 1:23 pm
Re: How to get btShape volume?
Finally, i'm going to aproximate the mesh shape volume using the bounding box of the shape waiting for a better algorithm
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: How to get btShape volume?
I have some code that can compute the volume, center of mass, and inertia tensor of closed meshes and I've been looking for an excuse to clean it up and submit for public use. I'll try to get around to it, but I don't think I can get to it today.
-
- Posts: 849
- Joined: Tue Sep 30, 2014 6:03 pm
- Location: San Francisco
Re: How to get btShape volume?
I decided to rewrite my mass properties utility, clean up its unit tests and submit it to the public domain. I've attached a tarfile with the code. Alternatively you can download it from my google drive here.
The code will compute the volume, center of mass, and inertia tensor of any closed mesh.
The code will compute the volume, center of mass, and inertia tensor of any closed mesh.
You do not have the required permissions to view the files attached to this post.