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
Getting world coordinates of vertices of a convex hull body
-
- Posts: 72
- Joined: Mon Dec 02, 2013 4:13 pm
-
- Posts: 29
- Joined: Sat May 18, 2013 1:36 am
- Location: NY
Re: Getting world coordinates of vertices of a convex hull b
Take a look at the GL_ShapeDrawer class it has everything you need.
-
- Posts: 13
- Joined: Sun Oct 25, 2015 10:17 am
Re: Getting world coordinates of vertices of a convex hull b
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.
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.
-
- Posts: 72
- Joined: Mon Dec 02, 2013 4:13 pm
Re: Getting world coordinates of vertices of a convex hull b
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.