udMeshing

udMeshing.h provides an interface to create meshes from Unlimited Detail models.

Typedefs

typedef void udCompareOnWriteMeshCleanup(void **pData)

Functions

enum udError udCompareOnWriteMeshCallback(const char *pOutputName, void *pData)

enum udError udMeshing_BPAMesh(struct udContext *pContext, struct udMeshingBPAOptions *pOptions, struct udMeshingBPAStatus *pStatus)

Meshes a model using the BPA algorithm.

!NOTE This function begins the meshing process to write to obj, the pObjOutputPath option must not be NULL

ParameterDescription
pContextThe UD context to be used to compare the models.
pOptionsThe parameters passed to the BPA algorithm
pStatusPointer to the struct to which write the algorithm progress. May be NULL

Returns: A udError value based on the result of performing BPA on the input model.

enum udError udMeshing_BPACancelMeshing(struct udMeshingBPAOptions *pOptions)

Cancels a BPA meshing job started with pOptions

ParameterDescription
pOptionsThe parameters passed to the BPA algorithm

Returns: A udError value based on the result of cancelling the job

Structs

struct udMeshingBPAOptions

Contains the options for the meshing algorithm

FieldTypeDescription
pBaseModelPathconst char \*
pObjOutputPathconst char \*The path to the UDS model to be meshed.
writeOBJColoursuint32_tThe directory to which intermediate obj meshes generated by the BPA algorithm will be written to. Must not be NULL when running standalone BPA algorithm.
writeSingleOBJuint32_tIf not 0 write objs with vertex colours taken from their source points.
pSingleObjNameconst char \*If not 0 writes the output as a single obj - this may cause a failure for large inputs due to high memory usage.
mergeLevelsuint32_tThe name to give a single output obj, if writeSingleOBJ is set (NULL for UUID).
globalOffset[3]doubleIf set grid cubes are merged into larger OBJs when written - increasing this value by 1 will multiply the size of output OBJs by a factor of 8. This setting is overwritten if writeSingleOBJ is set.
ballRadiusdoubleapply a global offset to the vertices when writing an OBJ
gridSizedoubleThe radius of the ball used in the BPA algorithm.
maxGridPointCountuint32_tThe maximum size of each cube to be processed independantly by the BPA algorithm.
pGeometrystruct [udGeometry](udGeometry.md) \*The maximum number of grid points in a grid, if exceeded in a grid cube the grid will be subdivided.
pCallbackudCompareOnWriteMeshCallback \*
pDatavoid \*callback to be run on each mesh written (one for each grid), may be NULL
pCleanupudCompareOnWriteMeshCleanup \*data to be passed to pCallback, may be NULL
onWriteMeshstruct udMeshingBPAOptions::[anonymous]The geometry filter to restrict the BPA algorithm to, NULL to process whole model.
pReservedvoid \*

struct udMeshingBPAStatus

Stores the internal state of the meshing process

FieldTypeDescription
nGridsuint64_t
nCompleteduint64_tThe total number of grids to be processed.
runninguint64_tThe total number of grids that have been processed.