<div>Hi,</div>
<div> </div>
<div>I'm not familiar with the Havok APIs or if it's even capable of using triangle meshes as colliders, but I felt a brief description of the ODE interface may be a good starting point.</div>
<div> </div>
<div>In a nutshell...</div>
<div> </div>
<div>ODE has some internal collider types that it uses for basic shapes such as a box or sphere. There is logic in OpenSimulator that tests a prim shape can be represented by an internal ODE collider, and if so, instructs ODE to use the appropriate internal shape. If the shape is more complex, CreateMesh() in Meshmerizer.cs is called which creates a triangle mesh suitable for a collider. Once the mesh is created, the mesh methods getVertexListAsPtrToFloatArray() and getIndexListAsPtrToIntArray() are called  (both in Mesh.cs) which return pointers to arrays containing the mesh data. The data are arranged as strided arrays of 32 bit floats for the vertex data, and 32 bit ints for the face index data.  The vertex positions are the only component of a triangle face as face normals are implied by the index order, and ODE only collides on the outward facing side of a triangle. These pointers reference arrays which are "pinned" in memory, as ODE is unmanaged code and is not able to safely access managed data structures. There is also a caching function built into the meshing system which attempts to keep all the pinned mesh data in one place in the heap and share the meshes as often as possible to save memory, however you shouldnt need to worry about that if you only use the pinned vertex arrays. If you need other formats, Mesh.cs contains the code which formats the arrays for ODE.</div>

<div> </div>
<div> Good luck  and keep us posted on your progress :)</div>
<div>-dahlia<br></div>
<div class="gmail_quote">On Thu, Oct 28, 2010 at 12:17 PM, ftechz <span dir="ltr"><<a href="mailto:ftechz@gmail.com">ftechz@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hello devs, 
<div><br></div>
<div>I'm attempting to create a wrapper for the free version of Havok to hook-up with opensim. I'm quite new to this so I'm not quite sure what exactly is required by opensim to make this possible. I'm especially confused by the mesher, how it integrates with ODE and how it may be used by Havok... among other things...</div>

<div>If anyone can give me some advice to point me in the right direction it would be helpful. I understand that not everyone will be able to use Havok in their sims due to licencing issues but I hope that people who are eligible may be able to use it in the future.</div>

<div><br></div>
<div>Thanks,</div>
<div>Phil</div><br>_______________________________________________<br>Opensim-dev mailing list<br><a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br><a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
<br></blockquote></div><br>