Const correctness of NvFlexUpdateConvexMesh in Flex API

Hi. First post here so sorry if it’s in the wrong place, but I couldn’t see a forum dedicated to Flex specifically.

Anyhow I just wanted to clarify about the NvFlexUpdateConvexMesh function in the Flex API. The signature for the function is

NV_FLEX_API void NvFlexUpdateConvexMesh(NvFlexLibrary* lib, NvFlexConvexMeshId convex, NvFlexBuffer* planes, int numPlanes, float* lower, float* upper);

As I understand it, the last two parameters are for input only, but are not marked as const. Does this mean that they can be changed? I ask because other functions in the API seem to follow const correctness; for example the equivalent function for triangle meshes.

NV_FLEX_API void NvFlexUpdateTriangleMesh(NvFlexLibrary* lib, NvFlexTriangleMeshId mesh, NvFlexBuffer* vertices, NvFlexBuffer* indices, int numVertices, int numTriangles, const float* lower, const float* upper);

If NvFlexUpdateConvexMesh is indeed using lower and upper just as inputs, could they be made const in a future update for consistency with other parts of the API?

Hi Laurie,

Thanks for pointing this out - yes it seems these should be marked as const. I’ll add a task to address this in the next revision.

Cheers,
Miles

Hi Miles. Thanks for confirming that! Good to know. Cheers!