Building graphics mesh from hkpConvexVerticesShape

Building graphics mesh from hkpConvexVerticesShape

Hello,
I'm implementing a physics debug system directly into my game so I can render all physics meshes directly so that I can see if they match with their graphical representation.

The problem I have is that I only know how to get vertex data from thehkpConvexVerticesShape, but not triangle indices so I cannot build a debug mesh from it. Does havok maybe have any helper functions for this or is this already done by havok by default and I just dont know where to get the mesh from or must I somehow make a convex hull builder myself ( D: )?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Hi n3xusslo,

We've got functions to help you build display geometry for your physics shapes. Check out hkpShapeDisplayBuilder::buildDisplayGeometries and how it's used in the demo framework. It will give you displayGeometry, from which you can extract an hkGeometry, which stores vertices and indices.

Let me know if this helps!

Pete

Developer Support Engineer
Havok
www.havok.com

Yeah, it works, thanks :D

Leave a Comment

Please sign in to add a comment. Not a member? Join today