Add C and MATLAB API function to create and modify meshes.
For the C-API these functions are:
CQCT_createMeshAndAllocateMemory(size_t nVertices, size_t nTriangles): Creates a mesh object and allocates enough memory to hold nVertices vertices and labels and nTriangles triangle indices.
CQCT_meshSetVertices(CQCT_Mesh mesh, float const *buffer): Copies vertices from buffer into the mesh vertex storage
CQCT_meshSetTriangles(CQCT_Mesh mesh, ptrdiff_t const *buffer): Copies triangles indices from buffer into the mesh index storage
CQCT_meshSetLabel(CQCT_Mesh mesh. unsigned int const *buffer): Copies the labels from buffer into the mesh label storage.
In the MATLAB-API the following setters were added:
set.Vertices
set.Indices
set.Labels
The constructor was extended to take two (or three) matrices as parameters and then constructs a mesh with the given vertices and indices (and labels).
If no labels are given, the labels are initialized with zeroes.
Add C and MATLAB API function to create and modify meshes.
For the C-API these functions are:
CQCT_createMeshAndAllocateMemory(size_t nVertices, size_t nTriangles)
: Creates a mesh object and allocates enough memory to holdnVertices
vertices and labels andnTriangles
triangle indices.CQCT_meshSetVertices(CQCT_Mesh mesh, float const *buffer)
: Copies vertices frombuffer
into the mesh vertex storageCQCT_meshSetTriangles(CQCT_Mesh mesh, ptrdiff_t const *buffer)
: Copies triangles indices frombuffer
into the mesh index storageCQCT_meshSetLabel(CQCT_Mesh mesh. unsigned int const *buffer)
: Copies the labels frombuffer
into the mesh label storage.In the MATLAB-API the following setters were added:
The constructor was extended to take two (or three) matrices as parameters and then constructs a mesh with the given vertices and indices (and labels). If no labels are given, the labels are initialized with zeroes.