Regular API function

simGetQHull / sim.getQHull

Description Retrieves the convex hull mesh from the specified vertices. See also sim.convexDecompose and sim.getDecimatedMesh.
C/C++
synopsis
simInt simGetQHull(const simFloat* inVertices,simInt inVerticesL,simFloat** verticesOut,simInt* verticesOutL,simInt** indicesOut,simInt* indicesOutL,simInt reserved1,const simFloat* reserved2)
C/C++
parameters
inVertices: a pointer to the input vertices (succession of x/y/z values).
inVerticesL: the number of input vertices times 3.
verticesOut: a pointer to a pointer to the output vertices. The output vertices are allocated by CoppeliaSim and the user is in charge of releasing the buffer via simReleaseBuffer.
verticesOutL: a pointer to the number of output vertices times 3.
indicesOut: a pointer to a pointer to the output indices. The output indices are allocated by CoppeliaSim and the user is in charge of releasing the buffer via simReleaseBuffer.
indicesOutL: a pointer to the number of output indices (i.e. the number of triangles times 3).
reserved1: reserved, set to 0.
reserved2: reserved, set to nullptr.
C/C++
return value
-1 or 0 if operation was not successful.
Lua
synopsis
float[] verticesOut,int[] indicesOut=sim.getQHull(float[] verticesIn)
Lua
parameters
verticesIn: a table containing the input vertices (succession of x/y/z values).
Lua
return values
verticesOut: a table containing the output vertices (succession of x/y/z values).
indicesOut: a table containing the output indices (3 values for each triangle).
Python
synopsis
list verticesOut,list indicesOut=sim.getQHull(list verticesIn)

<