Getting world coordinates of vertices of a convex hull body

Post Reply
Ehsanizadi
Posts: 72
Joined: Mon Dec 02, 2013 4:13 pm

Getting world coordinates of vertices of a convex hull body

Post by Ehsanizadi »

Hi,

Does anyone know how to get coordinates of every vertices of a convexHull object?

I have a convex hull object in my scene, and I want to get the coordinates of its all vertices (x,y,z) in every time step.

Thanks
Ehsan
StabInTheDark
Posts: 29
Joined: Sat May 18, 2013 1:36 am
Location: NY
Contact:

Re: Getting world coordinates of vertices of a convex hull b

Post by StabInTheDark »

Take a look at the GL_ShapeDrawer class it has everything you need.
amatic
Posts: 13
Joined: Sun Oct 25, 2015 10:17 am

Re: Getting world coordinates of vertices of a convex hull b

Post by amatic »

Should be something like "centerOfMassTransform * point " for each point i.

point is the location of the vertex relative to the center of mass of the object, and centerOfMassTransform is a quaternion representing the translation and rotation of the object at some point in time.

Multiplying a quaternion and a point gives you a translated and rotated point.
Ehsanizadi
Posts: 72
Joined: Mon Dec 02, 2013 4:13 pm

Re: Getting world coordinates of vertices of a convex hull b

Post by Ehsanizadi »

amatic wrote:Should be something like "centerOfMassTransform * point " for each point i.

point is the location of the vertex relative to the center of mass of the object, and centerOfMassTransform is a quaternion representing the translation and rotation of the object at some point in time.

Multiplying a quaternion and a point gives you a translated and rotated point.


Thanks.
Post Reply