CortidQCT
1.2.2.52
|
Classes | |
struct | CQCT_VoxelVolumeSize |
VoxelVolume size. More... | |
struct | CQCT_VoxelVolumeVoxelSize |
VoxelVolume voxel size. More... | |
struct | CQCT_BarycentricPoint_t |
Barycentric point type. More... | |
struct | CQCT_Ray_t |
Ray type. More... | |
struct | CQCT_RayMeshIntersection |
Generic Functions / Object Type | |
typedef void * | Id |
Generic 'object' type. | |
CQCT_EXTERN Id | CQCT_retain (Id obj) |
Retains an object, i.e. increments its retain count. | |
CQCT_EXTERN void | CQCT_release (Id obj) |
CQCT_EXTERN Id | CQCT_autorelease (Id obj) |
CQCT_EXTERN void | CQCT_autoreleasePoolPush () |
Adds a new autorelease pool to the stack. | |
CQCT_EXTERN void | CQCT_autoreleasePoolPop () |
Error type | |
enum | CQCT_ErrorId { CQCT_ErrorId_Unknown, CQCT_ErrorId_InvalidArgument, CQCT_ErrorId_OutOfRange, CQCT_ErrorId_Unknown, CQCT_ErrorId_InvalidArgument } |
Error types/Ids. | |
typedef struct CQCT_Error_t * | CQCT_Error |
Error type. | |
CQCT_EXTERN CQCT_Error | CQCT_createError (enum CQCT_ErrorId id, const char *message) |
Creates an error object. | |
CQCT_EXTERN enum CQCT_ErrorId | CQCT_errorType (CQCT_Error error) |
Returns the error id. | |
CQCT_EXTERN const char * | CQCT_errorMessage (CQCT_Error error) |
Returns the error message. | |
VoxelVolume type | |
typedef struct CQCT_VoxelVolume_t * | CQCT_VoxelVolume |
Voxel volume handle type. | |
CQCT_EXTERN CQCT_VoxelVolume | CQCT_createVoxelVolume () |
Creates an empty voxel volume. | |
CQCT_EXTERN int | CQCT_voxelVolumeLoadFromFile (CQCT_VoxelVolume volume, const char *filename, CQCT_Error *error) |
Loads the voxel volume from file. | |
CQCT_EXTERN CQCT_VoxelVolumeSize | CQCT_voxelVolumeSize (CQCT_VoxelVolume volume) |
Returns the size of the voxel volume. | |
CQCT_EXTERN CQCT_VoxelVolumeVoxelSize | CQCT_voxelVolumeVoxelSize (CQCT_VoxelVolume volume) |
Returns the size of a voxel. | |
CQCT_EXTERN size_t | CQCT_voxelVolumeCopyVoxels (CQCT_VoxelVolume volume, float **buffer) |
Copies the voxel data to the given buffer. | |
Custom Color To Label Map | |
typedef struct CQCT_ColorToLabelMap_t * | CQCT_ColorToLabelMap |
ColorToLabelMap handle type. | |
Mesh type | |
typedef struct CQCT_Mesh_t * | CQCT_Mesh |
Mesh handle type. | |
typedef struct CQCT_BarycentricPoint_t | CQCT_BarycentricPoint |
typedef struct CQCT_Ray_t | CQCT_Ray |
typedef struct CQCT_RayMeshIntersection | CQCT_RayMeshIntersection |
CQCT_EXTERN CQCT_Mesh | CQCT_createMesh () |
Creates an empty mesh. | |
CQCT_EXTERN CQCT_Mesh | CQCT_createMeshAndAllocateMemory (size_t nVertices, size_t nTriangles, CQCT_Error *error) |
Creates an mesh and reserve space for vertices and indices. More... | |
CQCT_EXTERN CQCT_Mesh | CQCT_meshFromFile (const char *filename, CQCT_Error *error) |
Creates and loads a mesh from file. More... | |
CQCT_EXTERN CQCT_Mesh | CQCT_meshFromFileWithCustomMapping (const char *filename, CQCT_ColorToLabelMap map, CQCT_Error *error) |
Creates and loads a mesh from file using the given custom color to label mapping. More... | |
CQCT_EXTERN CQCT_Mesh | CQCT_meshAndLabelsFromFile (const char *meshFilename, const char *labelFilename, CQCT_Error *error) |
Creates and loads a mesh from a mesh and a label file. More... | |
CQCT_EXTERN int | CQCT_loadMesh (CQCT_Mesh mesh, const char *filename, CQCT_Error *error) |
Loads a mesh from file. | |
CQCT_EXTERN int | CQCT_loadMeshWithCustomMapping (CQCT_Mesh mesh, const char *filename, CQCT_ColorToLabelMap map, CQCT_Error *error) |
Loads a mesh from file using a custom color to label map. | |
CQCT_EXTERN int | CQCT_loadMeshAndLabels (CQCT_Mesh mesh, const char *meshFilename, const char *labelFilename, CQCT_Error *error) |
Loads a mesh from mesh and label file. | |
CQCT_EXTERN int | CQCT_meshAndLabelsWriteToFile (CQCT_Mesh mesh, const char *meshFilename, const char *labelsFilename, CQCT_Error *error) |
Writes mesh and labels to seperate files. | |
CQCT_EXTERN size_t | CQCT_meshVertexCount (CQCT_Mesh mesh) |
Return number of vertices of the given mesh. | |
CQCT_EXTERN size_t | CQCT_meshTriangleCount (CQCT_Mesh mesh) |
Return number of triangles of the given mesh. | |
CQCT_EXTERN size_t | CQCT_meshCopyVertices (CQCT_Mesh mesh, float **bufferPtr) |
Copies the mesh's vertices into the given buffer. More... | |
CQCT_EXTERN void | CQCT_meshSetVertices (CQCT_Mesh mesh, float const *buffer) |
Copies the vertices from the given buffer into the mesh data structure. More... | |
CQCT_EXTERN size_t | CQCT_meshCopyVertexNormals (CQCT_Mesh mesh, float **bufferPtr) |
Copies the mesh's per-vertex normals into the given buffer. More... | |
CQCT_EXTERN void | CQCT_meshSetVertexNormals (CQCT_Mesh mesh, float const *buffer) |
Copies the per-vertex normals from the given buffer into the mesh data structure. More... | |
CQCT_EXTERN size_t | CQCT_meshCopyTriangles (CQCT_Mesh mesh, ptrdiff_t **bufferPtr) |
Copies the mesh's indices into the given buffer. More... | |
CQCT_EXTERN void | CQCT_meshSetTriangles (CQCT_Mesh mesh, ptrdiff_t const *buffer) |
Copies the triangle indices from the given buffer into the mesh data structure. More... | |
CQCT_EXTERN size_t | CQCT_meshCopyLabels (CQCT_Mesh mesh, unsigned int **bufferPtr) |
Copies the mesh's labels into the given buffer. More... | |
CQCT_EXTERN void | CQCT_meshSetLabels (CQCT_Mesh mesh, unsigned int const *buffer) |
Copies the vertex labels from the given buffer into the mesh data structure. More... | |
CQCT_EXTERN int | CQCT_meshBarycentricToCartesian (CQCT_Mesh mesh, CQCT_BarycentricPoint const *barycentricPtr, size_t nPoints, float **bufferPtr, CQCT_Error *error) |
Converts the given list of barycentric points in cartesian coordinates. More... | |
CQCT_EXTERN int | CQCT_meshBarycentricInterpolation (CQCT_Mesh mesh, CQCT_BarycentricPoint const *barycentricPtr, size_t nPoints, float const *attributePtr, size_t attributeDimensions, float **bufferPtr, CQCT_Error *error) |
Interpolates attribute values given at mesh vertices at arbitrary points on the surface of the mesh. More... | |
CQCT_EXTERN size_t | CQCT_meshRayIntersections (CQCT_Mesh mesh, CQCT_Ray *raysPtr, size_t nRays, CQCT_RayMeshIntersection **intersectionsOutPtr) |
Computes the intersection of a set of rays with the mesh. More... | |
CQCT_EXTERN void | CQCT_meshUpsample (CQCT_Mesh mesh, size_t nTimes) |
Upsamples the given mesh nTimes without touchting the original vertices. More... | |
CQCT_EXTERN void | CQCT_meshUpdatePerVertexNormals (CQCT_Mesh mesh) |
Re-computes per-vertex normals. More... | |
ColorToLabelMap object type | |
CQCT_EXTERN CQCT_ColorToLabelMap | CQCT_createColorToLabelMap () |
Creates a default color to label map. | |
CQCT_EXTERN int | CQCT_colorToLabelMapLoadFromFile (CQCT_ColorToLabelMap map, const char *filename, CQCT_Error *error) |
Loads the mapping from YAML file. | |
CQCT_EXTERN size_t | CQCT_colorToLabelMapEntryCount (CQCT_ColorToLabelMap map) |
Returns number of entries of the map. | |
CQCT_EXTERN size_t | CQCT_colorToLabelMapCopyEntries (CQCT_ColorToLabelMap map, unsigned int **bufferPtr) |
Copies the entries of the map into the given buffer. More... | |
CQCT_EXTERN void | CQCT_colorToLabelMapSetEntries (CQCT_ColorToLabelMap map, size_t count, const unsigned int *entries) |
Sets the entries of the mapping. | |
MeshFitterState object type | |
typedef struct CQCT_MeshFitter_t * | CQCT_MeshFitter |
Mesh fitter handle type. | |
typedef struct CQCT_MeshFitterState_t * | CQCT_MeshFitterState |
Mesh fitter state handle type. | |
typedef CQCT_MeshFitterState | CQCT_MeshFitterResult |
Mesh fitter result object. | |
CQCT_EXTERN CQCT_MeshFitterState | CQCT_createMeshFitterState (CQCT_MeshFitter fitter, CQCT_VoxelVolume volume) |
Creates an MeshFitter optimization state object. | |
CQCT_EXTERN CQCT_Mesh | CQCT_meshFitterResultReferenceMesh (CQCT_MeshFitterResult result) |
Returns the result reference mesh. | |
CQCT_EXTERN CQCT_Mesh | CQCT_meshFitterResultMesh (CQCT_MeshFitterResult result) |
Returns the result mesh. | |
CQCT_EXTERN size_t | CQCT_meshFitterResultCopyDisplacementVector (CQCT_MeshFitterResult result, float **buffer) |
Copies the displacement vector. | |
CQCT_EXTERN void | CQCT_meshFitterResultSetDisplacementVector (CQCT_MeshFitterResult result, float const *buffer) |
Sets the displacement vector. | |
CQCT_EXTERN size_t | CQCT_meshFitterResultCopyWeights (CQCT_MeshFitterResult result, float **buffer) |
Copies the weight vector. | |
CQCT_EXTERN void | CQCT_meshFitterResultSetWeights (CQCT_MeshFitterResult result, float const *buffer) |
Sets the weight vector. | |
CQCT_EXTERN size_t | CQCT_meshFitterResultCopyVertexNormals (CQCT_MeshFitterResult result, float **buffer) __attribute__((deprecated("Use normals stored in deformedMesh instead."))) |
CQCT_EXTERN size_t | CQCT_meshFitterResultVolumeSamplingPositionsCount (CQCT_MeshFitterResult result) |
Returns the number of volume sampling positions. | |
CQCT_EXTERN size_t | CQCT_meshFitterResultCopyVolumeSamplingPositions (CQCT_MeshFitterResult result, float **buffer) |
Copies the volume sampling positions. | |
CQCT_EXTERN size_t | CQCT_meshFitterResultCopyVolumeSamples (CQCT_MeshFitterResult result, float **buffer) |
Copies the volume samples. | |
CQCT_EXTERN float | CQCT_meshFitterResultMinimumDisplacementNorm (CQCT_MeshFitterResult result) |
Returns the minimum norm of the displacement vector. | |
CQCT_EXTERN float | CQCT_meshFitterResultLogLikelihood (CQCT_MeshFitterResult result) |
Returns the current log likelihood of the model given the input volume. | |
CQCT_EXTERN float | CQCT_meshFitterResultCopyPerVertexLogLikelihood (CQCT_MeshFitterResult result, float **buffer) |
CQCT_EXTERN void | CQCT_meshFitterResultSetLogLikelihood (CQCT_MeshFitterResult result, float ll) |
Sets the current log likelihood of the model given the input volume. | |
CQCT_EXTERN float | CQCT_meshFitterResultEffectiveSigmaS (CQCT_MeshFitterResult result) |
Returns the current effective sigmaS (after applying decay) | |
CQCT_EXTERN size_t | CQCT_meshFitterResultIterationCount (CQCT_MeshFitterResult result) |
Returns the iteration count. | |
CQCT_EXTERN void | CQCT_meshFitterResultSetIterationCount (CQCT_MeshFitterResult result, size_t count) |
Sets the iteration count. | |
CQCT_EXTERN int | CQCT_meshFitterResultHasConverged (CQCT_MeshFitterResult result) |
Returns whether the optimization has converged. | |
CQCT_EXTERN void | CQCT_meshFitterResultSetHasConverged (CQCT_MeshFitterResult result, int converged) |
Sets whether the optimization has converged. | |
CQCT_EXTERN int | CQCT_meshFitterResultSuccess (CQCT_MeshFitterResult result) |
Returns whether the optimization was successfull. | |
CQCT_EXTERN void | CQCT_meshFitterResultSetSuccess (CQCT_MeshFitterResult result, int success) |
Sets whether the optimization was successfull. | |
CQCT_EXTERN size_t | CQCT_meshFitterResultNonDecreasingCount (CQCT_MeshFitterResult result) |
Returns the current non decreasing count. | |
CQCT_EXTERN void | CQCT_meshFitterResultSetNonDecreasingCount (CQCT_MeshFitterResult result, size_t count) |
Sets the current non decreasing count. | |
CQCT_EXTERN size_t | CQCT_meshFitterStateCopyModelSamplingPositions (CQCT_MeshFitterState state, float **buffer) |
Copies the model sampling positions. | |
MeshFitter object type | |
CQCT_EXTERN CQCT_MeshFitter | CQCT_createMeshFitter (const char *filename, CQCT_Error *error) |
Creates a mesh fitter given the configuration file. | |
CQCT_EXTERN CQCT_MeshFitterResult | CQCT_meshFitterFit (CQCT_MeshFitter meshFitter, CQCT_VoxelVolume volume) |
Fits the reference mesh to the given voxel volume. | |
CQCT_EXTERN int | CQCT_meshFitterFitOneIteration (CQCT_MeshFitter meshFitter, CQCT_MeshFitterState state, CQCT_Error *error) |
Runs one iteration of the fitting algorithm. | |
CQCT_EXTERN int | CQCT_meshFitterVolumeSamplingStep (CQCT_MeshFitter meshFitter, CQCT_MeshFitterState state, CQCT_Error *error) |
Runs the volume sampling step. | |
CQCT_EXTERN int | CQCT_meshFitterOptimalDisplacementStep (CQCT_MeshFitter meshFitter, CQCT_MeshFitterState state, CQCT_Error *error) |
Runs the displacement optimization step. | |
CQCT_EXTERN int | CQCT_meshFitterOptimalDeformationStep (CQCT_MeshFitter meshFitter, CQCT_MeshFitterState state, CQCT_Error *error) |
Runs the deformation optimization step. | |
CQCT_EXTERN int | CQCT_meshFitterLogLikelihoodStep (CQCT_MeshFitter meshFitter, CQCT_MeshFitterState state, CQCT_Error *error) |
Runs the log likelihood computation step. | |
CQCT_EXTERN int | CQCT_meshFitterConvergenceTestStep (CQCT_MeshFitter meshFitter, CQCT_MeshFitterState state, CQCT_Error *error) |
Runs the convergence testing step. | |
C API for CortidQCT.
The C API uses a reference counting object concept. Each 'object' has a retain count. If the user wants to retain / keep an object the retain count have to be incremented by called CQCT_retain()
. Once the object is no longer required, CQCT_release()
should be called to decrement the retain count. Once the retain count reaces zero the object is destroyed and the allocated memory is released. THIS MECHANISM IS NOT THREAD SAFE!
Naming Conventions
CQCT_
.CQCT_create
transfer the ownership of the returned object to the caller, i.e. the caller is responsible to calling CQCT_release()
on the object.Memory Managfement
CQCT_autoreleasePoolPush()
must be called before any other API call.CQCT_autoreleasePoolPop()
must be called after the last API call.CQCT_retain()
.CQCT_release()
.CQCT_create*
functions are automatically owned by the caller, so no retain is required.CQCT_release
when they are no longer needed.Example
An example can be found in bindings/C/examples/cli.c:
Adds the object to the current autorelease pool. It's released when the pool is released.
CQCT_EXTERN void CQCT_autoreleasePoolPop | ( | ) |
Removes the current autorelease pool from the stack and releases all of its objects
CQCT_EXTERN size_t CQCT_colorToLabelMapCopyEntries | ( | CQCT_ColorToLabelMap | map, |
unsigned int ** | bufferPtr | ||
) |
Copies the entries of the map into the given buffer.
If *bufferPtr == NULL
the memory for the buffer is allocated by the function and the caller is responisble for releasing it. Entries are in the follwing order: [R0, G0, B0, L0, R1, G1, B1, L1, ...].
CQCT_EXTERN CQCT_Mesh CQCT_createMeshAndAllocateMemory | ( | size_t | nVertices, |
size_t | nTriangles, | ||
CQCT_Error * | error | ||
) |
Creates an mesh and reserve space for vertices and indices.
Creates a mesh data structure and allocate memory for vertices, indices and labels.
[in] | nVertices | Number of vertices to allocate memory for |
[in] | nTriangles | Number of triangles to allocate memory for |
[out] | error | In case of an error, an error object is copied to *error . NULL may be passed here to not get any error objects. |
error
here. CQCT_EXTERN CQCT_Mesh CQCT_meshAndLabelsFromFile | ( | const char * | meshFilename, |
const char * | labelFilename, | ||
CQCT_Error * | error | ||
) |
Creates and loads a mesh from a mesh and a label file.
[in] | meshFilename | path to the file to load the mesh from |
[in] | labelFilename | path to the file to load the labels from |
[out] | error | In case of an error, an error object is copied to *error . NULL may be passed here to not get any error object. |
CQCT_EXTERN int CQCT_meshBarycentricInterpolation | ( | CQCT_Mesh | mesh, |
CQCT_BarycentricPoint const * | barycentricPtr, | ||
size_t | nPoints, | ||
float const * | attributePtr, | ||
size_t | attributeDimensions, | ||
float ** | bufferPtr, | ||
CQCT_Error * | error | ||
) |
Interpolates attribute values given at mesh vertices at arbitrary points on the surface of the mesh.
[in] | mesh | Mesh object |
[in] | barycentricPtr | pointer to a list of points in barycentric representation |
[in] | nPoints | number of points |
[in] | attributePtr | pointer to attribute buffer. Note that this buffer must hold attributeDimensions * N values, where N is the number of vertices in the mesh. |
[in] | attributeDimensions | number of attribute dimensions |
[out] | bufferPtr | Pointer where the interpolated values are stored. Must be able to hold nPoints * attributeDimensions values. Alternatively, if *bufferPtr == NULL , the required memory is allocated by the function and the pointer is returned in bufferPtr . The caller is responisble for releasing the memory, in both cases. |
[out] | error | pointer to an error object. If NULL errors are ignored. |
barycentricPtr != NULL || nPoint == 0
bufferPtr != NULL || nPoints == 0
CQCT_EXTERN int CQCT_meshBarycentricToCartesian | ( | CQCT_Mesh | mesh, |
CQCT_BarycentricPoint const * | barycentricPtr, | ||
size_t | nPoints, | ||
float ** | bufferPtr, | ||
CQCT_Error * | error | ||
) |
Converts the given list of barycentric points in cartesian coordinates.
[in] | mesh | Mesh object |
[in] | barycentricPtr | pointer to list of points in barycentric representation |
[in] | nPoints | number of points to convert |
[out] | bufferPtr | Pointer to the output buffer. The buffer must be able to hold 3 * N floats. Alternatively, bufferPtr can point to a NULL pointer. In this case the required memory is allocated by the function. Note that in both variants the caller is responsible for releasing the memory. |
[out] | error | pointer to error object where an error is stored in case of an error. Or NULL if no error should be returned. |
barycentricPtr != NULL || nPoints == 0
bufferPtr != NULL
CQCT_EXTERN size_t CQCT_meshCopyLabels | ( | CQCT_Mesh | mesh, |
unsigned int ** | bufferPtr | ||
) |
Copies the mesh's labels into the given buffer.
CQCT_EXTERN size_t CQCT_meshCopyTriangles | ( | CQCT_Mesh | mesh, |
ptrdiff_t ** | bufferPtr | ||
) |
Copies the mesh's indices into the given buffer.
CQCT_EXTERN size_t CQCT_meshCopyVertexNormals | ( | CQCT_Mesh | mesh, |
float ** | bufferPtr | ||
) |
Copies the mesh's per-vertex normals into the given buffer.
If the pointer pointed to by bufferPtr (i.e. *bufferPtr
) is NULL, memory is allocated, otherwise the pointed to memory is used.
mesh | Mesh object to inspect |
bufferPtr | Pointer to a pointer to the start of a memory buffer, that is large enough to hold 3 * N * sizeof(float) (N = number of verices) bytes.* Alternativly, bufferPtr can point to a NULL pointer. In that case the required memory is allocated by the function. |
*bufferPtr == NULL
it's the size of the allocated buffer. *bufferPtr == NULL
). CQCT_EXTERN size_t CQCT_meshCopyVertices | ( | CQCT_Mesh | mesh, |
float ** | bufferPtr | ||
) |
Copies the mesh's vertices into the given buffer.
If the pointer pointed to by bufferPtr (i.e. *bufferPtr
) is NULL, memory is allocated, otherwise the pointed to memory is used.
mesh | Mesh object to inspect |
bufferPtr | Pointer to a pointer to the start of a memory buffer, that is large enough to hold 3 * N * sizeof(float) (N = number of verices) bytes. Alternativly, bufferPtr can point to a NULL pointer. In that case the required memory is allocated by the function. |
*bufferPtr == NULL
it's the size of the allocated buffer. *bufferPtr == NULL
). CQCT_EXTERN float CQCT_meshFitterResultCopyPerVertexLogLikelihood | ( | CQCT_MeshFitterResult | result, |
float ** | buffer | ||
) |
Copies the current per-vertex log likelihood vector of the model given the input volume to the given buffer
CQCT_EXTERN size_t CQCT_meshFitterResultCopyVertexNormals | ( | CQCT_MeshFitterResult | result, |
float ** | buffer | ||
) |
Copies the vertex normals
CQCT_EXTERN CQCT_Mesh CQCT_meshFromFile | ( | const char * | filename, |
CQCT_Error * | error | ||
) |
Creates and loads a mesh from file.
[in] | filename | path to the file to load the mesh from |
[out] | error | In case of an error, an error object is copied to *error . NULL may be passed here to not get any error object. |
CQCT_EXTERN CQCT_Mesh CQCT_meshFromFileWithCustomMapping | ( | const char * | filename, |
CQCT_ColorToLabelMap | map, | ||
CQCT_Error * | error | ||
) |
Creates and loads a mesh from file using the given custom color to label mapping.
[in] | filename | path to the file to load the mesh from |
[in] | map | custom color to label map object |
[out] | error | In case of an error, an error object is copied to *error . NULL may be passed here to not get any error object. |
CQCT_EXTERN size_t CQCT_meshRayIntersections | ( | CQCT_Mesh | mesh, |
CQCT_Ray * | raysPtr, | ||
size_t | nRays, | ||
CQCT_RayMeshIntersection ** | intersectionsOutPtr | ||
) |
Computes the intersection of a set of rays with the mesh.
If for any ray no intersection can be found, its signed distance t
is set to infinity.
[in] | mesh | Mesh object |
[in] | raysPtr | pointer to array of CQCT_Ray objects |
[in] | nRays | Number of rays |
[out] | intersectionsOutPtr | Pointer that contains the memory address where the intersection object should be stored. the underlying memory must be able to hold nRays * sizeof(CQCT_RayMeshIntersection) bytes. Alternatively, the address contained in intersectionsOutPtr can be set to NULL. In this case the memory is allocated by the function. The caller is responsible for relasing the memory, in all cases. |
mesh != NULL || nRays == 0
raysPtr != NULL || nRays == 0
intersectionsOutPtr != NULL || nRays == 0
*intersecionsOutPtr
CQCT_EXTERN void CQCT_meshSetLabels | ( | CQCT_Mesh | mesh, |
unsigned int const * | buffer | ||
) |
Copies the vertex labels from the given buffer into the mesh data structure.
[in,out] | mesh | mesh to set the indices for |
[in] | buffer | buffer to copy the indices from |
CQCT_EXTERN void CQCT_meshSetTriangles | ( | CQCT_Mesh | mesh, |
ptrdiff_t const * | buffer | ||
) |
Copies the triangle indices from the given buffer into the mesh data structure.
[in,out] | mesh | mesh to set the indices for |
[in] | buffer | buffer to copy the indices from |
CQCT_EXTERN void CQCT_meshSetVertexNormals | ( | CQCT_Mesh | mesh, |
float const * | buffer | ||
) |
Copies the per-vertex normals from the given buffer into the mesh data structure.
[in,out] | mesh | mesh to set the vertex normals for |
[in] | buffer | buffer to copy the normals from |
CQCT_EXTERN void CQCT_meshSetVertices | ( | CQCT_Mesh | mesh, |
float const * | buffer | ||
) |
Copies the vertices from the given buffer into the mesh data structure.
[in,out] | mesh | mesh to set the vertices for |
[in] | buffer | buffer to copy the vertices from |
CQCT_EXTERN void CQCT_meshUpdatePerVertexNormals | ( | CQCT_Mesh | mesh | ) |
Re-computes per-vertex normals.
mesh != NULL
[in] | mesh | Mesh object |
CQCT_EXTERN void CQCT_meshUpsample | ( | CQCT_Mesh | mesh, |
size_t | nTimes | ||
) |
Upsamples the given mesh nTimes
without touchting the original vertices.
nTimes | number of upsample iterations |
mesh != null || nTimes == 0
CQCT_EXTERN void CQCT_release | ( | Id | obj | ) |
Releases an object, i.e. decrements its retain count and releases the memory held by the object iff the retain count reaces zero.