Hi!
I'm trying to implement a debug view, where I can see the collision meshes of all scene objects, espacially of those ones having a convex hull shaped collision mesh. I'm using the vertices of the collision infomation shape of the entity class, but it seems like that I cannot render them as a closed mesh, because I have no idea how they are arranged. Do they match a specific XNA primitve type or do I have to use indices to render them?
Thanks
Izzo
Render Collision Mesh
Re: Render Collision Mesh
A convex hull is a point cloud, so there is no connectivity information. You'll need to triangulate it first in order to render it. The convex hull algorithm outputs surface triangles so re-running it on the data would do the trick.
Instead of creating your own debug drawer, it's easier to use the BEPUphysicsDrawer library in the BEPUphysicsDemos. You can get the source for it over in the main source download: http://bepuphysics.codeplex.com/SourceC ... changesets
Instead of creating your own debug drawer, it's easier to use the BEPUphysicsDrawer library in the BEPUphysicsDemos. You can get the source for it over in the main source download: http://bepuphysics.codeplex.com/SourceC ... changesets