Does Havok's `DebugGeometryInfo` also have face normals data?

DebugGeometryInfo type definition:

export type DebugGeometryInfo = [
    /* Address of vertex (float3) buffer in plugin */ number,
    /* Number of vertices in the buffer */ number,
    /* Address of triangle (int, int, int) buffer in plugin */ number,
    /* Number of triangle in the buffer */ number
];

I was wondering if DebugGeometryInfo also has data on the normal for each triangle? Hopefully, there’s a byte offset internally where this data is stored :smile:

Bullet and PhysX geometry debug visualizations include normal vectors for each triangle face, which was super helpful in debugging whether my meshes were “inside-out”. It would be amazing if Havok had this data too and its byte offset could be exposed

Thank you all for your help!

This is a question for @eoin :slight_smile:

1 Like

We never calculate normals for the debug geometry. The triangles are wound counter-clockwise, so you can simply compute the normal for a single triangle by (vertex1 - vertex0) cross (vertex2 - vertex0)

2 Likes

Thank you so much, @eoin and @Cedric !