udQueryContext

The udQueryContext object provides an interface to query or filter pointclouds.

Functions

enum udError udQueryContext_Create(struct udContext *pContext, struct udQueryContext **ppQueryCtx, struct udPointCloud *pPointCloud, const struct udGeometry *pFilter)

Create an instance of a udQueryContext with a specific model.

!NOTE A future release will add multiple model support and non-storedMatrix locations.

ParameterDescription
pContextThe context to be used to create the query context.
ppQueryCtxThe pointer pointer of the udQueryContext. This will allocate an instance of udQueryContext into ppQuery.
pPointCloudThe point cloud to run the query on, it is located at its storedMatrix location (this can be changed using udQueryContext_ChangePointCloud).
pFilterThe filter to use in this query (this can be changed using udQueryContext_ChangeFilter).

Returns: A udError value based on the result of the udQueryContext creation.

enum udError udQueryContext_ChangeFilter(struct udQueryContext *pQueryCtx, const struct udGeometry *pFilter)

Resets the udQueryContext and uses a new filter.

!NOTE This will reset the query, any existing progress will be lost.

ParameterDescription
pQueryCtxThe udQueryContext item previously created using udQueryContext_Create.
pFilterThe new filter to use in this query.

Returns: A udError value based on the result of the operation.

enum udError udQueryContext_ChangePointCloud(struct udQueryContext *pQueryCtx, const struct udPointCloud *pPointCloud)

Resets the udQueryContext and uses a different model.

!NOTE This will reset the query, any existing progress will be lost.

ParameterDescription
pQueryCtxThe udQueryContext item previously created using udQueryContext_Create.
pPointCloudThe new model to use in this query.

Returns: A udError value based on the result of the operation.

enum udError udQueryContext_ExecuteF64(struct udQueryContext *pQueryCtx, struct udPointBufferF64 *pPointBuffer)

Gets the next set of points from an existing udQueryContext.

!NOTE This should continue to be called until it returns udE_NotFound indicating the query has completed.

ParameterDescription
pQueryCtxThe udQueryContext to execute.
pPointBufferThe point buffer to write found points to.

Returns: A udError value based on the result of the operation.

enum udError udQueryContext_ExecuteI64(struct udQueryContext *pQueryCtx, struct udPointBufferI64 *pPointBuffer)

Gets the next set of points from an existing udQueryContext.

!NOTE This should continue to be called until it returns udE_NotFound indicating the query has completed.

ParameterDescription
pQueryCtxThe udQueryContext to execute.
pPointBufferThe point buffer to write found points to.

Returns: A udError value based on the result of the operation.

enum udError udQueryContext_Destroy(struct udQueryContext **ppQueryCtx)

Destroy the instance of udQueryContext.

ParameterDescription
ppQueryCtxThe pointer pointer of the udQueryContext. This will destroy the instance of udQueryContext in ppQuery and set it to NULL.

Returns: A udError value based on the result of the udQueryContext destruction.

enum udError udQuery_TestRenderVoxel(struct udGeometry *pQueryFilter, double matrix[16], void *pRenderInfo)

Test the specified voxel against the given udQueryFilter.

ParameterDescription
pQueryFilterThe udQueryFilter to test.
matrixThe scene matrix for the model that contains the voxel being rendered.
pRenderInfoThe render info of the voxel being rendered.

Returns: A udError value based on the result of the test.