Questioin about btConvexHullShape.

Please don't post Bullet support questions here, use the above forums instead.
qingteng
Posts: 14
Joined: Tue Jul 06, 2010 5:20 pm

Questioin about btConvexHullShape.

Post by qingteng »

When I used btConvexHullShape to build a convex shape, is it a solid or just surface?
Where is the center of gravity? Is it in the shape or on the surface?
User avatar
jarno
Posts: 57
Joined: Tue Mar 16, 2010 1:42 am

Re: Questioin about btConvexHullShape.

Post by jarno »

qingteng wrote:When I used btConvexHullShape to build a convex shape, is it a solid or just surface?
Neither. It is a pointcloud.
Where is the center of gravity?
The center of gravity (or the center of mass) is at the origin of the convex hull shape. Bullet does not calculate a center of mass. If you need the center of mass to be somewhere else, either move the points used to create the convex hull shape, or place the convex hull shape in a compound with a position transform.

As for the inertia obtained through calculateLocalInertia(), Bullet uses the bounding box and considers it solid.

---JvdL---
qingteng
Posts: 14
Joined: Tue Jul 06, 2010 5:20 pm

Re: Questioin about btConvexHullShape.

Post by qingteng »

jarno, thank you for your prompt reply. I got it.
jarno wrote:
qingteng wrote:When I used btConvexHullShape to build a convex shape, is it a solid or just surface?
Neither. It is a pointcloud.
Where is the center of gravity?
The center of gravity (or the center of mass) is at the origin of the convex hull shape. Bullet does not calculate a center of mass. If you need the center of mass to be somewhere else, either move the points used to create the convex hull shape, or place the convex hull shape in a compound with a position transform.

As for the inertia obtained through calculateLocalInertia(), Bullet uses the bounding box and considers it solid.

---JvdL---