btConvexHullShape Vertex Transform

TheAnum
Posts: 3
Joined: Thu Sep 16, 2010 1:36 am

btConvexHullShape Vertex Transform

Post by TheAnum »

Hi,

My program has a few objects modeled using the btConvexHullShape(actually classes derived from it). I need to access the absolute transformed world positions of all the points in these objects. How do I do this?

Here is what I have thought so far:
-Calculate and store the local position of all the points relative to the origin of the object.
-Calculate the current position of all the points by rotating them using quatRotate() and adding the current origin using getOrigin()

Only problem with this is I don't know how to get the local position of the points. How do I calculate the initial origin of a covex hull shape (before it's set by the user)?

Is this all a completely ridiculous way of doing this?

I am very new to this so forgive me if this is a stupid question (and hopefully point me in the right direction).
Thanks!

Ps: Stuff is due tommorrow so some early help would be very much appretiated :)
TheAnum
Posts: 3
Joined: Thu Sep 16, 2010 1:36 am

Re: btConvexHullShape Vertex Transform

Post by TheAnum »

Update: Well I found out that bullet is using the world origin (0,0,0) as the origin of the covex hull even if the shape of the convex hull is defined using points in a completely different place.

Just gotta make sure that when defining the convex hull shape you keep the origin of the covex hull at the origin of the world.

Wish all this was written somewhere... would save so much time.