Getting world coordinates of vertices of a convex hull body

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

Getting world coordinates of vertices of a convex hull body

Post by Ehsanizadi » Thu Jan 07, 2016 2:44 pm

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 » Thu Jan 07, 2016 9:29 pm

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 » Fri Jan 08, 2016 11:47 am

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: 71
Joined: Mon Dec 02, 2013 4:13 pm

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

Post by Ehsanizadi » Fri Jan 08, 2016 12:48 pm

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