C API Reference#

ovclash ships two public C ABIs (C application binary interfaces) in one shared library:

  • Canonical (<ovclash/ovclash.h>): the engine contract. It covers contexts, settings, scope, pipeline execution and result retrieval.

  • Suite (<ovclash_suite/...>): the product API, built on the canonical one. It adds an object model, SQLite or JSON-directory persistence, and JSON/HTML export.

Neither layer is deprecated. Choosing an API Layer helps you pick one. The C/C++ Quickstart shows how to link and run a first query.

The SDK archive installs the headers under include/. The Python-only wheel ships no headers. The two _ovstage headers extend the API for ovstage, the runtime through which ovclash reads USD: an attached stage is a caller-owned ovstage Stage, an owner operation is work on that Stage, and the matrix decomposition mode selects how ovstage decomposes mesh matrices. This table lists the public headers, with paths relative to the ovclash root:

Header

Contents

include/ovclash/ovclash.h

Canonical C API: types, contexts, settings, pipeline and results.

include/ovclash/ovclash_ovstage.h

Optional ovstage-only extensions: Stage attachment, owner operations and matrix decomposition.

include/ovclash/ovclash_export.h

The single definition of the OVCLASH_API linkage macro.

include/ovclash_suite/ovclash_suite_types.h

Suite handles, strings, enums and plain-data views.

include/ovclash_suite/ovclash_suite_models.h

Suite model objects: query, clash info, frame info and point-cloud settings.

include/ovclash_suite/ovclash_suite_serializer.h

Custom persistence callbacks and the saved-data reader for native fetch-and-save.

include/ovclash_suite/ovclash_suite.h

Suite runtime, persistence and export entry points.

include/ovclash_suite/ovclash_suite_ovstage.h

Optional ovstage-only Suite extensions: Stage attachment and owner operations.

Conventions#

The rules that hold across the whole C surface live on the consumer pages, which the SDK archive also ships as Markdown. Several of them live only in header group comments, which the generated pages omit; What the generated pages omit lists them.

Topic

Page

Version constants, status results, error text, strings, input validation, units and layout, OVCLASH_STANDALONE and the linkage macro

C API Conventions

Handle ownership, borrowed memory, error-text lifetime, threading, and the Suite fetch, cursor and model rules

Threading and Ownership

The owner-operation gate, Stage attachment, the binding descriptor and the backend check

ovstage Integration

Fetch-and-save transactions, clash states and the approval comparison

Persistence

The asynchronous pipeline

Asynchronous Pipelines

What the generated pages omit#

Doxygen, the C/C++ documentation generator, renders the eight headers of the table under C API Reference. repo.toml lists them in doxygen_input, and its doxygen_predefined list defines OVCLASH_STANDALONE=1 and an empty OVCLASH_API for that run. Some content does not reach the generated pages:

  • <ovclash/version.h> is generated at build time and is not a Doxygen input. Version constants lists its macros.

  • <ovx/string_types.h> and <ovx/dlpack/dlpack.h> belong to the ovstage SDK. Neither is a Doxygen input, so the pages do not document ovx_string_t or DLTensor, the tensor descriptor of DLPack. Strings gives the string layout. The SDK archive installs ovx/dlpack/dlpack.h, because ovclash.h includes it. It does not install ovx/string_types.h; see Linking.

  • The @defgroup comments in ovclash.h, ovclash_ovstage.h, ovclash_suite.h and ovclash_suite_models.h do not render. They hold each layer’s common contract, including the Suite error catalogues that every Suite function incorporates by reference. C API Conventions summarizes the main rules. Read the group comments in ovclash_suite.h and ovclash_suite_models.h for the full error catalogues.

  • Per-field text of most canonical structs and enums. ovclash.h documents them with plain // trailing comments, which Doxygen does not attach. Those types render with their fields but without per-field text. Each ovclash_settings_t field is documented on its ovclash_set_* setter, which does render. The consumer pages define each field of these structs with its type and values: Canonical C those of ovclash_settings_t, Overlap records those of ovclash_overlap_data_t, Overlap reports those of ovclash_overlap_report_t, and Reading results those of ovclash_stats_t and ovclash_stage_timeline_data_t. Read ovclash.h for the other fields. Easy-to-miss details there include the OVCLASH_SETTINGS_FLAG_DEFAULT composition, the -1.0f “not computed” value of maxLocalDepth, how pointSize0 is derived, and why a pair type is tested with == OVCLASH_OVERLAP_PAIR_TYPE_POINT_VS_MESH. The Suite headers use Doxygen comments throughout.

This page renders only as part of the HTML site that the Sphinx documentation generator builds; see Building this documentation. The SDK archive ships that site under docs/html/ when its build rendered it. The page is not part of the shipped consumer set in docs/consumer/. In a plain Markdown viewer, each {eval-rst} block (a fence that embeds reStructuredText in Markdown) shows only its Doxygen directive, so read the headers instead.

Canonical C API#

The engine contract. Create a context, apply settings, set the A/B scope (the two search sets of prim paths), build and run the pipeline, then read overlaps, duplicates and per-overlap reports. Use this layer for the smallest dependency surface, for direct control over the pipeline, or for borrowed zero-copy access to result buffers. The C/C++ Quickstart has a complete minimal program, and Asynchronous Pipelines covers the background run. The OVCLASH_STANDALONE macro lists the entry points that only standalone builds declare.

Typedefs

typedef ovx_string_t ovclash_string_t#
typedef struct ovclash_context_t ovclash_context_t#
typedef struct ovclash_async_t ovclash_async_t#

Enums

enum ovclash_status_t#

Values:

enumerator OVCLASH_STATUS_SUCCESS#
enumerator OVCLASH_STATUS_ERROR#
enum ovclash_settings_flag_t#

Values:

enumerator OVCLASH_SETTINGS_FLAG_LOG#
enumerator OVCLASH_SETTINGS_FLAG_COPLANAR#
enumerator OVCLASH_SETTINGS_FLAG_ANY_HIT#
enumerator OVCLASH_SETTINGS_FLAG_QUANTIZED#
enumerator OVCLASH_SETTINGS_FLAG_TIGHT_BOUNDS#
enumerator OVCLASH_SETTINGS_FLAG_FULL_SCENE#
enumerator OVCLASH_SETTINGS_FLAG_ONLY_FIND_DUPLICATES#
enumerator OVCLASH_SETTINGS_FLAG_IGNORE_REDUNDANT_OVERLAPS#
enumerator OVCLASH_SETTINGS_FLAG_IGNORE_INVISIBLE_PRIMS#
enumerator OVCLASH_SETTINGS_FLAG_ENABLE_POINT_CLOUDS#
enumerator OVCLASH_SETTINGS_FLAG_ENABLE_POINT_CLOUDS_EXPERIMENTAL#
enumerator OVCLASH_SETTINGS_FLAG_SINGLE_THREADED#
enumerator OVCLASH_SETTINGS_FLAG_NEW_TASK_MANAGER#
enumerator OVCLASH_SETTINGS_FLAG_PURGE_PERMANENT_DYNAMIC_OVERLAPS#
enumerator OVCLASH_SETTINGS_FLAG_PURGE_PERMANENT_STATIC_OVERLAPS#
enumerator OVCLASH_SETTINGS_FLAG_SUBCOMPONENT_FILTERING#
enumerator OVCLASH_SETTINGS_FLAG_USDRT#
enumerator OVCLASH_SETTINGS_FLAG_DEFAULT#
enum ovclash_max_local_depth_mode_t#

Values:

enumerator OVCLASH_MAX_LOCAL_DEPTH_MODE_DISABLED#
enumerator OVCLASH_MAX_LOCAL_DEPTH_MODE_MINIMAL#
enumerator OVCLASH_MAX_LOCAL_DEPTH_MODE_MEDIUM#
enumerator OVCLASH_MAX_LOCAL_DEPTH_MODE_HIGH#
enum ovclash_overlap_pair_type_t#

Values:

enumerator OVCLASH_OVERLAP_PAIR_TYPE_MESH_VS_MESH#
enumerator OVCLASH_OVERLAP_PAIR_TYPE_POINT_VS_MESH#
enumerator OVCLASH_OVERLAP_PAIR_TYPE_UNDEFINED#
enum ovclash_mesh_index_t#

Values:

enumerator OVCLASH_MESH_INDEX_0#
enumerator OVCLASH_MESH_INDEX_1#
enum ovclash_overlap_report_flag_t#

Values:

enumerator OVCLASH_OVERLAP_REPORT_FLAG_DEFAULT#
enumerator OVCLASH_OVERLAP_REPORT_FLAG_FACES#
enumerator OVCLASH_OVERLAP_REPORT_FLAG_OUTLINE#
enumerator OVCLASH_OVERLAP_REPORT_FLAG_FACES0#
enumerator OVCLASH_OVERLAP_REPORT_FLAG_FACES1#
enumerator OVCLASH_OVERLAP_REPORT_FLAG_POINTS0#
enum ovclash_depenetration_axis_t#

Values:

enumerator OVCLASH_DEPENETRATION_AXIS_WORLD_X#
enumerator OVCLASH_DEPENETRATION_AXIS_WORLD_Y#
enumerator OVCLASH_DEPENETRATION_AXIS_WORLD_Z#
enumerator OVCLASH_DEPENETRATION_AXIS_WORLD_NEG_X#
enumerator OVCLASH_DEPENETRATION_AXIS_WORLD_NEG_Y#
enumerator OVCLASH_DEPENETRATION_AXIS_WORLD_NEG_Z#
enumerator OVCLASH_DEPENETRATION_AXIS_MOTION_VECTOR#
enumerator OVCLASH_DEPENETRATION_AXIS_USER_DEFINED#
enum ovclash_report_buffer_t#

Selects which array of an ovclash_overlap_report_t to describe as a tensor.

Values:

enumerator OVCLASH_REPORT_BUFFER_FACES0#

collidingFaces0: uint32, shape [nbCollidingFaces0]

enumerator OVCLASH_REPORT_BUFFER_FACES1#

collidingFaces1: uint32, shape [nbCollidingFaces1]

enumerator OVCLASH_REPORT_BUFFER_OUTLINE#

collidingSegments: float32, shape [nbCollidingSegments, 6]

enumerator OVCLASH_REPORT_BUFFER_POINTS0#

collidingPoints0: uint32, shape [nbCollidingPoints0]

Functions

ovclash_string_t ovclash_get_result_string(ovclash_result_t result)#

Returns a static, library-owned name for a result status.

Maps OVCLASH_STATUS_SUCCESS to “OVCLASH_STATUS_SUCCESS” and every other value, including values outside the enum, to “OVCLASH_STATUS_ERROR”. Both backends return byte-identical literals. The text names the status and does not describe a failure. ovclash_get_last_error() returns the concrete reason; it exists only in OVCLASH_STANDALONE builds.

Note

Lifetime: valid for the process lifetime; must not be freed or modified.

Note

Threading: safe to call concurrently; reads no context and no mutable global state.

Parameters:

result – [in] Status to describe.

Returns:

Borrowed view over a static string literal. Never null and never empty.

ovclash_result_t ovclash_get_backend_info(
ovclash_backend_info_t *out_info,
)#

Reports which clash backend this library was compiled with, plus its capabilities.

The OpenUSD backend writes backend_name “openusd”, native_openusd_linked 1, ovpopulation_runtime_loaded 0, ovstage_cuda_enabled 0. The ovstage backend writes “ovstage”, 0, 1, and ovstage_cuda_enabled 1 only when built with OVCLASH_OVSTAGE_CUDA_ENABLED. Every value is a compile-time constant: nothing is probed at run time and no context is needed.

Note

Lifetime: backend_name borrows a static literal valid for the process lifetime.

Note

Threading: safe to call concurrently.

Parameters:

out_info – [out] Receives the backend name and capability flags. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if out_info is null or, on ovstage, if the call runs inside an owner-operation callback on the same thread (see ovclash_ovstage_run_owner_operation). Nothing is written on error.

ovclash_result_t ovclash_reset_settings(ovclash_settings_t *settings)#

Fills a settings struct with the Kit-compatible ovclash default table.

Writes flags = OVCLASH_SETTINGS_FLAG_DEFAULT, nbTasks 128, sortMode 0, overlapCode 3, trisPerLeaf 15, triangleLimit 0, broadphaseLimit 0xffffffff, poseEpsilon 1e-6f, boundsEpsilon 0.01f, areaEpsilon 1e-6f, contactEpsilon -1.0f, contactCutoff -1.0f, tolerance 0.0f, pointSize 0.0f, maxLocalDepthMode DISABLED and all three times 0.0. Both backends produce identical values.

This is the Kit product default table, ClashDetection.DEFAULT_SETTINGS in the omni.physx.clashdetection.core extension. A fresh context holds exactly these values, because ovclash_create_context() seeds it from this function. The settings of a fresh context and a reset struct therefore agree field for field. This function touches no context.

Note

Threading: safe to call concurrently; writes only through settings.

Parameters:

settings – [out] Struct to fill. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if settings is null (nothing written).

ovclash_result_t ovclash_reset_duplicate_mesh_data(
ovclash_duplicate_mesh_data_t *data,
)#

Clears a duplicate-mesh record to a defined empty state.

Sets both name views to {null, 0} and zeroes meshHash0, meshHash1, clashHash, nbTris and time. Identical in both backends. The name views are borrowed from a context, so this only drops the views and never frees anything.

Note

Threading: safe to call concurrently; writes only through data.

Parameters:

data – [out] Record to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if data is null (nothing written).

ovclash_result_t ovclash_reset_depth_data(ovclash_depth_data_t *data)#

Clears a depth record, setting maxLocalDepth to -1.0f (“not computed”).

Identical in both backends. No entry point in this header consumes or produces an ovclash_depth_data_t: ovclash_compute_max_local_depth() writes a bare float. This helper therefore serves a struct that the ABI does not otherwise use.

Note

Threading: safe to call concurrently; writes only through data.

Parameters:

data – [out] Record to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if data is null (nothing written).

ovclash_result_t ovclash_reset_depenetration_data(
ovclash_depenetration_data_t *data,
)#

Clears a depenetration record: dir to (0,0,0) and depth to -1.0f (“not computed”).

Identical in both backends. No entry point in this header consumes or produces an ovclash_depenetration_data_t: ovclash_depenetrate_meshes() and ovclash_imm_depenetrate_meshes() write an ovclash_float3_t displacement. This helper therefore serves a struct that the ABI does not otherwise use.

Note

Threading: safe to call concurrently; writes only through data.

Parameters:

data – [out] Record to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if data is null (nothing written).

ovclash_result_t ovclash_reset_overlap_data(
ovclash_overlap_data_t *data,
)#

Clears an overlap record to a defined empty state.

Clears both name views and all three hashes, and zeroes nbRecords, nbElements, time and minDistance. Sets maxLocalDepth to -1.0f (“not computed”) and type to OVCLASH_OVERLAP_PAIR_TYPE_UNDEFINED (0x7fffffff, not zero). Identical in both backends. Call this before ovclash_get_overlap_data(). That function leaves *data untouched when it fails, so a struct that was not reset cannot be told apart from a filled one.

Note

Threading: safe to call concurrently; writes only through data.

Parameters:

data – [out] Record to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if data is null (nothing written).

ovclash_result_t ovclash_reset_step_data(ovclash_step_data_t *data)#

Clears a pipeline step record.

Sets name to {null, 0}, stepIndex and nbSteps to 0, progress and stepProgress to 0.0f, and finished to true. The cleared state therefore reads as “finished”, not “not started”, so finished must not be used as an initialized-or-not test. Identical in both backends.

Note

Threading: safe to call concurrently; writes only through data.

Parameters:

data – [out] Record to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if data is null (nothing written).

ovclash_result_t ovclash_reset_stats(ovclash_stats_t *stats)#

Zeroes a query-statistics record (meshes, shared meshes, cooked meshes, point clouds).

Identical in both backends. It is only a struct initializer and clears no counter held by a context. ovclash_reset_context() does that.

Note

Threading: safe to call concurrently; writes only through stats.

Parameters:

stats – [out] Record to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if stats is null (nothing written).

ovclash_result_t ovclash_reset_overlap_report(
ovclash_overlap_report_t *report,
)#

Clears an overlap-report view without releasing anything.

Zeroes the four counts and pointSize0 and nulls the four buffer pointers. It never frees memory, which means different things on the two backends. On OpenUSD the engine allocates the buffers, and only ovclash_release_overlap_report() frees them. Calling this on a filled report leaks them, and releasing the context does not free them either. On ovstage the context owns the buffers and the report only borrows them, so dropping the view is harmless. Use this function to initialize a report before ovclash_create_overlap_report().

Note

Threading: safe to call concurrently; writes only through report.

Parameters:

report – [out] Report view to clear. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if report is null (nothing written).

ovclash_result_t ovclash_create_context(
ovclash_context_t **out_context,
)#

Creates a clash context, the owner of settings, scope, results and error text.

The OpenUSD backend bootstraps Carbonite before it creates the engine instance, because report creation dereferences the cached tasking interface. The ovstage backend initializes Carbonite lazily, when a phase needs parallel work with the new task manager. Both backends seed a fresh context from ovclash_reset_settings(). OpenUSD pushes that table through ovclash_set_settings(); ovstage calls it from the context constructor. A fresh context therefore holds exactly the ovclash_reset_settings() table. In particular, OVCLASH_SETTINGS_FLAG_SINGLE_THREADED is off and OVCLASH_SETTINGS_FLAG_NEW_TASK_MANAGER is on.

Note

Lifetime: releasing the context invalidates its borrowed views, async handles and results. Release every overlap report first; OpenUSD report buffers require explicit release and are not reclaimed with the context.

Note

Threading: drive one context from one thread at a time. On ovstage, independent contexts may be created and used concurrently. On the OpenUSD parity backend they may not: cancellation and the out-of-memory condition are process-global there (see ovclash_cancel_pipeline and ovclash_is_out_of_memory), so concurrent contexts interfere and must be serialized. That backend also shares one process-wide Carbonite bootstrap, which the first context creates and which lasts for the process.

Parameters:

out_context – [out] Receives the new context. Must not be null; free with ovclash_release_context().

Returns:

OVCLASH_STATUS_SUCCESS on success. OVCLASH_STATUS_ERROR if out_context is null, the Carbonite bootstrap fails (OpenUSD) or an allocation fails. On failure *out_context is left untouched, so initialize it to null before calling.

ovclash_result_t ovclash_release_context(ovclash_context_t *context)#

Destroys a context and everything it owns.

A null context returns OVCLASH_STATUS_ERROR. While an async pipeline handle is outstanding, the call blocks until the run completes. The OpenUSD backend finishes the run and frees the handle; the ovstage backend joins the worker thread in the context destructor. A release therefore never races a running pipeline, but it can block for the rest of the run. The OpenUSD backend also removes the stage of the context from the standalone stage registry and keeps the process-wide Carbonite bootstrap. Releasing any OpenUSD context also clears the process-global cancellation and out-of-memory flags of that backend, including for runs of other contexts.

Note

Errors: the status is the only signal &#8212; after the call there is no context left to query.

Note

Lifetime: invalidates every borrowed string view, async handle and result of this context. On the OpenUSD backend this call does NOT free overlap-report buffers. Call ovclash_release_overlap_report() for each report first, or the memory is lost.

Note

Threading: no other call on this context may be in flight.

Parameters:

context – [in] Context from ovclash_create_context(), or null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null.

ovclash_result_t ovclash_reset_context(ovclash_context_t *context)#

Drops all results while keeping the context, its settings, scope, opened stage and built pipeline.

Both backends release meshes, cooked data, the BVH, broadphase pairs, overlaps, duplicates and statistics, and clear the out-of-memory and cancelled flags. ovstage also resets its completed-step counter and drops the populated ovstage scene, which the next pipeline run repopulates from the stored stage path. ovstage also releases a stage borrowed with ovclash_ovstage_attach_stage. Such a stage has no stored path, so attach it again before the next run. Neither backend resets settings, scope paths or the opened stage; use ovclash_set_settings() and ovclash_set_scope*() for that. The call is rejected while an async pipeline handle is active.

Note

Errors: rejection records text for ovclash_get_last_error() (OVCLASH_STANDALONE only; a successful call to this function preserves it).

Note

Lifetime: invalidates every string view, overlap index and report obtained from earlier results. OpenUSD report buffers still need their own ovclash_release_overlap_report().

Note

Threading: serialize all calls on one context.

Parameters:

context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or the call is rejected.

ovclash_result_t ovclash_set_settings(
ovclash_context_t *context,
const ovclash_settings_t *settings,
)#

Applies a whole settings struct at once, equivalent to calling every individual setter.

Both backends apply the same validation. poseEpsilon, boundsEpsilon, areaEpsilon, contactEpsilon, contactCutoff, tolerance, pointSize, startTime, endTime and timeCodesPerSecond must be finite. timeCodesPerSecond must be >= 0, trisPerLeaf in 1..15 (PhysX itself validates the BVH34 leaf count against [2,15]) and maxLocalDepthMode <= HIGH. On a violation nothing is stored and the call fails. The OpenUSD backend then applies the struct through the individual engine setters. Both backends clamp nbTasks to 256. Both also clear any scope paths set earlier; the OpenUSD path goes through setFullScene(), which releases them whatever the flag value.

Note

Errors: an active async handle or a validation failure records its reason for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky); null arguments record nothing.

Note

Results: changing settings neither recomputes nor discards completed results. The threading settings also govern later report extraction, so they can change after the pipeline finishes and before fetching. Finish an active async handle first.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). Must not be null.

  • settings – [in] Settings to apply. Must not be null; the struct is copied.

Returns:

OVCLASH_STATUS_SUCCESS on success. OVCLASH_STATUS_ERROR if context or settings is null, an async pipeline handle is active, or validation fails (both backends).

ovclash_result_t ovclash_set_log(
ovclash_context_t *context,
bool flag,
)#

Enables the backend’s per-phase timing/progress logging to stdout.

Both backends honor the flag and write with printf to stdout. There is no log callback and no way to redirect the output. Default on a fresh context: disabled. The backends emit different text (”–Serial: …” and “–ovstage: …”), so the output is not a stable format.

Note

Errors: a null context is reported through the status and records no text anywhere; while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only). A successful call to this function leaves that message unchanged.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero enables logging.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_coplanar(
ovclash_context_t *context,
bool flag,
)#

Controls whether coplanar triangle pairs count as overlaps.

Both backends map this onto the PhysX mesh-mesh query flags. Enabled selects PxMeshMeshQueryFlag::eDEFAULT. Disabled adds eDISCARD_COPLANAR, so coplanar faces that touch exactly are ignored. Default on a fresh context: enabled.

Note

Errors: a null context is reported through the status and records no text anywhere; while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only). A successful call to this function leaves that message unchanged.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero keeps coplanar contacts; zero discards them.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_any_hit(
ovclash_context_t *context,
bool flag,
)#

Stops each mesh pair at the first colliding triangle instead of enumerating all of them.

Both backends force the per-pair triangle result limit to 1, which overrides ovclash_set_triangle_limit(). Overlaps are still reported, but nbElements and the face and outline report buffers then hold one representative hit. Derived values such as maxLocalDepth come from that one pair only. Default on a fresh context: disabled.

Note

Errors: a null context is reported through the status and records no text anywhere; while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only). A successful call to this function leaves that message unchanged.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero enables any-hit (first-hit) mode.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_quantized(
ovclash_context_t *context,
bool flag,
)#

Selects the quantized BVH34 midphase when cooking triangle meshes.

Both backends set PxCookingParams::midphaseDesc.mBVH34Desc.quantized. Quantized trees use less memory at some cost in accuracy and speed. Default on a fresh context: disabled. The cooking phase reads the value, so it only affects meshes cooked by the next pipeline run.

Note

Errors: a null context is reported through the status and records no text anywhere; while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only). A successful call to this function leaves that message unchanged.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero cooks quantized midphase trees.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_tight_bounds(
ovclash_context_t *context,
bool flag,
)#

Requests tight (rotated-mesh-aware) world bounds instead of cheap loose bounds.

Both backends map this to PxMeshGeometryFlag::eTIGHT_BOUNDS when they compute per-mesh world bounds. Tight bounds shrink the broadphase candidate set for rotated meshes, at some extra cost in bounds computation. Default on a fresh context: enabled. The value is read while bounds are computed, so it applies from the next pipeline run.

Note

Errors: a null context is reported through the status and records no text anywhere; while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only). A successful call to this function leaves that message unchanged.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero enables tight bounds.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_subcomponent_filtering(
ovclash_context_t *context,
bool flag,
)#

Skips clash pairs whose two prims belong to the same USD subcomponent.

Both backends drop a broadphase pair when the two meshes resolve to the same subcomponent root prim, so parts of one assembly do not clash with each other. Two meshes outside any subcomponent resolve to the same empty root and are dropped too. Enabling the filter therefore suppresses every pair between meshes that sit outside any subcomponent.

OpenUSD resolves the root with UsdUtils::getSubComponentRoot() behind SUPPORT_EXPERIMENTAL_FILTERING, which the ovclash build turns on by default. ovstage resolves the nearest ancestor with kind = "subcomponent" from the composed model kinds that it populates from the opened file. Kinds authored in referenced, sublayered or binary layers, or in a selected variant, therefore count as they do on OpenUSD. A mesh of an instanced asset resolves per placement, like an OpenUSD instance proxy: from the asset content up through its instance root and the ancestors of that root. A stage attached with ovclash_ovstage_attach_stage() is read as its owner populated it. When the owner population holds no kind (or usd-metadata:kind) values, every mesh resolves to the empty root, and enabling the filter drops every pair.

Default on a fresh context: disabled. Applies from the next pipeline run. On ovstage, a call between the steps of a run leaves the rest of that run unchanged, because ovstage fixes the value when the run selects meshes. OpenUSD applies it to the remaining steps of the run.

Note

Errors: a null context is reported through the status and records no text anywhere; while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only). A successful call to this function leaves that message unchanged.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero enables subcomponent filtering.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_use_usdrt(
ovclash_context_t *context,
bool flag,
)#

Stores the USDRT flag, which selects nothing in either ovclash backend.

In the Kit extension this bit selects the USDRT/Fabric stage traversal. In ovclash it is inert. The only reader on the OpenUSD path sits inside #if !defined(OVCLASH_STANDALONE) and is compiled out. The ovstage backend has no second traversal to switch to, because ovstage population is its only scene path, so the flag has no reader there at all. Toggling it produces byte-identical results on both backends. Default on a fresh context: enabled. The flag remains because it belongs to the Kit-compatible settings table that persisted query settings serialize. ovclash_get_settings() reports the stored bit, so the only observable effects are that read-back and the serialized text, never the clash results.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Stored in the settings bitmask; otherwise ignored.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_single_threaded(
ovclash_context_t *context,
bool flag,
)#

Forces serial execution of the clash phases.

Both backends honor it. On OpenUSD it feeds MultithreadParams::mSingleThreaded, and multi-threaded detection also requires the Carbonite tasking interface. On ovstage it overrides both task managers: geometry preparation, mesh cooking, pose and bounds computation, broad phase and narrow phase run serially. It also turns off sampled-matrix prefetch and the numeric-population helper thread described below.

With the flag off, ovclash_set_new_task_manager() selects Carbonite tasking or bounded std::thread workers on ovstage. Eligible dynamic playback can then prepare a future matrix window while collision work reads the current one. Source updates and numeric composition stay sequential, with one source owner at a time. The one exception is a file-backed static run: it can open its numeric transform population on one helper std::thread while mesh selection keeps extracting geometry. Neither task manager nor ovclash_set_nb_tasks() governs that thread. The thread holds the process-wide ovstage lifecycle gate for the population. It is joined before those transforms are read and before the selection is replaced, reset or released.

On ovstage, pairs are tested independently, and their overlaps are sorted back into canonical mesh-path order after parallel collection. Counts, membership, per-pair data and even the ovclash_get_overlap_data() index order are therefore identical to a single-threaded run. Default on a fresh context: disabled on both backends, as in the Kit product table (SETTING_SINGLE_THREADED: False). A standalone OpenUSD caller that hits instability in the carb-tasking paths of the engine can turn it on. The flag also makes later report extraction run serially. It can change after detection finishes, without rerunning the pipeline or discarding its results.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero forces serial execution.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_new_task_manager(
ovclash_context_t *context,
bool flag,
)#

Selects the task-manager implementation for multi-threaded phases.

On ovstage, true selects the statically linked Carbonite tasking for geometry preparation, mesh cooking, pose and bounds computation, broad phase, narrow phase and eligible sampled-matrix prefetch. It uses the worker budget of the scheduler and ignores ovclash_set_nb_tasks(). False selects std::thread workers bounded by the task count, the hardware concurrency and the available work (see ovclash_set_nb_tasks()). ovclash_set_single_threaded() overrides either choice. Carbonite initializes lazily when parallel work is needed. When initialization fails, the phase fails with context error text and no other scheduler is selected. Default on a fresh context: enabled.

On OpenUSD, MultithreadParams::mUseNewTaskManager chooses between the two broadphase and narrowphase task managers of the engine. Both detection managers use Carbonite. Standalone report extraction uses Carbonite when the flag is true and bounded std::thread workers when it is false. Changing the flag after detection affects later extraction without recomputing the results.

Note

Results: the flag selects an implementation, not a policy. It does not change WHICH pairs overlap or what is reported about them. ovstage keeps the same ordered reports under either manager. On OpenUSD the newer manager hands pairs to workers from a shared counter, so the ovclash_get_overlap_data() index order depends on the run, and repeated runs at identical settings can differ. Index order is never part of the contract (see ovclash_get_overlap_data); this setting is the one most likely to show that.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero selects the newer task manager.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_purge_permanent_dynamic_overlaps(
ovclash_context_t *context,
bool flag,
)#

Drops overlaps that are present in every sampled frame of a time-sampled query.

Hides pairs that interpenetrate permanently, such as modelling artifacts, rather than clashing because of motion. Both backends honor it, and it affects only dynamic (time-sampled) queries; see ovclash_set_times(). ovstage removes any accumulated overlap whose record count equals the sampled frame count. Default on a fresh context: disabled.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero purges permanently-overlapping dynamic pairs.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_purge_permanent_static_overlaps(
ovclash_context_t *context,
bool flag,
)#

Drops overlaps between two transform-static meshes during a time-sampled query.

Both backends honor it. A dynamic (time-sampled) run classifies each mesh as static or animated, and suppresses pairs whose two sides are static. Classification follows active authored transform animation on the prim or its ancestors. Several effective samples can mark a prim animated even when every sampled value is identical. A single sample is not animation by itself. When ovstage cannot resolve the initial value of an active operation, the mesh stays conservatively non-static, unless another active operation proves it animated. The sampled fallback validates numeric matrices and may cache them, but derives no animation flag from pose equality or text-layer hints. Only conclusive raw static flags allow static-pair suppression or freezing a future pose. Because of this conservative rule, ovstage does not claim full authored-animation parity for every composed input. The flag has no effect on a static (startTime == endTime) query. Default on a fresh context: enabled.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero purges static-vs-static pairs in dynamic runs.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_compute_max_local_depth(
ovclash_context_t *context,
ovclash_max_local_depth_mode_t mode,
)#

Selects how (and whether) maximum local penetration depth is computed per overlap.

Valid values are the four ovclash_max_local_depth_mode_t enumerators, in increasing cost:

  • DISABLED computes no depth, so a mesh-vs-mesh overlap_data.maxLocalDepth stays -1.0f (see the point-vs-mesh note below);

  • MINIMAL is the original fast estimate;

  • MEDIUM and HIGH refine the estimate, and HIGH adds 64 sampling directions.

Both backends implement all four modes. Both use contactEpsilon and contactCutoff to bound the refinement and, while depth computation is on, to cull overlaps shallower than contactEpsilon. Default on a fresh context: DISABLED. A mode greater than OVCLASH_MAX_LOCAL_DEPTH_MODE_HIGH is rejected on both backends: nothing is stored, the previous mode stands, and the reason is recorded for ovclash_get_last_error().

The setting is mesh-only. A point-vs-mesh overlap reports maxLocalDepth 0.0f in every mode, DISABLED included, and never the -1.0f “not computed” value. A 0.0f on a point-cloud overlap is therefore not a measured zero-depth contact.

Note

Errors: while an async pipeline handle is active, or when mode is greater than OVCLASH_MAX_LOCAL_DEPTH_MODE_HIGH, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous mode in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • mode – [in] One of the ovclash_max_local_depth_mode_t enumerators.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or mode is greater than OVCLASH_MAX_LOCAL_DEPTH_MODE_HIGH (nothing is stored, the previous mode stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_nb_tasks(
ovclash_context_t *context,
uint32_t nbTasks,
)#

Sets how many worker tasks the multi-threaded phases split their work into.

Both backends clamp the value to 256 (MultiThreader::MaxNbTasks and kMaxNbTasks); 0 is accepted. On ovstage the value controls only the std::thread manager (ovclash_set_new_task_manager(false)). The parallel mesh preparation and collision phases then use at most min(max(nbTasks, 1), hardware concurrency, available work) workers. An unknown hardware concurrency counts as one. A running sampled-matrix prefetch callback reserves one slot of the std::thread budget; keeping its completed window reserves none.

In OpenUSD detection the value controls only the task split of the legacy Carbonite manager. There 0 selects one task when work is available, while the stored and read-back setting stays 0. An empty work range schedules no tasks. Standalone OpenUSD report extraction bounds its std::thread workers with the same formula as ovstage, where 0 selects one worker. Both backends ignore the value while single-threaded mode or the new task manager is on; the new manager uses the worker budget of the Carbonite scheduler. Default on a fresh context: 128, stored but unused by the default new-manager configuration.

Note

Results: the task count is a performance knob only. It changes neither which pairs overlap nor what is reported about them. ovstage collects parallel results without per-pair slots and restores canonical mesh-path order before reporting. The OpenUSD legacy manager concatenates contiguous task slices. Changing the value therefore keeps the serial order wherever the value applies. The OpenUSD new manager ignores it and keeps its run-dependent order.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • nbTasks – [in] Desired task count; silently clamped to 256.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_pose_epsilon(
ovclash_context_t *context,
float epsilon,
)#

Tolerance used when comparing two world transforms for equality.

Both backends use it in the same places: detecting shared/instanced meshes with identical poses, deciding that a mesh pair is a duplicate rather than a clash, and short-circuiting the immediate-mode depth queries when both matrices are the same. Units are those of the matrix components (stage units for translation), compared per element. Default on a fresh context: 1e-6f. A non-finite value is rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error().

Note

Errors: while an async pipeline handle is active, or when epsilon is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • epsilon – [in] Per-component comparison tolerance. Negative values make the comparison never match.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or epsilon is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_bounds_epsilon(
ovclash_context_t *context,
float epsilon,
)#

Inflation applied when computing each mesh’s world bounds.

Both backends pass it to PxGeometryQuery::computeGeomBounds as both the additive offset (stage/world units) and the scale factor 1 + epsilon. Nonnegative values widen the broadphase and can only add candidate pairs; the narrow phase still decides. Finite negative values are accepted and can shrink bounds, so that monotonicity guarantee does not apply. Default on a fresh context: 0.01f. A non-finite value is rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error().

Note

Errors: while an async pipeline handle is active, or when epsilon is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • epsilon – [in] Bounds inflation in stage units; 0 disables inflation.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or epsilon is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_area_epsilon(
ovclash_context_t *context,
float epsilon,
)#

Minimum triangle area kept during mesh cooking; smaller triangles are discarded.

Both backends pass it to PxCookingParams::meshAreaMinLimit, so the unit is squared stage units and 0 disables the filter. Discarded triangles never appear in results, so a larger value both speeds up cooking and hides slivers. The cooking phase reads the value, so it applies to meshes cooked by the next pipeline run, not to meshes already cooked. Default on a fresh context: 1e-6f. A non-finite value is rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error().

Note

Errors: while an async pipeline handle is active, or when epsilon is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • epsilon – [in] Minimum triangle area in squared stage units; 0 keeps all triangles.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or epsilon is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_contact_epsilon(
ovclash_context_t *context,
float value,
)#

Minimum penetration depth for an overlap to be reported, in stage units.

Active only while max-local-depth computation is enabled (see ovclash_set_compute_max_local_depth); with depth disabled the value is ignored. Both backends behave identically. A negative value disables the feature: no culling and no depth cutoff. Otherwise overlaps whose computed maxLocalDepth is below the value are dropped, and the value serves as the minimum-depth cutoff of the refinement. Default on a fresh context: -1.0f (disabled). A non-finite value is rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error().

Note

Errors: while an async pipeline handle is active, or when value is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • value – [in] Minimum depth in stage units; any negative value disables culling.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or value is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_contact_cutoff(
ovclash_context_t *context,
float value,
)#

Upper depth cutoff for the refined max-local-depth search, in stage units.

Both backends use it identically, and only in the refined depth path. It is the maximum-depth cutoff while contactEpsilon-based culling is active (contactEpsilon >= 0) and the max-local-depth mode is above MINIMAL. A negative value leaves the cutoff unset. The setting is ignored while contactEpsilon is negative or depth computation is disabled. Default on a fresh context: -1.0f. A non-finite value is rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error().

Note

Errors: while an async pipeline handle is active, or when value is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • value – [in] Maximum depth in stage units; negative leaves the cutoff unset.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or value is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_tolerance(
ovclash_context_t *context,
float value,
)#

Clearance distance, in stage units: prims closer than this count as clashing.

Both backends inflate broadphase bounds by the tolerance and pass it to the PhysX mesh-mesh queries, so a positive value reports mesh near-misses as overlaps. The point-vs-mesh narrow phase ignores it on both backends, so near-miss points are not reported. Both backends clamp a negative value to 0; there is no “shrink” mode. Default on a fresh context: 0.0f (touching geometry only). A non-finite value is rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error().

Note

Errors: while an async pipeline handle is active, or when value is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • value – [in] Clearance distance in stage units; negative is treated as 0.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or value is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_sort_mode(
ovclash_context_t *context,
uint32_t mode,
)#

Selects the sort key stored with each overlap, and whether duplicate triangles are counted.

The backends differ sharply. On OpenUSD the value picks the per-overlap sort key: 0 = number of overlapping elements, 1 = internal narrow-phase cost, 2 = max local depth. Any other value leaves the key at 0. 0xffffffff also suppresses the duplicate-mesh triangle count, so nbTris reads 0. On ovstage only the 0xffffffff case exists: it zeroes duplicate nbTris, and no other value changes anything. Neither backend validates the value. Default on a fresh context: 0.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • mode – [in] 0, 1, 2 or 0xffffffff. Other values leave OpenUSD’s sort key at zero; on ovstage only 0xffffffff changes behavior.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_overlap_code(
ovclash_context_t *context,
uint32_t code,
)#

Chooses which triangle-triangle intersection kernel PhysX uses.

Both backends map the value identically onto PxMeshMeshQueryFlag: 0 = the regular kernel, 1 = eRESERVED1 (Moller variant), 2 = eRESERVED2 (SAT), 3 = eRESERVED3 (SIMD SAT). Any other value silently behaves like 0. The kernels differ in speed and can differ marginally in how they classify borderline hits. Default on a fresh context: 3. Neither backend validates the value.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • code – [in] 0-3; other values behave like 0.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_tris_per_leaf(
ovclash_context_t *context,
uint32_t trisPerLeaf,
)#

Number of triangles per BVH34 leaf used when cooking meshes.

Both backends pass it to PxCookingParams::midphaseDesc.mBVH34Desc.numPrimsPerLeaf. Larger leaves cook faster and use less memory; smaller leaves query faster. The cooking phase reads the value, so it applies to meshes cooked by the next pipeline run. Default on a fresh context: 15, which is also the maximum.

The accepted range is 1..15. PhysX validates numPrimsPerLeaf against [2,15], so 15 is a hard ceiling, not a tuning suggestion. A larger value would fail every mesh cook. A failed cook does not fail a pipeline step, so such a run would report success with zero overlaps on a model full of them. Values outside 1..15 are rejected on both backends: nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error(). A value of 1 is accepted and reported back by ovclash_get_settings(). PhysX rejects 1 too, so both backends retry the cook at 15 and build the mesh with 15 triangles per leaf. The reported overlaps do not change; only cooking time and memory do.

Note

Errors: while an async pipeline handle is active, or when trisPerLeaf is outside 1..15, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • trisPerLeaf – [in] Triangles per leaf; must be in 1..15.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or trisPerLeaf is outside 1..15 (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_triangle_limit(
ovclash_context_t *context,
uint32_t limit,
)#

Caps how many colliding triangle pairs are recorded per mesh pair.

Both backends treat 0 as unlimited (internally 0xffffffff), and on both ovclash_set_any_hit() overrides the value with 1. The limit truncates the recorded results, nbElements and the face and outline report buffers. It does not stop a pair from being reported. Default on a fresh context: 0 (unlimited). Neither backend validates the value.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • limit – [in] Maximum triangle pairs per mesh pair; 0 means unlimited.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_broadphase_limit(
ovclash_context_t *context,
uint32_t limit,
)#

Caps the number of candidate pairs the broadphase is allowed to produce.

A guard against combinatorial explosion on pathological scenes. Once the broadphase has collected all of its candidate pairs, both backends compare their count against this limit. When the count exceeds it, they cancel the run rather than silently truncate results. The pair array is not bounded while it is collected. Default on a fresh context: 0xffffffff, effectively unlimited. 0 is a real limit, not “unlimited”. Neither backend validates the value.

Note

Errors: the status covers only this call. Exceeding the limit requests cancellation instead of failing the phase that exceeded it. In a static stepped run both backends report success for the broadphase step (index 7). The next step is rejected for pending cancellation and, like every such rejection, records no last-error text. An ovstage time-sampled frame step that exceeds the limit fails itself. The cancellation stays pending, per context on ovstage and process-global on OpenUSD. Later ovclash_run_pipeline_step calls fail, even step 0 of a new pipeline, until ovclash_reset_context clears it (see ovclash_cancel_pipeline). An async run reports it as OVCLASH_STATUS_ERROR from ovclash_finish_pipeline, which clears it. While an async handle is active this call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky).

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • limit – [in] Maximum broadphase pair count; 0xffffffff is the practical “no limit” value.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_times(
ovclash_context_t *context,
double startTime,
double endTime,
double timeCodesPerSecond,
)#

Selects a static or time-sampled query and its sample spacing, in seconds.

startTime == endTime selects a single-sample (static) query. Otherwise the run is dynamic: it starts at exactly startTime and adds 1.0/timeCodesPerSecond in double precision until the next time exceeds endTime. There is no endpoint clamp, so rounding may exclude an endpoint that is exact in theory. Both backends disable the duplicate-mesh search for dynamic runs, and use one startTime sample for a zero rate or a descending range. Both backends require all three values to be finite and timeCodesPerSecond >= 0. Otherwise nothing is stored and the reason is recorded for ovclash_get_last_error(). Defaults on a fresh context: 0, 0, 0. ovstage also reads “all three zero” as “no times requested”.

Note

Errors: while an async pipeline handle is active, or when startTime, endTime or timeCodesPerSecond is not finite or timeCodesPerSecond is negative, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous values in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • startTime – [in] First sampled time, in seconds (the USD time code is the value multiplied by the stage’s timeCodesPerSecond).

  • endTime – [in] Sampling endpoint, in seconds; equal to startTime means a static query.

  • timeCodesPerSecond – [in] Samples per second; 0 collapses the run to one sample.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or startTime, endTime or timeCodesPerSecond is not finite or timeCodesPerSecond is negative (nothing is stored, the previous values stand, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_full_scene(
ovclash_context_t *context,
bool flag,
)#

Selects whole-stage traversal instead of a scoped prim set.

Both backends clear any scope paths set earlier, whatever the flag value. OpenUSD does it through ClashDetectionParams::releasePaths(), ovstage through clearScopePaths(). To keep a non-empty explicit scope, call this before ovclash_set_scope() or ovclash_set_scope_paths(). A set scope wins. With no scope and this flag cleared, both standalone backends select nothing at all, because the Kit “current selection” path is compiled out. On both backends ovclash_set_scope_paths() with a non-empty scope also clears this flag; the legacy ovclash_set_scope() does not. Default on a fresh context: enabled.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero traverses the whole stage.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_only_find_duplicates(
ovclash_context_t *context,
bool flag,
)#

Runs duplicate-mesh detection only, skipping clash detection entirely.

Both backends honor it. The OpenUSD narrow phase stops after the duplicate test, and ovstage skips the BVH, broad-phase and narrow-phase steps after its duplicate search. ovclash_get_overlap_count() then reports 0, and only ovclash_get_duplicate_mesh_count() and ovclash_get_duplicated_meshes_data() return anything. Duplicates are pairs of prims with identical mesh data and equal poses (within poseEpsilon). Default on a fresh context: disabled. Both backends turn duplicate detection off for time-sampled runs, so combining this flag with a dynamic ovclash_set_times() yields no results.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero restricts the run to duplicate search.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_ignore_redundant_overlaps(
ovclash_context_t *context,
bool flag,
)#

Suppresses overlaps that merely repeat an already reported identical-geometry pair.

Both backends honor it after the broad phase. They drop pairs whose meshes and relative poses make the contact a repeat of one already recorded, typically instanced or shared geometry laid out identically. Default on a fresh context: disabled. During a time-sampled query that purges permanent static overlaps, identical static copies still share one representative contact. The representative is an actual eligible pair, so scope or subcomponent exclusions do not remove the only remaining contact.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero drops redundant overlaps.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_ignore_invisible_prims(
ovclash_context_t *context,
bool flag,
)#

Excludes invisible prims from mesh and point-cloud selection.

Both backends honor it during scene traversal and population, so invisible prims never reach cooking or the broadphase. Selection reads the value, so a change takes effect on the next pipeline run. Default on a fresh context: enabled, so invisible geometry does not clash by default.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero skips invisible prims.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_point_clouds(
ovclash_context_t *context,
bool flag,
)#

Enables UsdGeomPoints point-cloud vs mesh clash detection.

Both backends implement point-vs-mesh and gate it on this flag; with the flag off, point-cloud prims are not even selected. Results are overlaps of type OVCLASH_OVERLAP_PAIR_TYPE_POINT_VS_MESH. Their element indices are point indices, available through OVCLASH_OVERLAP_REPORT_FLAG_POINTS0. Selection reads the value, so it applies from the next pipeline run. Default on a fresh context: disabled.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero enables point-cloud queries.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_point_clouds_experimental(
ovclash_context_t *context,
bool flag,
)#

Selects the experimental point-cloud narrow-phase implementation.

The backends differ. On OpenUSD the flag picks an alternative multi-threaded point-vs-mesh pipeline, and is ignored unless multi-threading is active (see ovclash_set_single_threaded). On ovstage the bit is stored but never read, so it does nothing. It also matters only while ovclash_set_point_clouds() is enabled. Default on a fresh context: disabled.

Note

Errors: while an async pipeline handle is active the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • flag – [in] Non-zero selects the experimental path.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or an async pipeline handle is active.

ovclash_result_t ovclash_set_point_size(
ovclash_context_t *context,
float size,
)#

Overrides the point diameter used for point-cloud clash tests, in stage units.

The value is a width (twice the radius), not a radius, and excludes any scaling from the prim transform. Both backends treat a value > 0 as an explicit override for every point, and report it back as ovclash_overlap_report_t::pointSize0. A value <= 0 falls back, in order, to a single authored USD width, to per-point authored widths, or to an automatically derived size. With per-point widths pointSize0 is 0.0 and the caller reads the widths per index. ovstage collapses a uniform per-point array back to its single value, where the OpenUSD parity backend reports 0.0. The value matters only while ovclash_set_point_clouds() is enabled. Default on a fresh context: 0.0f. A non-finite value is rejected on both backends: nothing is stored and the reason is recorded for ovclash_get_last_error(). A call between the steps of a run changes the size that ovstage tests and reports from the next sample of that run on. OpenUSD keeps the size it computed before the first sample of the run.

Note

Errors: while an async pipeline handle is active, or when size is not finite, the call is rejected and text is recorded for ovclash_get_last_error() (OVCLASH_STANDALONE only, sticky). A rejected call stores nothing and leaves the previous value in place. A null context is reported through the status alone and records no text.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context from ovclash_create_context(). A null context returns OVCLASH_STATUS_ERROR.

  • size – [in] Point width in stage units; <= 0 restores automatic sizing.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null, an async pipeline handle is active, or size is not finite (nothing is stored, the previous value stands, and the reason is recorded for ovclash_get_last_error()).

ovclash_result_t ovclash_set_scope(
ovclash_context_t *context,
uint64_t stageId,
const uint64_t *paths1,
uint32_t nbPaths1,
const uint64_t *paths2,
uint32_t nbPaths2,
)#

Replaces the query scope using encoded absolute prim paths.

This is the legacy low-level counterpart of ovclash_set_scope_paths(). Every path value must come from ovclash_sdf_path_to_int(). With both arrays empty the engine falls back to OVCLASH_SETTINGS_FLAG_FULL_SCENE, which is enabled on a fresh context; with the flag cleared, nothing is selected. With only paths1 populated the query searches that set. With both populated it searches paths1 against paths2. The arrays are resolved and copied during this call.

The backends handle stageId differently. OpenUSD resolves the stage from the standalone process registry. It reports an invalid id through the engine error callback, but the legacy C wrapper does not propagate that failure. The id is resolved during this call only. When nothing is registered under it at that moment, pipeline steps, an async run and both immediate queries fail with “no stage is open”. They keep failing even after a stage is registered under that id, until ovclash_open_stage, ovclash_set_scope_paths() or another ovclash_set_scope() call supplies a stage. ovstage ignores stageId and uses the stage already opened on context. Standalone callers should prefer ovclash_set_scope_paths(), which supplies the stage identity of the context and validates UTF-8 paths directly.

Note

Preconditions: paths2 without paths1 is not a documented scope shape.

Note

Side effects: replaces the context’s previous scope. On ovstage, validation completes before replacement, so a rejected request preserves the previous scope.

Note

Lifetime: context copies the scope; the caller retains ownership of both arrays and may release them after this function returns.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context from ovclash_create_context(). Must not be null.

  • stageId – [in] OpenUSD standalone stage-registry id; ignored by ovstage.

  • paths1 – [in] First encoded-path array, or null when nbPaths1 is zero.

  • nbPaths1 – [in] Number of entries in paths1.

  • paths2 – [in] Second encoded-path array, or null when nbPaths2 is zero.

  • nbPaths2 – [in] Number of entries in paths2.

Returns:

OVCLASH_STATUS_SUCCESS when the request is accepted; OVCLASH_STATUS_ERROR when context is null/invalid, an async pipeline handle is active, an array is null with a non-zero count, or (on ovstage) an encoded id is unknown.

ovclash_result_t ovclash_create_pipeline(
ovclash_context_t *context,
uint32_t *out_step_count,
)#

Builds the clash pipeline for the current settings and reports its step count.

A valid context always yields at least 8 steps: 11 for a static query (start time == end time), otherwise 7 plus one step per sampled time, and a sampled range always includes its start time. A successful call therefore never reports “no work to do”. Call ovclash_set_times or ovclash_set_settings first, because the step count derives from startTime, endTime and timeCodesPerSecond. Neither backend checks that a stage is open or a scope is set; those failures surface later from ovclash_run_pipeline_step. OpenUSD rebuilds and stores the concrete phase list and discards any previous one. ovstage builds an immutable timing snapshot and sample-time vector, installs them only after construction succeeds, and resets its completed-step counter to 0. Later changes of the timing settings apply to the next pipeline, not to the installed snapshot. ovstage rejects a dynamic schedule that does not progress, and a step count that does not fit in uint32_t together with the seven fixed phases. An allocation failure may also reject a large schedule. Such a failure keeps the previous pipeline. These safeguards are ovstage-only and leave the OpenUSD engine unchanged.

Note

Errors: the status says only that the call failed. ovclash_get_last_error, which exists only in OVCLASH_STANDALONE builds, returns the reason. A null context records no text at all.

Note

Threading: serialize all calls on one context. Rejected while an async handle is live.

Parameters:
  • context – [in] Context from ovclash_create_context. Mutated by this call.

  • out_step_count – [out] Receives the number of pipeline steps (>= 8 on success). Left untouched on failure. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context or out_step_count is null, the context has no engine, an async pipeline handle is live, or a C++ exception was caught.

ovclash_result_t ovclash_get_pipeline_step_data(
ovclash_context_t *context,
ovclash_step_data_t *data,
uint32_t index,
)#

Describes one planned pipeline step (name, index, count, progress, finished flag).

Describes the plan built by ovclash_create_pipeline, not live progress. Both backends set progress = index / nbSteps, stepProgress = 0.0f and finished = (index == nbSteps - 1). For live progress during an async run, use ovclash_get_pipeline_step_data_async. On failure *data is left completely untouched, so check the returned status.

Note

Lifetime: data->name borrows a static, library-owned string literal that is valid for the process lifetime; it is never freed and is not invalidated by later calls.

Note

Threading: serialize on one context. Rejected while an async handle is live.

Parameters:
  • context – [in] Context that owns a pipeline created by ovclash_create_pipeline.

  • data – [out] Receives the step description. Must not be null.

  • index – [in] Zero-based step index, in [0, step count from ovclash_create_pipeline() - 1].

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when data or context is null, the context has no engine, an async handle is live, no pipeline has been created, or index is out of range.

ovclash_result_t ovclash_run_pipeline_step(
ovclash_context_t *context,
uint32_t index,
)#

Runs one pipeline step synchronously on the calling thread.

Steps carry state and must run in ascending order 0..count-1. A run out of order is not diagnosed. Both backends execute each non-final step by index against whatever state exists. The final ovstage step reports success without doing the work when the preceding steps have not completed. OpenUSD reports OVCLASH_STATUS_SUCCESS as soon as it has invoked the phase function. Per-phase failures are invisible here, so check ovclash_is_out_of_memory and the result counts. ovstage reports OVCLASH_STATUS_ERROR when the phase itself fails, and records the reason as the last error of the context.

Note

Errors: ovclash_get_last_error (OVCLASH_STANDALONE only) carries ovstage phase failures. On ovstage, a rejected index (out of range, or before ovclash_create_pipeline) records its own text; OpenUSD records none for it. A rejection for pending cancellation records nothing on either backend. It is not a misuse, and the last-error string stays unchanged across it. On ovstage, a failure while a sampled frame runs discards its current and accumulated overlaps. Restart at step 0 before treating results as a complete query. After a stage replacement during a started pipeline, both backends reject nonzero steps with “stage changed; restart the pipeline at step 0”. The rejection lasts until step 0 restarts execution, an async run starts the pipeline again, or ovclash_create_pipeline installs a new pipeline.

Note

Lifetime: release overlap reports before advancing to another step. Sampled ovstage steps can replace borrowed result buffers, even within the same pipeline run.

Note

Lifetime: on ovstage, index 0 clears the last error of the context, so a message read after a run belongs to that run. That makes the report of a successful run, described on ovclash_get_last_error, safe to attribute; see also ovclash_stats_t::nbCookedMeshes.

Note

Threading: serialize on one context; the step itself may fan out to internal worker tasks.

Parameters:
  • context – [in] Context with a pipeline created by ovclash_create_pipeline.

  • index – [in] Zero-based step index in [0, step count from ovclash_create_pipeline() - 1].

Returns:

OVCLASH_STATUS_SUCCESS when the step ran (see caveat above), or OVCLASH_STATUS_ERROR when context is null or has no engine, an async handle is live, index is out of range, a nonzero step follows a stage replacement in a started pipeline, cancellation is pending, no stage is open (OpenUSD rejects every step of a created pipeline, ovstage the first step that reads the stage), or (OpenUSD) the process-global out-of-memory flag is set. No stage is open before ovclash_open_stage succeeds and after a failed ovclash_open_stage drops the previous one. On ovstage, a successful ovclash_ovstage_attach_stage also opens one, and ovclash_ovstage_detach_stage or ovclash_reset_context of an attached stage leaves none.

ovclash_result_t ovclash_run_pipeline_async(
ovclash_context_t *context,
ovclash_async_t **out_async,
)#

Starts the prepared pipeline on a background worker and returns an async handle.

At most one async handle exists per context; a second call while one is live is rejected. While a handle is live, almost every other context entry point (settings setters, scope, stepping, result getters, reset) is rejected with “not allowed while an async pipeline handle is active”. OpenUSD immediately starts a run of the phase list on the PhysX task manager. ovstage starts the whole pipeline on a std::thread, without an intentional startup delay. A call without ovclash_create_pipeline is not an error on either backend: the worker performs no work and reports success.

On ovstage, the worker runs with a snapshot, taken at launch, of the floating-point controls of the calling thread: rounding, denormal handling and exception masks. Later changes on the calling thread do not affect that run. Launch and finish keep the controls of the caller. The worker restores its own previous controls on every exit, cancellation and failure included.

Note

Lifetime: there is no ovclash_async_destroy. ovclash_finish_pipeline destroys the handle, and the pointer dangles after it returns. ovclash_release_context also reclaims a live handle: OpenUSD finishes it first, ovstage joins the worker. ovclash_reset_context is rejected while a handle is live.

Note

Threading: until the run is finished, poll only through ovclash_is_pipeline_running, ovclash_get_pipeline_step_data_async, ovclash_async_is_cancelled and ovclash_cancel_pipeline. On ovstage the worker also writes the last-error string of the context. The access is synchronized, but which message ovclash_get_last_error returns during the run is nondeterministic. On OpenUSD, while the worker runs, these calls access the volatile process-global cancel flag and the unsynchronized progress state of the shared engine. That gives no C++ thread-safety guarantee; see the note of each call.

Parameters:
  • context – [in] Context to run. Mutated by the worker thread until the pipeline finishes.

  • out_async – [out] Receives the owned async handle. Left untouched on failure. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context or out_async is null, the context has no engine, a handle is already live, (OpenUSD) a created pipeline would run with no stage open, the engine failed to start the run, or a C++ exception was caught. ovstage launches without a stage and ovclash_finish_pipeline then reports it missing.

ovclash_result_t ovclash_is_pipeline_running(
ovclash_async_t *async,
bool *out_running,
)#

Polls whether the asynchronous pipeline is still executing.

Both backends report not-running as soon as cancellation is requested, before the worker has actually stopped. Do not use the answer to decide that the handle is safe to drop. ovclash_finish_pipeline is the only call that joins the worker and releases the handle, and it must be called on both backends either way.

Without cancellation the contract is the same on both backends. It concerns convergence, not any single reading: poll until the call reports false; once it does, it stays false. Finish the handle before reading results, because the live-handle guard stays closed until ovclash_finish_pipeline returns. Do not assume a value from the first poll. A small fixture can complete before the first poll, so expecting either “running” or “not running” there is a race. This holds even when ovclash_create_pipeline was never called, because the call still starts a zero-work run. The backends reach the answer differently: ovstage reads its own worker flag, and OpenUSD asks the engine whether results are available. That is mechanism, not contract.

Do not derive the answer from the finished flag of ovclash_get_pipeline_step_data_async. That flag means “this is the last step index”, so it turns true when the final step starts, not when the run completes. On OpenUSD an empty handle reports finished while this call still reports running. Treating finished as done would read results before the worker published them.

Note

Lifetime: async must not have been passed to ovclash_finish_pipeline yet; the handle is destroyed there and polling afterwards is a use-after-free.

Note

Errors: a null handle is reported through the status alone and records no error text, because the owning context is unreachable through it.

Note

Threading: may be polled from another thread while the worker runs, but not concurrently with or after ovclash_finish_pipeline on the same handle. ovstage reads atomic flags. OpenUSD reads the shared engine’s volatile process-global cancel flag, which provides no C++ thread-safety guarantee, and then tests the engine’s completion event.

Parameters:
  • async – [in] Handle from ovclash_run_pipeline_async. Must not be null.

  • out_running – [out] Receives true while the run is considered active; false when it has completed or as soon as cancellation was requested. Left untouched on failure. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when async or out_running is null.

ovclash_result_t ovclash_get_pipeline_step_data_async(
ovclash_async_t *async,
ovclash_step_data_t *data,
)#

Snapshots live step/progress information from a running asynchronous pipeline.

Both backends refine progress with the counted work of the current step. OpenUSD uses the work-item counter of the shared engine. ovstage snapshots per-context operation labels and counted work under a mutex. stepProgress advances through reserved portions of the step, and progress includes that fraction. Opaque operations report a label without estimating completion. ovstage async names may append the current operation to the canonical phase name; synchronous plan names stay unchanged. Neither fractional progress nor an operation label is a time estimate. Before ovclash_create_pipeline, ovstage clears data through ovclash_reset_step_data, which sets finished to true rather than zero-filling it. A poll made before the pipeline exists therefore reports a finished step. As on ovclash_reset_step_data, finished is no test of whether the record is initialized.

Note

Errors: with a null handle the owning context is unreachable, so not even ovclash_get_last_error (OVCLASH_STANDALONE only) shows anything. *data is left untouched, and the status is the only signal.

Note

Lifetime: data->name borrows a static library-owned literal valid for the process lifetime. The handle must not already have been passed to ovclash_finish_pipeline.

Note

Threading: never call it concurrently with or after ovclash_finish_pipeline on the same handle. ovstage supports polling while its worker runs, and reports a locked snapshot clamped to the counted work. OpenUSD still reads the shared-engine progress without synchronization. Its mutex-protected copy of the step record does not make polling fully safe. A poll that races the work-counter reset of a phase can briefly report progress or stepProgress outside [0.0, 1.0], or non-finite. Consumers clamp the values and treat a non-finite value as unknown. Clash results are unaffected.

Parameters:
  • async – [in] Handle from ovclash_run_pipeline_async. A null handle returns OVCLASH_STATUS_ERROR.

  • data – [out] Receives the current step snapshot. A null pointer returns OVCLASH_STATUS_ERROR.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when async or data is null.

ovclash_result_t ovclash_finish_pipeline(ovclash_async_t *async)#

Waits for the asynchronous pipeline to complete and destroys the async handle.

Call it exactly once per handle, also after ovclash_cancel_pipeline: cancel only requests a stop and never joins or frees. On return the cancel flag is cleared, the process-global one on OpenUSD and the per-context one on ovstage. The active-async slot of the context is released, which enables the rest of the API again. OpenUSD maps the fetch status of the task system to the result: OVCLASH_STATUS_SUCCESS means the worker was joined cleanly, and per-phase detection failures are invisible here. ovstage maps the success flag of its worker to the result, and reports OVCLASH_STATUS_ERROR when a pipeline phase failed. Both backends also report OVCLASH_STATUS_ERROR when cancellation was requested before finish, even after the worker completed, and even for a zero-work run without a created pipeline. The stop that the engine requests itself when the broadphase limit is exceeded counts as cancellation, whether or not the caller polled ovclash_is_pipeline_running first. A failed ovstage sampled frame discards the current and accumulated overlaps, as described on ovclash_run_pipeline_step. Start a new run before treating results as a complete query.

Note

Lifetime: the handle is freed here. Any later use, including a second ovclash_finish_pipeline, ovclash_is_pipeline_running or ovclash_cancel_pipeline, is a use-after-free. Set the caller’s pointer to null right away.

Note

Threading: blocks the calling thread until the worker exits; call it from one thread only.

Parameters:

async – [in] Handle from ovclash_run_pipeline_async. May be null.

Returns:

OVCLASH_STATUS_SUCCESS when the run completed, or OVCLASH_STATUS_ERROR when async is null, the worker reported failure, or cancellation was requested (including by the broadphase limit). An uncancelled zero-work run without a created pipeline succeeds. For a valid handle, even an error outcome joins the worker, frees the handle and leaves the context reusable, so the status never means “finishing failed”.

ovclash_result_t ovclash_cancel_pipeline(ovclash_async_t *async)#

Requests cancellation of a running asynchronous pipeline.

Returns immediately. It neither joins the worker nor frees the handle, so the caller must still call ovclash_finish_pipeline afterwards. The scope of the request differs by backend. OpenUSD sets a process-global volatile flag that aborts every in-flight pipeline in the process; ovstage sets a per-context atomic. On both backends a set flag also makes later ovclash_run_pipeline_step calls fail, on OpenUSD for every context in the process. ovclash_finish_pipeline or ovclash_reset_context clears the flag. On OpenUSD, ovclash_release_context of any context clears it too.

Note

Errors: with a null handle no error text is recorded either, because the owning context is unreachable; the status is the only signal.

Note

Lifetime: async must not already have been passed to ovclash_finish_pipeline.

Note

Threading: may be called from another thread while the worker runs, but not concurrently with or after ovclash_finish_pipeline on the same handle. It cannot interrupt a finish already in progress, so cancel first, then finish. ovstage sets an atomic per-context flag. OpenUSD writes the volatile process-global flag of the shared engine, which worker threads read without synchronization; that gives no C++ thread-safety guarantee.

Parameters:

async – [in] Handle from ovclash_run_pipeline_async. A null handle returns OVCLASH_STATUS_ERROR.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when async is null.

ovclash_result_t ovclash_get_duplicate_mesh_count(
ovclash_context_t *context,
uint32_t *out_count,
)#

Returns the number of duplicate mesh pairs found by the last pipeline run.

Duplicates are pairs of meshes with identical mesh data at equal poses (within poseEpsilon); see ovclash_set_only_find_duplicates. The count is 0 before any run. A query interrupted by cancellation can return 0 with OVCLASH_STATUS_SUCCESS, and on OpenUSD so can a native out-of-memory. Zero therefore does not by itself mean “no duplicates”. Cancellation requested after completion does not erase the results produced. For async runs, check the finish outcome, and note the cancellation state before finish clears the flag and consumes the handle. On ovstage, a stage replacement or a direct mesh-selection step can keep this aggregate count while its table-indexed details turn stale; ovclash_get_duplicated_meshes_data then fails.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • out_count – [out] Receives the duplicate-pair count. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR if context or out_count is null, or an async pipeline handle is still active on this context.

ovclash_result_t ovclash_get_duplicated_meshes_data(
ovclash_context_t *context,
ovclash_duplicate_mesh_data_t *data,
uint32_t index,
)#

Reads names, hashes, triangle count and time for one duplicate mesh pair.

index must be < ovclash_get_duplicate_mesh_count. For a genuine duplicate pair data->meshHash0 equals data->meshHash1; clashHash hashes the two prim paths. *data is written only on success. The ovstage backend also fails when the extraction generation of the pair differs from the current selected-object table, or when the stored mesh indices are otherwise invalid. The generation changes, for example, after any stage replacement, successful or failed, and after a direct mesh-selection step. The OpenUSD backend fails when one of the two prims has been deleted.

Note

Lifetime: data->name0 and data->name1 borrow backend-owned path storage. The next pipeline run, ovclash_release_memory, ovclash_reset_context and ovclash_release_context invalidate them. On ovstage, every call that retires the selected-object table invalidates them too: an ovclash_open_stage call that gets past argument validation, whether or not the open succeeds; a successful ovclash_ovstage_attach_stage; ovclash_ovstage_detach_stage; ovclash_ovstage_set_matrix_decomposition with a changed mode (see ovclash_ovstage.h); and an ovclash_get_prim_matrix failure that retires the selection population. The aggregate counts that survive do not keep them alive. Copy the bytes to keep a name. Never free them.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • data – [out] Receives the duplicate-pair record. Must not be null.

  • index – [in] Zero-based duplicate-pair index.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or data, an out-of-range index, stale/invalid results, a deleted prim, or an active async pipeline.

ovclash_result_t ovclash_delete_duplicate_meshes(
ovclash_context_t *context,
)#

No-op in ovclash: does not delete duplicate meshes on either backend.

The stage-editing implementation lives in the Kit-only KitClash override, which ovclash does not compile. The OpenUSD backend therefore reaches an empty base-class virtual, and the ovstage backend has an explicitly empty body. The call still validates the context and is rejected while an async pipeline is active, but it never changes results, the stage or any counter. Duplicate records stay visible through ovclash_get_duplicate_mesh_count afterwards.

Note

Errors: a rejected call also records text retrievable through ovclash_get_last_error, which itself exists only under OVCLASH_STANDALONE.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:

context – [in] Context created by ovclash_create_context. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or the call is rejected.

ovclash_result_t ovclash_get_overlap_count(
ovclash_context_t *context,
uint32_t *out_count,
)#

Returns the number of detected overlap groups (one group per colliding prim pair).

Each group holds ovclash_overlap_data_t::nbRecords per-frame records, always 1 for a static query. The count is 0 before any pipeline has run. A query interrupted by cancellation can return 0 with OVCLASH_STATUS_SUCCESS, and OpenUSD also reports 0 after a native out-of-memory. A zero count alone therefore does not prove that the scene is clash-free. Cancellation requested after completion does not erase the results produced. For async runs, check the finish outcome, and note ovclash_async_is_cancelled before finish clears the flag and consumes the handle. Also check ovclash_is_out_of_memory. On ovstage, a stage replacement or a direct mesh-selection step can keep this aggregate count while the table-indexed record details turn stale; ovclash_get_overlap_data then fails.

Note

Threading: serialize all calls on one context. Rejected while a pipeline started by ovclash_run_pipeline_async has not been finished. Cancellation still requires ovclash_finish_pipeline to release the active handle.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • out_count – [out] Receives the overlap-group count. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR if context or out_count is null, or an async pipeline handle is still active on this context.

ovclash_result_t ovclash_get_overlap_data(
ovclash_context_t *context,
ovclash_overlap_data_t *data,
uint32_t index,
uint32_t recordIndex,
)#

Reads names, hashes, element count, time and depth for one overlap record.

index selects the overlap group (< ovclash_get_overlap_count), and recordIndex the frame inside that group (< the nbRecords of the group). Both backends range-check both indices. On failure *data is left completely untouched, and an unwritten data->type is not OVCLASH_OVERLAP_PAIR_TYPE_UNDEFINED, so always check the result code. minDistance and maxLocalDepth are in stage linear units. On a mesh-vs-mesh overlap maxLocalDepth stays -1.0f unless max-local-depth computation ran. A point-vs-mesh overlap always reports 0.0f, because depth is mesh-only (see ovclash_set_compute_max_local_depth). The ovstage backend also fails when the extraction generation of the record differs from the current selected-object table. That happens after a stage replacement, successful or failed, and after a direct step-1 re-selection. The check keeps an old clash from being relabelled with new paths.

Note

Lifetime: data->name0 and data->name1 borrow backend-owned path storage and must not be freed. The next pipeline run, ovclash_release_memory, ovclash_reset_context and ovclash_release_context invalidate them. On ovstage, every call that retires the selected-object table invalidates them too: an ovclash_open_stage call that gets past argument validation, whether or not the open succeeds; a successful ovclash_ovstage_attach_stage; ovclash_ovstage_detach_stage; ovclash_ovstage_set_matrix_decomposition with a changed mode (see ovclash_ovstage.h); and an ovclash_get_prim_matrix failure that retires the selection population. The aggregate counts that survive do not keep them alive. Copy the bytes to keep a name.

Note

Ordering: index is an identifier, not a rank. Which group sits at which index is NOT part of the contract. Two runs over the same stage with the same settings report the same set of groups with the same data, but not necessarily in the same order. On the OpenUSD backend, ovclash_set_new_task_manager() makes the order genuinely run-dependent. Match groups by name0 and name1 (or clashHash) rather than by index, and sort in the consumer when a deterministic order matters.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • data – [out] Receives the overlap record. Must not be null.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or data, an out-of-range index or recordIndex, stale results, an active async pipeline, or a backend fetch failure (for example a deleted prim).

ovclash_result_t ovclash_compute_max_local_depth(
ovclash_context_t *context,
float *depth,
uint32_t index,
uint32_t recordIndex,
)#

Recomputes the maximum local penetration depth for an already detected record.

Mesh-vs-mesh records only; point-vs-mesh records fail on both backends. The value is in stage linear units. It is 0.0f when the record has no hard triangle pairs, which touch or interpenetrate at zero distance, so a record made only of tolerance near-misses reports 0.0f. The mode set through ovclash_set_compute_max_local_depth affects only how far the SAT estimate is refined. Unlike ovclash_imm_compute_max_local_depth, this call is NOT rejected in mode OVCLASH_MAX_LOCAL_DEPTH_MODE_DISABLED; it returns the cheap estimate. *depth is left untouched on failure.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active. The computation itself is synchronous and can be expensive on dense pairs.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • depth – [out] Receives the maximum local depth. Must not be null.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or depth, an out-of-range index/recordIndex, a point-cloud overlap, stale results, an active async pipeline, or a backend computation failure. On stale failure *depth remains untouched.

ovclash_result_t ovclash_estimate_motion_vector(
ovclash_context_t *context,
ovclash_float3_t *motionVector,
uint32_t index,
uint32_t recordIndex,
)#

Estimates the world-space relative motion between the two prims of a dynamic record.

Meaningful only for time-sampled queries. Every record of a static query fails, and the first sampled frame of a run yields a zero or degenerate motion vector rather than failing. Mesh-vs-mesh records only; point-vs-mesh records fail on both backends. *motionVector is left untouched on failure. ovclash_depenetrate_meshes normalizes the result and uses it as the direction of OVCLASH_DEPENETRATION_AXIS_MOTION_VECTOR.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • motionVector – [out] Receives the estimated motion vector. Must not be null.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or motionVector, an out-of-range index/recordIndex, a record without previous-frame transforms, a point-cloud overlap, stale results, or an active async pipeline. Both backends check staleness before record-type/previous-frame state and leave the output untouched on failure.

ovclash_result_t ovclash_depenetrate_meshes(
ovclash_context_t *context,
ovclash_float3_t *disp,
uint32_t index,
uint32_t recordIndex,
ovclash_depenetration_axis_t axis,
const ovclash_float3_t *userDir,
)#

Computes the displacement that separates the two meshes of a record along an axis.

Mesh-vs-mesh records only; point-vs-mesh records fail on both backends. userDir is required, and must be non-null, exactly for OVCLASH_DEPENETRATION_AXIS_USER_DEFINED; other axes ignore it. OVCLASH_DEPENETRATION_AXIS_MOTION_VECTOR fails unless the record carries previous-frame transforms. Both backends silently treat an axis value outside the enum as the zero direction, and still return success with a meaningless displacement. disp is a world-space vector in stage linear units and is untouched on failure.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • disp – [out] Receives the separating displacement. Must not be null.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

  • axis – [in] Depenetration direction selector.

  • userDir – [in] Direction for OVCLASH_DEPENETRATION_AXIS_USER_DEFINED; may be null otherwise.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or disp, an out-of-range index/recordIndex, a point-cloud overlap, USER_DEFINED with a null userDir, MOTION_VECTOR without previous transforms, stale results, or an active async pipeline. On stale failure *disp remains untouched.

ovclash_result_t ovclash_create_overlap_report(
ovclash_context_t *context,
ovclash_overlap_report_t *report,
uint32_t index,
uint32_t recordIndex,
ovclash_mesh_index_t meshIndex,
uint32_t flags,
)#

Legacy single-mesh overlap report: colliding faces of one mesh plus the outline.

Honors only OVCLASH_OVERLAP_REPORT_FLAG_DEFAULT (0), _FACES and _OUTLINE. It ignores _FACES0, _FACES1 and _POINTS0; use ovclash_create_overlap_report_ex for those. meshIndex chooses whose face indices land in report->collidingFaces0, and collidingFaces1 always stays empty here. meshIndex must be OVCLASH_MESH_INDEX_0 or _1 whenever faces are requested. Point-cloud overlaps are unsupported and fail on both backends. *report is written only on success.

Note

Floating point: both backends compute outline segments under the calling thread’s floating-point controls, so reports requested under different rounding or denormal modes can differ. The ovstage-only OVCLASH matrix decomposition instead replays the controls in effect when the record was detected.

Note

Lifetime: every pointer in *report is borrowed, never owned by the caller. On the OpenUSD backend they point at engine heap buffers that ovclash_release_overlap_report frees; skipping that call leaks them. On ovstage they alias context-owned result vectors, and release only clears the struct. Release every report before the next pipeline step or run, ovclash_release_memory, ovclash_reset_context or ovclash_release_context. On ovstage, advancing a sampled pipeline can replace these borrowed buffers. ovstage rejects report acquisition when the extraction generations of the record and the selected table differ. A borrowed view acquired earlier cannot be checked afterwards.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • report – [out] Receives the report view. Must not be null; pass to ovclash_release_overlap_report when done.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

  • meshIndex – [in] Which mesh of the pair the face indices refer to.

  • flags – [in] Bitmask of ovclash_overlap_report_flag_t.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or report, an out-of-range index/recordIndex, a point-cloud overlap, an invalid meshIndex, stale ovstage results, an active async pipeline, or a backend extraction failure.

ovclash_result_t ovclash_create_overlap_report_ex(
ovclash_context_t *context,
ovclash_overlap_report_t *report,
uint32_t index,
uint32_t recordIndex,
uint32_t flags,
double *matrixData0,
double *matrixData1,
)#

Extended overlap report: per-mesh faces, outline, cloud points and both world matrices.

Honors OVCLASH_OVERLAP_REPORT_FLAG_FACES0, _FACES1 and _OUTLINE for mesh-vs-mesh records, and _POINTS0, which also fills pointSize0, for point-vs-mesh records. Both backends ignore the legacy _DEFAULT and _FACES bits here. matrixData0 and matrixData1 are OUTPUT buffers, not inputs. When non-null, each receives exactly 16 doubles (128 bytes, row-major 4x4): the world transform of its prim captured at that record. Each must therefore point at storage for 16 doubles. The identically named const double* parameters of ovclash_imm_compute_max_local_depth and ovclash_imm_depenetrate_meshes go the opposite direction. Nothing is written to *report or to the matrices on failure.

Note

Floating point: both backends compute outline segments under the calling thread’s floating-point controls, so reports requested under different rounding or denormal modes can differ. The ovstage-only OVCLASH matrix decomposition instead replays the controls in effect when the record was detected.

Note

Lifetime: all report pointers are borrowed. On OpenUSD they are engine heap buffers that ovclash_release_overlap_report frees; skipping that call leaks them. On ovstage they alias context-owned vectors. Release every report before the next pipeline step or run, ovclash_release_memory, ovclash_reset_context or ovclash_release_context. On ovstage, advancing a sampled pipeline can replace these borrowed buffers. ovstage rejects report acquisition when the extraction generations of the record and the selected table differ. A borrowed view acquired earlier cannot be checked afterwards.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • report – [out] Receives the report view. Must not be null; pass to ovclash_release_overlap_report when done.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

  • flags – [in] Bitmask of ovclash_overlap_report_flag_t.

  • matrixData0 – [out] Optional 16-double row-major world matrix of mesh/cloud 0. May be null.

  • matrixData1 – [out] Optional 16-double row-major world matrix of mesh 1. May be null.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR on a null context or report, an out-of-range index/recordIndex, stale results, an active async pipeline, or a backend extraction failure.

ovclash_result_t ovclash_release_overlap_report(
ovclash_context_t *context,
ovclash_overlap_report_t *report,
)#

Releases a report produced by ovclash_create_overlap_report[_ex] and clears the struct.

On the OpenUSD backend this frees the four engine-allocated buffers that *report references. Call it for every successful create, or the memory leaks. On the ovstage backend the context owns the buffers, and the call only clears the view. On both backends *report is then reset to the ovclash_reset_overlap_report state, which makes a second release harmless. A zero-initialized or reset empty report is also safe to release with a live context. Otherwise pass only a struct that a create call filled in and that has not been edited since: the OpenUSD path rebuilds the engine record straight from these fields and would free arbitrary pointers. Unlike the other report functions, this one is NOT rejected while an async pipeline is active.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] Context that created the report. Must not be null.

  • report – [in,out] Report to release; cleared in place. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS on success, OVCLASH_STATUS_ERROR if context or report is null (OpenUSD also if the context holds no engine instance).

ovclash_result_t ovclash_imm_compute_max_local_depth(
ovclash_context_t *context,
float *depth,
uint64_t meshPath0,
const double *matrixData0,
uint64_t meshPath1,
const double *matrixData1,
)#

Computes maximum local penetration depth for two meshes without running a pipeline.

meshPath0 and meshPath1 are encoded absolute prim paths from ovclash_sdf_path_to_int(). Each matrix is exactly 16 doubles holding the row-major 4x4 world transform of its mesh. The call loads and cooks the two meshes synchronously with the current context settings. In mode OVCLASH_MAX_LOCAL_DEPTH_MODE_DISABLED the operation fails. No prior clash query is required. On success *depth receives the computed value; on failure it is left unchanged.

Note

Preconditions: both matrix pointers must address 16 readable doubles; a null matrix pointer is rejected with OVCLASH_STATUS_ERROR on both backends.

Note

Side effects: may allocate and cook temporary mesh/query data; it does not publish or replace pipeline overlap results.

Note

Lifetime: all input pointers are borrowed only for the duration of the call.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context with an open stage. Must not be null.

  • depth – [out] Receives maximum local depth. Must not be null.

  • meshPath0 – [in] Encoded absolute prim path of the first mesh.

  • matrixData0 – [in] Pointer to 16 row-major doubles for the first world transform.

  • meshPath1 – [in] Encoded absolute prim path of the second mesh.

  • matrixData1 – [in] Pointer to 16 row-major doubles for the second world transform.

Returns:

OVCLASH_STATUS_SUCCESS when depth is computed; OVCLASH_STATUS_ERROR for a null/invalid context or output, an active async pipeline, no open stage, disabled depth computation, null matrices, unknown paths, missing/invalid mesh data, a duplicate identical mesh pose, a backend query/cooking failure, or, on ovstage, a matrix with a non-finite or out-of-float-range value.

ovclash_result_t ovclash_imm_depenetrate_meshes(
ovclash_context_t *context,
ovclash_float3_t *disp,
uint64_t meshPath0,
const double *matrixData0,
uint64_t meshPath1,
const double *matrixData1,
const ovclash_float3_t *dir,
)#

Computes a directed depenetration vector for two meshes without running a pipeline.

meshPath0 and meshPath1 are encoded absolute prim paths from ovclash_sdf_path_to_int(). Each matrix is exactly 16 doubles holding the row-major 4x4 world transform of its mesh. The call runs synchronously with the current stage and cooking settings. No prior clash query is required. On success *disp receives the direction-and-magnitude vector that the mesh query returns. On failure *disp is left unchanged.

Note

Preconditions: both matrix pointers must address 16 readable doubles; a null matrix pointer is rejected with OVCLASH_STATUS_ERROR on both backends.

Note

Side effects: may allocate and cook temporary mesh/query data; it does not publish or replace pipeline overlap results.

Note

Lifetime: all input pointers are borrowed only for the duration of the call.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context with an open stage. Must not be null.

  • disp – [out] Receives the depenetration vector. Must not be null.

  • meshPath0 – [in] Encoded absolute prim path of the first mesh.

  • matrixData0 – [in] Pointer to 16 row-major doubles for the first world transform.

  • meshPath1 – [in] Encoded absolute prim path of the second mesh.

  • matrixData1 – [in] Pointer to 16 row-major doubles for the second world transform.

  • dir – [in] Direction in which to solve the depenetration. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS when disp is computed; OVCLASH_STATUS_ERROR for a null/invalid context, output, or direction, an active async pipeline, no open stage, null matrices, unknown paths, missing/invalid mesh data, a backend query/cooking failure, or, on ovstage, a matrix with a non-finite or out-of-float-range value.

ovclash_result_t ovclash_create_overlap_meshes(
ovclash_context_t *context,
uint32_t index,
uint32_t recordIndex,
bool printNames,
uint32_t mode,
)#

Not supported in ovclash: always fails on both backends.

Debug-mesh creation is a Kit-only feature of the KitClash override, which ovclash does not compile. Both backends stop after validating the record, so neither reaches the engine. Both record a “not supported” diagnostic for ovclash_get_last_error: “not supported by the ovclash

OpenUSD backend” on OpenUSD, “not supported by the ovstage backend” on ovstage. index and recordIndex are still range-checked first, and stale result details are rejected before the call reports that it is unsupported. printNames and mode are ignored. The function remains only for ABI compatibility with the Kit clash interface.

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:
  • context – [in] Context created by ovclash_create_context. Must not be null.

  • index – [in] Zero-based overlap-group index.

  • recordIndex – [in] Zero-based record/frame index inside the group.

  • printNames – [in] Ignored.

  • mode – [in] Ignored.

Returns:

Always OVCLASH_STATUS_ERROR.

ovclash_result_t ovclash_release_overlap_meshes(
ovclash_context_t *context,
)#

No-op in ovclash: there are never any overlap debug meshes to release.

Counterpart of ovclash_create_overlap_meshes, which always fails here. The OpenUSD backend calls an empty base-class virtual, and the ovstage backend has an empty body. Only the context validation and the async-pipeline rejection run.

Note

Errors: a rejected call also records text retrievable through ovclash_get_last_error (available only under OVCLASH_STANDALONE).

Note

Threading: serialize all calls on one context; rejected while an async pipeline is active.

Parameters:

context – [in] Context created by ovclash_create_context. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when context is null or the call is rejected.

ovclash_result_t ovclash_get_timeline_data(
ovclash_context_t *context,
ovclash_timeline_data_t *out_data,
)#

Reads the host timeline state.

Both standalone backends report a fixed stub timeline: startTime 0.0, endTime 0.0, currentTime 0.0, timeCodesPerSecond 24.0. OpenUSD takes those values from the FixedTimeline stub that replaces the Kit timeline; ovstage hard-codes the same four values. Nothing here reflects the open stage or ovclash_set_times, and no ovclash entry point can change it. Treat it as a constant, and drive time-sampled queries through ovclash_set_times instead. Neither backend validates the context argument, which may be null, and the active-async guard does not apply. Only the ovstage owner-operation rejection uses the context: it records its text on a non-null context.

Note

Lifetime: out_data is caller-owned plain data; nothing is borrowed.

Note

Threading: reads no context state; safe from any thread, including during an async run.

Parameters:
  • context – [in] Not validated. May be null. On ovstage a non-null context receives the owner-operation rejection text; nothing else is read from or written to it.

  • out_data – [out] Receives the four timeline doubles. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when out_data is null or, on ovstage, when the call runs inside an owner-operation callback on the same thread (see ovclash_ovstage_run_owner_operation). Nothing is written to out_data on error.

ovclash_result_t ovclash_get_stage_timeline_data(
ovclash_context_t *context,
ovclash_stage_timeline_data_t *out_data,
)#

Reads the timeline metadata of the open stage.

A file-backed operation like ovclash_open_stage, but declared outside the OVCLASH_STANDALONE fence. ovclash_get_timeline_data mirrors a host timeline that standalone builds do not have; this function reads the stage itself. It returns the root-layer startTimeCode, endTimeCode, timeCodesPerSecond and framesPerSecond of the stage passed to ovclash_open_stage. A caller can then convert a static time or a dynamic range in seconds into stage time codes (seconds = time code / timeCodesPerSecond), or take the range from the stage. Unauthored start and end time codes read 0.0, and an unauthored framesPerSecond reads 24.0. Both backends resolve timeCodesPerSecond from the authored timeCodesPerSecond, else the authored framesPerSecond, else 24.0. This is the effective rate of native stage-time conversion, so an authored timeCodesPerSecond of 24.0 still overrides a different framesPerSecond. ovstage requires a positive finite effective rate when it opens the stage. OpenUSD may report a nonpositive authored rate, so callers must reject a nonpositive or nonfinite rate before converting time. On ovstage, a stage attached with ovclash_ovstage_attach_stage reports the start_time_code, end_time_code, time_codes_per_second and frames_per_second of its binding instead. All fields are zeroed before any validation, so a call that fails after the null checks leaves a well-defined all-zero record. Nothing is written when out_data is null.

Note

Lifetime: a null out_data records an error; otherwise a valid context’s last error is cleared before the remaining checks. out_data is caller-owned plain data.

Note

Threading: serialize per context; rejected while an async pipeline handle is alive.

Parameters:
  • context – [in] Context from ovclash_create_context. Must not be null.

  • out_data – [out] Receives the four stage timeline doubles. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS when the record is written; OVCLASH_STATUS_ERROR when context or out_data is null/invalid, an async pipeline handle is active, or no stage is open.

ovclash_result_t ovclash_get_query_stats(
ovclash_context_t *context,
ovclash_stats_t *stats,
)#

Reads mesh and point-cloud counters for the current query.

Reports how many meshes were selected, how many of them were shared instances, how many were cooked, and how many point clouds were selected. The values are meaningful only after the pipeline has run; before that they are zero. OpenUSD copies the accumulated statistics of the engine, which ovclash_reset_context clears. ovstage computes them live from context state, which ovclash_release_memory clears.

Note

Lifetime: stats is caller-owned plain data; nothing is borrowed.

Note

Threading: serialize per context; rejected while an async pipeline handle is alive.

Parameters:
  • context – [in] Context from ovclash_create_context. Must not be null.

  • stats – [out] Receives the four counters. Must not be null; left untouched on failure.

Returns:

OVCLASH_STATUS_SUCCESS on success; OVCLASH_STATUS_ERROR when stats is null, context is null/invalid, or an async pipeline handle is active. Detail via ovclash_get_last_error.

ovclash_result_t ovclash_release_memory(ovclash_context_t *ptr)#

Releases memory held for the current query.

The two backends drop different amounts of state, but both leave the context usable. ovstage clears the query results: source data, meshes, point clouds, overlaps, duplicates, cooked and shared counters, dynamic state and the broadphase BVH. An attached stage stays attached. OpenUSD releases only the overlap debug meshes of the engine, which ovclash never creates (see ovclash_create_overlap_meshes), so it frees nothing and keeps every result. On both backends the context can still be reconfigured and run again. ovclash_reset_context drops all query state.

Note

Errors: the status reports the rejection. Both backends reject an active async pipeline handle and report it through ovclash_get_last_error, which exists only in OVCLASH_STANDALONE builds. A null ptr records nothing anywhere.

Note

Lifetime: on ovstage this invalidates every borrowed view previously handed out by result getters and reports for this context.

Note

Threading: serialize per context; rejected while an async pipeline handle is alive.

Parameters:

ptr – [in] Context from ovclash_create_context. A null ptr returns OVCLASH_STATUS_ERROR.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR when ptr is null or an async pipeline handle is active.

ovclash_result_t ovclash_is_out_of_memory(
ovclash_context_t *context,
uint32_t *out_is_oom,
)#

Queries whether the backend recorded an out-of-memory condition.

OpenUSD reads the process-global out-of-memory flag of the engine. The clash allocator sets it when an allocation returns null. ovclash_reset_context, the release of any OpenUSD context and the first phase of an async run clear it. Because the flag is global, every context in the process shares it, and the context argument serves only the active-async guard. ovstage records, per context, a std::bad_alloc from a required allocation that reaches its C API or async-worker boundary. That flag survives the pipeline finish. A reset, an accepted stage-open attempt or a new run clears it. An optional allocation that fails and recovers does not set it. A dependency may report an allocation failure through an error status or text without setting this flag, so also check the call status and ovclash_get_last_error. A null ovstage context reports 0.

Note

Lifetime: out_is_oom is caller-owned plain data; nothing is borrowed.

Note

Threading: the OpenUSD flag is a plain volatile bool that worker threads write without synchronization; read it only after the pipeline has finished. The ovstage flag is atomic, but a query is still rejected until the async handle has been finished and destroyed.

Parameters:
  • context – [in] Context from ovclash_create_context. May be null. On ovstage selects the recorded condition; both backends reject an active async pipeline handle.

  • out_is_oom – [out] Receives 1 or 0. Must not be null; left untouched on failure.

Returns:

OVCLASH_STATUS_SUCCESS when out_is_oom is written; OVCLASH_STATUS_ERROR when out_is_oom is null or an async pipeline handle is active on a non-null context.

ovclash_result_t ovclash_async_is_cancelled(
ovclash_async_t *async,
uint32_t *out_cancelled,
)#

Reports whether cancellation has been requested for an asynchronous pipeline.

The OpenUSD backend never dereferences the async argument, because the underlying bridge exposes cancellation only as a process-global flag. It answers for the whole process and accepts a null handle. The ovstage backend reads the per-context flag reached through the handle. For a null handle or a handle without a context it reports 0 and still returns success. The flag stays set until ovclash_finish_pipeline or ovclash_reset_context clears it. On OpenUSD, finishing, resetting or releasing any context clears the process-global flag for every context. This call may be polled while the handle is live.

Note

Lifetime: pass null or a live handle. ovstage dereferences the handle, so it must not already have been passed to ovclash_finish_pipeline. OpenUSD never dereferences it, but finishing has already cleared the flag, so a finished handle reports nothing about its run.

Note

Threading: may be polled from another thread while the worker runs, but not concurrently with or after ovclash_finish_pipeline on the same handle. ovstage reads an atomic per-context flag. OpenUSD reads the shared engine’s volatile process-global flag, which provides no C++ thread-safety guarantee.

Parameters:
  • async – [in] Handle from ovclash_run_pipeline_async. May be null on both backends.

  • out_cancelled – [out] Receives 1 when cancellation was requested, otherwise 0.

Returns:

OVCLASH_STATUS_SUCCESS when out_cancelled was written; OVCLASH_STATUS_ERROR only when out_cancelled is null, or a C++ exception was caught.

ovclash_result_t ovclash_open_stage(
ovclash_context_t *context,
ovclash_string_t path,
)#

Opens a file-backed USD stage as the clash source.

Only present in OVCLASH_STANDALONE builds. Both backends require an existing local filesystem path. A std::filesystem::exists check runs before any USD or ovstage resolution, so an asset URI that is not a plain file is rejected up front. OpenUSD opens a pxr::UsdStage, swaps the entry of this context in the process-global standalone stage registry, and immediately pushes an empty scope and the new stage id into the engine. ovstage populates the stage through ovstage, clears the scope lists of the context, and advances the selected-table extraction generation.

Result details computed earlier then fail with a “result details are stale” message on both backends until matching results are published. Aggregate counts computed earlier are kept, but the name0 and name1 views that the result getters already returned are not. The installed pipeline shape stays available, but a started pipeline must restart at step 0, or be recreated, before it runs further steps against the new stage. A path with the same spelling is still a replacement and reads the file again. On OpenUSD, a layer that another holder in the process keeps open, such as the stage of another context, stays shared through the Sdf layer registry and is not read again. Neither backend restores OVCLASH_SETTINGS_FLAG_FULL_SCENE after ovclash_set_scope_paths cleared it.

Note

Lifetime: clears the last error of the context on entry, so read ovclash_get_last_error only after this call returned OVCLASH_STATUS_ERROR.

Note

Threading: serialize per context; rejected while an async pipeline handle is alive. The OpenUSD stage registry is mutex-protected and shared process-wide.

Parameters:
  • context – [in] Context from ovclash_create_context. Must not be null.

  • path – [in] UTF-8 filesystem path. ptr may be null only when length is 0, which is then rejected as an empty path. Copied during the call.

Returns:

OVCLASH_STATUS_SUCCESS when the stage is open; OVCLASH_STATUS_ERROR when context is null/invalid, an async pipeline handle is active, path has a null ptr with a non-zero length, is not valid UTF-8, contains an embedded NUL, is empty, does not exist, or fails to open. When the open itself fails (missing file or USD/ovstage error), the previous stage is dropped, so the context has no source until the next successful call. Argument, UTF-8, embedded-NUL and empty-path errors are rejected before the replacement point and leave the current source and result details unchanged. An actual open attempt, successful or failed, retires them on both backends.

ovclash_result_t ovclash_get_prim_matrix(
ovclash_context_t *context,
ovclash_string_t prim_path,
double time,
double *out_matrix,
)#

Reads a prim’s local-to-world transform from the open stage.

Only present in OVCLASH_STANDALONE builds. time is a USD time code, not seconds. Both backends fill out_matrix with identity before doing any work, so a call that fails after context validation still leaves a well-defined matrix. Nothing is written when out_matrix is null or the context is null or invalid. OpenUSD evaluates a fresh pxr::UsdGeomXformCache per call against the open stage, and fails when the prim does not exist.

For a finite time, ovstage uses a separate, lazy, selector-only numeric population of the source. Reads at the same time reuse it. A forward read applies the new time and reads the local and reset columns at the new sealed population ordinal; a rewind reopens the population. ovstage converts USD time codes to population seconds with the effective composed stage rate: timeCodesPerSecond, else framesPerSecond, else 24.0. The resolved rate must be positive and finite. Conversion fails when a finite USD time code overflows population seconds, or when a nonzero time code underflows to zero seconds. This applies to text and binary stages alike. The numeric path composes world matrices itself, without a separate hierarchy pass. It never advances the USD-default RENDERING population that selection uses. Numeric reads check that the requested prim exists, including identity and instance-proxy prims. An explicit source-read error fails the call with that error.

ovstage never substitutes the pipeline pose of a selected mesh or point cloud, which belongs to the last evaluated sample rather than to time. A read that yields neither a matrix nor its own error fails with “Failed to query prim transform: “ followed by prim_path. A prim missing at the default time keeps a valid selection state. A genuine read or resource failure that resets the selection population invalidates its selected-table details and installed pipeline. Recreate the pipeline after addressing the error, rather than continuing its remaining steps. Direct queries join any matrix-prefetch callback before they access the source. They keep its copied future window, unless the query retires the selection population.

Note

Lifetime: clears the last error of the context on entry; out_matrix is caller-owned.

Note

Threading: serialize per context; rejected while an async pipeline handle is alive.

Parameters:
  • context – [in] Context from ovclash_create_context. Must not be null.

  • prim_path – [in] UTF-8 absolute prim path. ptr may be null only when length is 0, which is then rejected as empty. Copied during the call.

  • time – [in] USD time code at which the transform is evaluated.

  • out_matrix – [out] Receives a row-major 4x4 transform. Must point to 16 writable doubles.

Returns:

OVCLASH_STATUS_SUCCESS when the transform is written; OVCLASH_STATUS_ERROR when out_matrix or context is null/invalid, an async pipeline handle is active, prim_path is an invalid span, non-UTF-8, contains an embedded NUL or is empty, no stage is open, or the prim cannot be resolved.

ovclash_result_t ovclash_sdf_path_to_int(
ovclash_string_t prim_path,
uint64_t *out_encoded,
)#

Encodes an absolute USD prim path into the uint64 id used by the scope and immediate-mode entry points.

Only present in OVCLASH_STANDALONE builds. The path must be an absolute prim path. OpenUSD enforces that through pxr::SdfPath, ovstage through an equivalent USD-identifier check. The two encodings are unrelated, and only the backend that produced an id accepts it. Both backends keep what an id names in a mutex-protected, process-global registry. The id therefore stays valid and stable for the same path for the process lifetime, whether or not a stage holds that path. OpenUSD returns the raw bit pattern of a pxr::SdfPath, a refcounted path-node handle. Its registry keeps the node alive, but the id must never be persisted, hashed for storage or shared across processes. ovstage interns the path string and returns a small non-zero id. Neither registry is ever pruned, not by ovclash_release_context and not by opening another stage. Encoding an unbounded number of distinct paths therefore grows memory until exit.

Note

Threading: safe to call concurrently. Both registries are mutex-protected. OpenUSD path construction relies on the concurrency guarantees of pxr::SdfPath.

Parameters:
  • prim_path – [in] UTF-8 absolute prim path. ptr may be null only when length is 0, which is rejected. Copied during the call.

  • out_encoded – [out] Receives the encoded id. Must not be null; left untouched on failure.

Returns:

OVCLASH_STATUS_SUCCESS when out_encoded is written; OVCLASH_STATUS_ERROR when out_encoded is null, or prim_path is an invalid span, non-UTF-8, contains an embedded NUL, is empty, or is not an absolute prim path, or, on ovstage, when the call runs inside an owner-operation callback on the same thread (see ovclash_ovstage_run_owner_operation). There is no context argument, so the return code is the only failure signal. Nothing is recorded for ovclash_get_last_error.

ovclash_result_t ovclash_set_scope_paths(
ovclash_context_t *context,
const ovclash_string_t *paths1,
size_t paths1_count,
const ovclash_string_t *paths2,
size_t paths2_count,
)#

Restricts clash detection to one or two sets of USD prim paths.

Only present in OVCLASH_STANDALONE builds. Prefer it over ovclash_set_scope, which needs pre-encoded ids. paths1 alone means “paths1 against itself”, both non-empty means “paths1

against paths2”, and both empty means no scope. A scope entry also covers its descendants. Meshes that match both scopes belong to paths1 only: the two-scope mesh query compares paths1 against paths2 minus paths1. Identical scopes therefore produce no mesh-vs-mesh pairs. Validation is all-or-nothing: the scope of the context is replaced only after every entry passes.

No scope is NOT the same as whole-stage traversal. Selection reads two independent pieces of state, this scope and OVCLASH_SETTINGS_FLAG_FULL_SCENE:

scope non-empty -> the scope, whatever the flag says scope empty, FULL_SCENE set -> whole stage scope empty, FULL_SCENE cleared -> nothing at all

The flag starts set on a fresh context and can be restored explicitly. Side effect: when either scope is non-empty, this call clears the flag on both backends. Clearing the scope paths does not restore it. Neither does a successful ovclash_open_stage or, on ovstage, ovclash_ovstage_attach_stage, although both clear the scope, so set the scope after them. Restore full-scene traversal with ovclash_set_full_scene(context, true), or with settings that enable OVCLASH_SETTINGS_FLAG_FULL_SCENE. Both of those calls also clear the scope: the engine scope paths on OpenUSD, the scope lists of the context on ovstage. To keep a non-empty explicit scope, apply them before setting the paths.

OpenUSD converts the strings to SdfPath ids and pushes them into the engine with the current stage id. ovstage stores the strings and prefix-matches them during selection. Both backends read the scope only when a run selects meshes. A call between the steps of a run therefore leaves the selected meshes and the two-scope grouping of that run unchanged.

Note

Lifetime: clears the last error of the context on entry. The caller keeps ownership of every string and array passed in.

Note

Threading: serialize per context; rejected while an async pipeline handle is alive.

Parameters:
  • context – [in] Context from ovclash_create_context. Must not be null.

  • paths1 – [in] First scope. May be null only when paths1_count is 0. Copied during the call.

  • paths1_count – [in] Entry count of paths1.

  • paths2 – [in] Second scope. May be null only when paths2_count is 0. Copied during the call.

  • paths2_count – [in] Entry count of paths2.

Returns:

OVCLASH_STATUS_SUCCESS when the scope is stored; OVCLASH_STATUS_ERROR when context is null/invalid, an async pipeline handle is active, an array is null with a non-zero count, or any entry is an invalid span, non-UTF-8, contains an embedded NUL, is empty, or is not an absolute prim path.

ovclash_string_t ovclash_get_last_error(
const ovclash_context_t *context,
)#

Returns the last error message recorded on a context.

Only present in OVCLASH_STANDALONE builds. It is the only diagnostic channel of the canonical ABI, with no thread-local fallback. The context-free entry points never record anything here: ovclash_sdf_path_to_int, ovclash_get_backend_info, ovclash_get_result_string, ovclash_get_version, ovclash_get_version_string, ovclash_overlap_report_get_dltensor and the ovclash_reset_* helpers. ovclash_get_timeline_data records only on ovstage, and only when it is rejected inside an owner-operation callback with a non-null context.

A success does NOT always clear the text. Calls that clear it include ovclash_open_stage, ovclash_get_prim_matrix, ovclash_get_stage_timeline_data, ovclash_set_scope_paths and, on ovstage, the start of a run and the optional attach and detach operations. A message can outlive the call that produced it. On ovstage, a run clears the text on entry to ovclash_run_pipeline_step with index 0, and for ovclash_run_pipeline_async the worker clears it when the run begins, so a synchronized read during the run may see the message of the previous run or of the current one. Read the text after a call returned OVCLASH_STATUS_ERROR. A non-empty string never means by itself that the last call failed.

One message is recorded by a call that SUCCEEDS. On ovstage, a run that dropped meshes it could not cook reports that here (see ovclash_stats_t::nbCookedMeshes), while every step still returns OVCLASH_STATUS_SUCCESS. The message belongs to its run, and the next run clears it on entry. Any call in between that records or clears an error still replaces it, so read it before doing anything else with the context. nbCookedMeshes below nbMeshes minus nbSharedMeshes is the durable signal.

Note

Lifetime: on ovstage the view points at a thread-local copy, which the next ovclash_get_last_error on the same thread invalidates. While the out-of-memory flag of the context is set, ovstage returns a static diagnostic that needs no allocation instead. Once the thread-local storage of the thread is destroyed, a static notice stands in for a recorded message; glibc destroys that storage of the main thread at exit, before static destructors run. On OpenUSD the context owns the text. The next call on that context that records or clears an error invalidates it, and so does ovclash_release_context. Copy the bytes to keep them on either backend.

Note

Threading: access is synchronized on ovstage, where the async pipeline worker writes the same string while a pipeline runs. A read during the run is safe, but which message it returns is nondeterministic.

Parameters:

context – [in] Context to query. May be null, which yields an empty { NULL, 0 } view.

Returns:

Borrowed UTF-8 view of the recorded message. It is null-terminated and the reported length excludes the terminator; the view is empty when nothing has been recorded.

ovclash_result_t ovclash_get_settings(
const ovclash_context_t *context,
ovclash_settings_t *out_settings,
)#

Reads back the settings currently applied to a context.

The inverse of ovclash_set_settings(). A fresh context reports exactly the ovclash_reset_settings() table on both backends.

Every individual ovclash_set_* setter is reflected here too, so the result always describes the live configuration, not only the last whole-struct assignment. nbTasks reads back clamped to 256, as both backends store it.

Note

Threading: must not run concurrently with a setter on the same context. It is not rejected while an async pipeline handle is active. The setters are, so a read during an async run is stable.

Parameters:
  • context – [in] Context to query. Must not be null and must be valid.

  • out_settings – [out] Receives the current settings. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if either argument is null or the context is invalid (nothing written). No error text is recorded.

ovclash_result_t ovclash_get_version(
uint32_t *out_major,
uint32_t *out_minor,
uint32_t *out_patch,
)#

Reports the runtime version of the loaded ovclash library.

Use it to check that the loaded shared library matches the headers the caller compiled against. The compile-time constants are OVCLASH_VERSION_MAJOR, _MINOR and _PATCH in <ovclash/version.h>.

Note

Threading: safe to call concurrently. Reads no context and no global state.

Parameters:
  • out_major – [out] Major version. Must not be null.

  • out_minor – [out] Minor version. Must not be null.

  • out_patch – [out] Patch version. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if any argument is null (nothing written).

ovclash_string_t ovclash_get_version_string(void)#

Returns the runtime version as a “MAJOR.MINOR.PATCH” string, for example “1.2.3”.

Note

Threading: safe to call concurrently.

Returns:

An explicit-length, null-terminated string with static storage duration. The library owns it. It stays valid for the lifetime of the process and must not be freed or modified.

ovclash_result_t ovclash_overlap_report_get_dltensor(
const ovclash_overlap_report_t *report,
ovclash_report_buffer_t buffer,
ovclash_dltensor_view_t *out_view,
)#

Describes one overlap-report array as a DLPack tensor, without copying.

The tensor borrows the memory of the report: tensor.data aliases the matching pointer inside report. Nothing is allocated and there is nothing to free.

Note

Results: an array that the report flags did not request has count 0. That is reported as success with a zero-length tensor and tensor.data == NULL, not as an error.

Note

Lifetime: the tensor is valid only while report is; it dangles after ovclash_release_overlap_report(). It carries no deleter, so it must never reach a consumer that expects to own a DLManagedTensor.

Note

Device: always kDLCPU, device_id 0.

Note

Threading: safe to call concurrently with distinct out_view storage; the call only reads report.

Parameters:
  • report – [in] A report previously filled by ovclash_create_overlap_report() or ovclash_create_overlap_report_ex(). Must not be null.

  • buffer – [in] Which array to describe.

  • out_view – [out] Receives the tensor and its shape/stride storage. Must not be null.

Returns:

OVCLASH_STATUS_SUCCESS, or OVCLASH_STATUS_ERROR if report or out_view is null or buffer is not a valid enumerator. There is no context, so nothing is recorded for ovclash_get_last_error.

struct ovclash_backend_info_t#
#include <include/ovclash/ovclash.h>

Public Members

ovclash_string_t backend_name#
uint32_t native_openusd_linked#
uint32_t ovpopulation_runtime_loaded#
uint32_t ovstage_cuda_enabled#
struct ovclash_result_t#
#include <include/ovclash/ovclash.h>

Result of a canonical ovclash entry point.

The struct holds one ovclash_status_t field named status. Test it as result.status == OVCLASH_STATUS_SUCCESS. OVCLASH_STATUS_SUCCESS is 0, so a truthiness test of the status reverses the success check.

The struct owns no memory and is safe to copy by value. It carries no detail: where a context exists, ovclash_get_last_error() returns the diagnostic. ovclash_suite_result_t has the same shape, so both public C layers report results the same way.

Public Members

ovclash_status_t status#
struct ovclash_settings_t#
#include <include/ovclash/ovclash.h>

Public Members

uint32_t flags#
uint32_t nbTasks#
uint32_t sortMode#
uint32_t overlapCode#
uint32_t trisPerLeaf#
uint32_t triangleLimit#
uint32_t broadphaseLimit#
float poseEpsilon#
float boundsEpsilon#
float areaEpsilon#
float contactEpsilon#
float contactCutoff#
float tolerance#
float pointSize#
ovclash_max_local_depth_mode_t maxLocalDepthMode#
double startTime#
double endTime#
double timeCodesPerSecond#
struct ovclash_float3_t#
#include <include/ovclash/ovclash.h>

Public Members

float x#

x-component

float y#

y-component

float z#

z-component

struct ovclash_segment_t#
#include <include/ovclash/ovclash.h>

Public Members

ovclash_float3_t p0#
ovclash_float3_t p1#
struct ovclash_duplicate_mesh_data_t#
#include <include/ovclash/ovclash.h>

Public Members

ovclash_string_t name0#
ovclash_string_t name1#
uint64_t meshHash0[2]#
uint64_t meshHash1[2]#
uint64_t clashHash[2]#
uint32_t nbTris#
double time#
struct ovclash_depth_data_t#
#include <include/ovclash/ovclash.h>

Public Members

float maxLocalDepth#
struct ovclash_depenetration_data_t#
#include <include/ovclash/ovclash.h>

Public Members

ovclash_float3_t dir#
float depth#
struct ovclash_overlap_data_t#
#include <include/ovclash/ovclash.h>

Public Members

ovclash_string_t name0#
ovclash_string_t name1#
uint64_t meshHash0[2]#
uint64_t meshHash1[2]#
uint64_t clashHash[2]#
uint32_t nbRecords#
uint32_t type#
uint32_t nbElements#
double time#
float minDistance#
float maxLocalDepth#
struct ovclash_step_data_t#
#include <include/ovclash/ovclash.h>

Public Members

ovclash_string_t name#
uint32_t stepIndex#
uint32_t nbSteps#
float progress#
float stepProgress#
bool finished#
struct ovclash_timeline_data_t#
#include <include/ovclash/ovclash.h>

Public Members

double startTime#
double endTime#
double currentTime#
double timeCodesPerSecond#
struct ovclash_stage_timeline_data_t#
#include <include/ovclash/ovclash.h>

Public Members

double startTimeCode#
double endTimeCode#
double timeCodesPerSecond#
double framesPerSecond#
struct ovclash_stats_t#
#include <include/ovclash/ovclash.h>

Public Members

uint32_t nbMeshes#
uint32_t nbSharedMeshes#
uint32_t nbCookedMeshes#

Unique source meshes successfully cooked for this run; on OpenUSD, the number of cooks attempted.

Shared meshes are cooked once, so a healthy run reports nbMeshes minus nbSharedMeshes. A lower nbCookedMeshes means geometry is missing from the results. A mesh that PhysX cannot cook, for example because of degenerate triangles, is dropped from every phase after cooking. The pipeline step does not fail, so one unusable mesh does not discard the rest. Such a run still reports success and still returns overlaps. The overlaps of the dropped meshes are absent, which looks exactly like a clean scene.

The comparison is an ovstage signal: on OpenUSD a failed cook never lowers this count. On ovstage, compare the counts, then read ovclash_get_last_error(). A mesh that PhysX could not cook records the number of dropped meshes and the first of them, whatever the logging flag. A mesh whose triangulation produced no triangles is dropped with only a log line. Enable logging to name every dropped mesh.

uint32_t nbPointClouds#
struct ovclash_overlap_report_t#
#include <include/ovclash/ovclash.h>

Public Members

uint32_t nbCollidingFaces0#
const uint32_t *collidingFaces0#
uint32_t nbCollidingFaces1#
const uint32_t *collidingFaces1#
uint32_t nbCollidingSegments#
const ovclash_segment_t *collidingSegments#
uint32_t nbCollidingPoints0#
float pointSize0#
const uint32_t *collidingPoints0#
struct ovclash_dltensor_view_t#
#include <include/ovclash/ovclash.h>

A DLTensor plus inline storage for its shape and strides.

DLTensor::shape and strides are pointers, so their arrays need storage. This transparent struct holds that storage inline, so the view can live on the stack and needs no allocation or cleanup:

ovclash_dltensor_view_t view;
if (ovclash_overlap_report_get_dltensor(&report, OVCLASH_REPORT_BUFFER_FACES0, &view).status ==
    OVCLASH_STATUS_SUCCESS)
{
    consume(&view.tensor);
}
A copy of a filled struct still has tensor.shape and tensor.strides pointing into the original. Fill a fresh view instead of copying a filled one.

Public Members

DLTensor tensor#

shape/strides point into the two arrays below

int64_t shape[2]#
int64_t strides[2]#

Linkage macro#

ovclash_export.h is the single definition of OVCLASH_API. Linkage macro gives its expansion on each platform. The Doxygen run predefines OVCLASH_API as empty, and the header has no Doxygen comments, so this section renders almost nothing.

ovstage backend extensions#

ovclash_ovstage.h and ovclash_suite_ovstage.h declare optional symbols that only the ovstage build of the library exports: Stage attachment, owner operations and, on the canonical layer, matrix decomposition selection. ovstage Integration covers the backend check, the owner-operation gate and its reentry rules, the binding descriptor and the authored-transform-updates capability. Comparing ovstage matrix decompositions covers the decomposition selector.

Defines

OVCLASH_OVSTAGE_CAP_AUTHORED_TRANSFORM_UPDATES#

Opts in to authored transform classification on the borrowed Stage.

The owner must populate every composed raw xformOp:* value and the USD-default xformOpOrder:usd-metadata:default for all prims, ancestors and prototypes. A missing order must mean that no default order is authored, not that the property was left out of the population. No source edits, topology changes or manual raw-op writes may occur during a query.

The evaluator may be called twice at identical finite seconds. Between those two committed ordinals, the raw-op update records must contain exactly the initially valued operations that have more than one effective composed USD time sample. Equal-valued samples count. Single samples, and defaults that mask weaker samples, must not produce raw-op updates. Unused operations may be populated. Classification follows the default order and all ancestors, also across reset-stack boundaries. A missing initial active value stays unresolved.

The owner must preserve the complete intervening update interval until the callback returns. Canonical local and reset writes are allowed. A derived matrix change is never an authored-animation signal. The capability requires evaluate_time. Without the capability, attached meshes stay conservatively non-static. An attachment with a composition classifies from its own population and must leave capabilities zero.

Typedefs

typedef struct ovstage_instance_t ovstage_instance_t#
typedef int32_t (*ovclash_ovstage_owner_operation_fn)(void *user_data)#

Performs one synchronous caller-owned ovstage operation.

The callback must not throw or enter any clash runtime. Nested owner-operation calls are allowed.

Param user_data:

[in] Caller-owned operation state, used only during the call.

Return:

1 on success, or any other value on failure.

typedef int32_t (*ovclash_ovstage_evaluate_time_fn)(void *user_data, double seconds, uint64_t *out_committed_ordinal, const char **out_error)#

Evaluates the borrowed stage at a time in seconds, where NaN means Default.

Never called for an attachment with a composition.

On success the callback returns 1 with a newly committed ordinal. On failure it returns any other value, conventionally 0, and may set a UTF-8 diagnostic. The diagnostic must remain valid until the enclosing ovclash call returns. The callback runs on the calling pipeline thread, which may be a native worker. It must not throw or enter any clash runtime.

Before it returns success, the callback must publish the complete sampled canonical local transforms and reset-stack opinions, and then seal the ordinal. The publication includes invisible instance placements and prototype operands. A rendering-only time update may omit invisible placements.

ovclash invokes the callback as an owner operation: the calling thread already holds the process-wide gate of ovclash_ovstage_run_owner_operation. Nested owner operations on that thread are allowed. The callback must never wait for another thread that acquires the gate, because that deadlocks. Owner locks taken in the callback are acquired after the gate, as that function requires.

Note

Threading: one context invokes the callback serially. The owner serializes callbacks and the external use of any Stage shared by several contexts.

Param user_data:

[in] The binding’s caller-owned callback state.

Param seconds:

[in] Evaluation time in seconds, or NaN for Default.

Param out_committed_ordinal:

[out] Receives the sealed read ordinal on success.

Param out_error:

[out] Optional borrowed diagnostic on failure.

Return:

1 on success; any other value, conventionally 0, reports failure. The ordinal must strictly increase and fit the ordinal type of the supplied ovstage implementation (ovstage_ordinal_t, a uint64_t in the pinned ovstage).

Enums

enum ovclash_ovstage_composition_root_t#

Kind of the root of an attached Stage’s composition.

Values:

enumerator OVCLASH_OVSTAGE_COMPOSITION_ROOT_FILE#

A USD file path or an omniverse:// URL.

enumerator OVCLASH_OVSTAGE_COMPOSITION_ROOT_USDA#

Inline USDA text.

enum ovclash_ovstage_matrix_decomposition_t#

Matrix decomposition used for ovstage mesh poses and scales.

Values:

enumerator OVCLASH_OVSTAGE_MATRIX_DECOMPOSITION_OPENUSD#

OpenUSD-compatible math; the default.

enumerator OVCLASH_OVSTAGE_MATRIX_DECOMPOSITION_OVCLASH#

Original ovclash math, for comparison.

Functions

ovclash_result_t ovclash_ovstage_run_owner_operation(
ovclash_ovstage_owner_operation_fn operation,
void *user_data,
)#

Runs an owner operation under the process-wide ovstage lifecycle gate of ovclash.

The gate coordinates external Stage creation, destruction, population, source edits, inspection composition and renderer lifecycle with native file populations. The callback runs synchronously on the calling thread and is never retained. Nested calls on the same thread share the gate, up to 64 levels deep. Inside an owner callback, every guarded canonical entry point and every Suite function that returns ovclash_suite_result_t fails with a reentry error. Nested owner operations stay allowed. So do the unguarded ovclash_get_settings, ovclash_get_last_error and the version, result-string, DLPack tensor-view and reset helpers. Acquire this gate before any owner-specific lock. Attached evaluate_time callbacks already run under it. Data-plane reads and collision work do not acquire it. The OpenUSD backend does not export this optional symbol.

Before and after the callback, the gate looks for the loaded client that sits beside the ovstage runtime. The first successful client discovery, through SDK instance creation or this gate, reads OVCLASH_OMNI_CLIENT_RETRY_MAX_MS and configures the client retry window once per process. The default 0 disables reconnect retries; a positive value allows that many milliseconds. A value that is not an unsigned 32-bit integer is reported on stderr and treated as 0. The policy also affects other callers that share the process-wide client. While the client is not available, configuration stays pending and a later discovery retries it. SDK instance creation reports a missing client once per process on stderr when an explicit retry setting cannot be applied. The checks made by this gate are silent.

Note

Threading: owner operations on different threads are serialized. Nested calls on one thread run synchronously under the gate that thread already holds.

Parameters:
  • operation – [in] Operation callback. Must not be null.

  • user_data – [in] Borrowed callback state. May be null.

Returns:

Success when the callback returns 1. Error for a null callback, callback failure, excessive nesting or a native exception. The gate is released on every exit. Callback diagnostics remain the caller’s responsibility.

ovclash_result_t ovclash_ovstage_attach_stage(
ovclash_context_t *context,
const ovclash_ovstage_binding_t *binding,
)#

Borrows an existing ovstage data-plane instance for one context.

Never writes, evaluates on its own or destroys the instance.

Without a composition the attachment is owner-evaluated and opens no file. Every read uses the borrowed Stage, and a time other than time_seconds calls evaluate_time. Without a callback only the supplied evaluation is available, and Default selection reads that frozen snapshot.

With a composition the attachment is engine-evaluated:

  • Default selection, geometry, visibility, subcomponent kinds, immediate queries and Default-time matrix queries read the borrowed Stage at committed_ordinal. committed_ordinal must stay retained until detach. Units and the timeline come from the binding, as without a composition.

  • ovclash evaluates every finite time itself. That covers numeric transforms, static/dynamic classification, matrix prefetch and direct matrix queries at finite time codes. It replays the composition into private ovstage instances under the gate of ovclash_ovstage_run_owner_operation, at the first finite-time read, and destroys them at detach, reset, ovclash_release_memory or replacement.

  • ovclash never calls evaluate_time and never advances the Stage.

  • The owner guarantees that, at every finite time, its canonical local transforms and reset-stack opinions equal those of a fresh population of the composition. A transform the owner writes only into the data plane is therefore seen by Default selection and by no finite-time read.

  • ovclash reopens the root by its string at every replay, including the first finite-time read, the next finite-time read after a failed replay, the first one after ovclash_release_memory, a read at an earlier time than the last one, each classification and, for an ambiguous rate, the first direct matrix query at a finite time code. The root file and every file that the root or a layer references must therefore stay unchanged on disk until detach; a changed file gives wrong finite-time poses without an error, or fails the run. A relative root resolves against the process working directory at each replay, so open the Stage from an absolute path or a URL and pass that string.

  • meters_per_unit and time_codes_per_second must equal the values the composition resolves; otherwise the first finite-time read fails. One exception: when the root resolves timeCodesPerSecond 24 together with a framesPerSecond F other than 24, an authored 24 cannot be told from an absent rate that falls back to F, so a binding rate of 24 or F is accepted. The first direct matrix query at a finite time code, such as ovclash_get_prim_matrix, then resolves the root’s effective rate and fails on a mismatch. Until then, sampling and classification, which work in seconds, do not detect a wrong rate, and ovclash_get_stage_timeline_data keeps reporting the binding’s rate. Once detected, a mismatch fails every later finite-time read and classification of the attachment with the same diagnostic and without another replay, also after ovclash_release_memory, until the next attach.

  • A composition that ovstage cannot replay fails the first finite-time read with the ovstage diagnostic.

  • The owner must never hold that gate while it waits for a clash call.

In both modes, while clash operations use the instance, the owner excludes rendering, edits, time changes and destruction. A replacement invalidates geometry, results and pipelines. ovclash_release_memory keeps the attachment; ovclash_reset_context, ovclash_ovstage_detach_stage and ovclash_open_stage release it. Active async handles are rejected, including completed handles that are not yet released.

A successful attachment, first or replacement, also clears the scope paths and last error of the context. Like ovclash_open_stage, it does not restore OVCLASH_SETTINGS_FLAG_FULL_SCENE after ovclash_set_scope_paths cleared it, so a run would then select nothing. Set the scope after attaching, or call ovclash_set_full_scene(context, true) for an unscoped run.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] An ovstage context from ovclash_create_context().

  • binding – [in] Caller-owned Stage, metadata, optional callback and optional composition. Must not be null. The descriptor and the composition are copied; the Stage is borrowed.

Returns:

Success, or error for a null context or binding, an invalid size, metadata, ordinal, Stage or composition, or active work. An invalid binding leaves the previous attachment and scope intact. ovclash_get_last_error reports the context diagnostic.

ovclash_result_t ovclash_ovstage_detach_stage(
ovclash_context_t *context,
)#

Releases a borrowed stage after all operations finish, without destroying it.

Invalidates results and pipelines and clears the last error of the context. Active async handles are rejected. On a context without an attachment the call also succeeds: it still clears results and forgets any stage opened with ovclash_open_stage.

Note

Threading: serialize all calls on one context.

Parameters:

context – [in] An ovstage context from ovclash_create_context().

Returns:

Success, or error for an invalid context or active work.

ovclash_result_t ovclash_ovstage_set_matrix_decomposition(
ovclash_context_t *context,
ovclash_ovstage_matrix_decomposition_t implementation,
)#

Selects mesh matrix decomposition for one ovstage context.

A changed mode clears results, invalidates borrowed reports, and discards the current pipeline and the cached geometry and poses. Release reports before the call, and create a new pipeline for the next run. Reapplying the same mode keeps the native results and pipeline state. Immediate mesh queries also use the selected mode. Raw reported world matrices and point-cloud scaling do not depend on it.

The setting survives a context reset and a stage replacement. New contexts use OPENUSD. OVCLASH can change which pairs clash at zero tolerance and what they report. In both modes, mesh decomposition rejects non-finite matrix values and values or linear row magnitudes outside the float range. It also rejects resulting poses or scales that are non-finite or not representable, including rotation quaternions that are not unit length. An affected pipeline or immediate call reports an error.

Note

Threading: serialize all calls on one context. Different contexts select independently.

Parameters:
  • context – [in] An ovstage context from ovclash_create_context().

  • implementation – [in] OPENUSD or OVCLASH.

Returns:

Success, or error for a null context, an invalid mode, an active async handle (including a completed handle that is not yet released) or a native failure. A failure leaves the selected mode unchanged. ovclash_get_last_error() reports context errors.

ovclash_result_t ovclash_ovstage_get_matrix_decomposition(
ovclash_context_t *context,
ovclash_ovstage_matrix_decomposition_t *implementation,
)#

Reads the selected decomposition of an ovstage context.

Does not change results or pipeline state.

Note

Threading: serialize all calls on one context.

Parameters:
  • context – [in] An ovstage context from ovclash_create_context().

  • implementation – [out] Receives the selected mode on success.

Returns:

Success, or error for a null context or output pointer.

struct ovclash_ovstage_composition_t#
#include <include/ovclash/ovclash_ovstage.h>

Composition of an attached Stage, for time evaluation by ovclash.

Names the ovstage population calls whose surviving effect is the borrowed Stage’s USD source:

  • root is the exact string the owner passed to ovstage_population_open_usd_from_file or its _with_desc variant (OVCLASH_OVSTAGE_COMPOSITION_ROOT_FILE: a path or an omniverse:// URL), or to ovstage_population_open_usd_from_string or its _with_desc variant (OVCLASH_OVSTAGE_COMPOSITION_ROOT_USDA). The replay does not depend on which variant the owner called.

  • layers are the USDA texts of the owner’s surviving ovstage_population_add_usd_reference_from_string(stage, text, “/”) merges, in the order the owner added them, earliest first. A merge the owner removed, for example to mute it, is left out.

ovclash replays the same calls with the same strings in the same order into ovstage instances of its own. The strength order and the anchoring of inline layers therefore follow the owner’s. A composition cannot express references at other target paths, file references, or values written directly into the owner’s data plane. An owner that relies on any of them at finite times must not supply a composition.

Set struct_size to sizeof(ovclash_ovstage_composition_t). root_kind holds an ovclash_ovstage_composition_root_t value. root and every layer are non-empty UTF-8 without an embedded NUL. layers may be null only when nb_layers is 0. The attach call copies every string.

Public Members

uint64_t struct_size#
ovclash_string_t root#
uint32_t root_kind#
uint32_t nb_layers#
const ovclash_string_t *layers#
struct ovclash_ovstage_binding_t#
#include <include/ovclash/ovclash_ovstage.h>

Binding of an existing ovstage Stage.

The owner resolves the metadata. Without a composition, ovclash opens no file and probes no file metadata. Set struct_size to the size of this structure. The stage and callback stay caller-owned and must outlive the attachment and every operation on it.

time_seconds describes the current evaluation of the stage. It must be finite, or NaN for Default. Reads at that time use committed_ordinal without calling evaluate_time until another time is evaluated. That publication must therefore be as complete as one made by evaluate_time. meters_per_unit and both rates must be finite and positive. The timeline endpoints must be finite. committed_ordinal must be positive, retained and covered by the global write floor. The instance bundle and its version-query slot must be valid pointers, and the instance must report the ovstage API major and minor version that ovclash was built against, those of the pinned ovstage. evaluate_time may be null. user_data is passed to evaluate_time unchanged.

Public Members

uint64_t struct_size#
ovstage_instance_t *stage#
uint64_t committed_ordinal#
double time_seconds#
double meters_per_unit#
double start_time_code#
double end_time_code#
double time_codes_per_second#
double frames_per_second#
ovclash_ovstage_evaluate_time_fn evaluate_time#
void *user_data#
uint64_t capabilities#

Optional tail guarded by struct_size: a struct_size that ends right before this field is accepted and means no capabilities.

Zero keeps the conservative classification. Unknown bits are rejected, and a nonzero value requires evaluate_time.

const ovclash_ovstage_composition_t *composition#

Optional tail guarded by struct_size: a struct_size that ends right before this field is accepted and means no composition.

Null keeps the owner-evaluated attachment.

A non-null composition makes the attachment engine-evaluated; see ovclash_ovstage_composition_t and ovclash_ovstage_attach_stage. time_seconds must then be NaN, evaluate_time must be null and capabilities must be zero.

Functions

ovclash_suite_result_t ovclash_suite_run_ovstage_owner_operation(
ovclash_ovstage_owner_operation_fn operation,
void *user_data,
)#

Runs a synchronous owner operation under the native ovstage lifecycle gate.

Only the ovstage build of the library exports this function, like every function of this header. Nesting and lock ordering are those of ovclash_ovstage_run_owner_operation. No runtime or Stage is created or retained. Inside the callback, every Suite function that returns ovclash_suite_result_t fails with OVCLASH_SUITE_STATUS_ERROR. This includes data-store, model, export and utility helpers that touch no runtime. Only nested ovclash_suite_run_ovstage_owner_operation calls and the last-error getters are allowed.

Parameters:
  • operation – Caller-owned callback. Must not be null.

  • user_data – Borrowed callback state. May be null.

Returns:

Success when the callback returns 1. Error for an invalid callback, excessive nesting, callback failure or a native exception.

ovclash_suite_result_t ovclash_suite_attach_ovstage(
ovclash_suite_runtime_t *runtime,
const ovclash_ovstage_binding_t *binding,
)#

Borrows an existing ovstage Stage for the runtime.

Ownership and evaluation follow ovclash_ovstage_attach_stage. Active async and fetch handles are rejected, including completed handles that are not yet released. A successful attachment clears the scope set by ovclash_suite_set_scope. Replacing a Stage also clears results and pipelines. A non-empty scope turns the full-scene selection of the engine off. Like ovclash_suite_open_stage, a successful attachment turns it back on when the run settings in effect enable enable_full_scene. The settings in effect are those last applied with ovclash_suite_set_run_settings or, before any successful apply, the engine defaults, which enable it. A failed attachment keeps the previous binding.

The runtime is thread-compatible: serialize calls on one runtime, and do not reenter it from the owner evaluation callback.

Parameters:
  • runtime – An initialized Suite runtime using the ovstage backend. Must not be null.

  • binding – Caller-owned Stage, metadata and optional callback.

Returns:

Success, or error for invalid arguments, active work or attachment failure.

ovclash_suite_result_t ovclash_suite_detach_ovstage(
ovclash_suite_runtime_t *runtime,
)#

Releases the borrowed Stage without destroying it.

Results and pipelines are invalidated. Active async and fetch handles are rejected, including completed handles that are not yet released. Serialize calls on one runtime.

Parameters:

runtime – An initialized Suite runtime using the ovstage backend. Must not be null.

Returns:

Success, or error for invalid arguments or active work.

Suite C API types#

Opaque handle types, the ovclash_suite_string_t view, the Suite status and result structs, the Suite enums, and the plain-data view structs that the runtime and model APIs exchange.

Typedefs

typedef struct ovclash_suite_runtime_t ovclash_suite_runtime_t#

Opaque runtime handle.

Owns stage state, settings, scope and results until ovclash_suite_destroy_runtime.

typedef struct ovclash_suite_async_t ovclash_suite_async_t#

Opaque async pipeline handle.

Owned by the caller until ovclash_suite_async_destroy.

typedef struct ovclash_suite_fetch_and_save_t ovclash_suite_fetch_and_save_t#

Opaque incremental fetch-and-save operation.

Owned by the caller until ovclash_suite_runtime_fetch_and_save_destroy. Reserves its runtime and built-in store until destroyed, even after completion or failure. A custom destination must outlive it.

typedef struct ovclash_suite_fetch_async_t ovclash_suite_fetch_async_t#

Opaque background fetch-and-save handle.

Owned until ovclash_suite_fetch_async_destroy.

typedef struct ovclash_suite_overlap_report_t ovclash_suite_overlap_report_t#

Opaque report handle.

Owned by the caller until ovclash_suite_destroy_overlap_report. Borrows its runtime and may borrow that runtime’s result buffers.

typedef struct ovclash_suite_data_t ovclash_suite_data_t#

Opaque data-store handle for a SQLite file or a JSON directory.

Destroy with ovclash_suite_data_destroy. Owns its store and the scratch records behind getter views.

typedef struct ovclash_suite_frame_cursor_t ovclash_suite_frame_cursor_t#

Opaque forward-only cursor over the frame records of one overlap.

Owned by the caller until ovclash_suite_frame_cursor_destroy. Blocks its data handle’s lifecycle changes while alive, even when empty or exhausted.

typedef struct ovclash_suite_overlap_cursor_t ovclash_suite_overlap_cursor_t#

Opaque forward-only cursor over the overlap records of one query.

Owned by the caller until ovclash_suite_overlap_cursor_destroy. Blocks its data handle’s lifecycle changes while alive, even when empty or exhausted.

typedef struct ovclash_suite_query_t ovclash_suite_query_t#

Opaque owned ClashQuery model handle.

Destroy with ovclash_suite_query_destroy.

typedef struct ovclash_suite_point_cloud_settings_t ovclash_suite_point_cloud_settings_t#

Opaque owned PointCloudSettings model handle.

Destroy with ovclash_suite_point_cloud_settings_destroy.

typedef struct ovclash_suite_clash_info_t ovclash_suite_clash_info_t#

Opaque owned ClashInfo model handle.

Destroy with ovclash_suite_clash_info_destroy.

typedef struct ovclash_suite_clash_frame_info_t ovclash_suite_clash_frame_info_t#

Opaque owned ClashFrameInfo model handle.

Destroy with ovclash_suite_clash_frame_info_destroy.

typedef struct ovclash_suite_export_text_t ovclash_suite_export_text_t#

Opaque owned export text handle.

Holds immutable UTF-8 JSON/HTML until ovclash_suite_export_text_destroy.

Enums

enum ovclash_suite_status_t#

Public C type contract.

Ownership: every ovclash_suite_string_t that the API returns is a borrowed view, owned by the handle or report that produced it. The producing API sets its lifetime. A noncursor data getter also replaces the previous scratch view of the same kind on its next read. A cursor view lasts until the cursor advances again or is destroyed. Copy the bytes before these events, before any mutation and before the owner is destroyed. Input strings and arrays are copied unless the function documents otherwise. On ovstage, report pointers can borrow runtime result storage. Destroy a report before advancing another pipeline step, rerunning or resetting its runtime, or invalidating that runtime’s results, and always before destroying the runtime. Copying a pointer does not extend its lifetime.

Units and layout: times are in seconds unless a function names USD time codes. Matrices are row-major 4x4 arrays of 16 doubles. Boolean fields use 0 for false and non-zero for true. Counts are element counts, not byte counts. All paths and text are UTF-8.

Threading: handles are not internally synchronized for concurrent mutation. Use a handle from one thread at a time, and serialize access when a handle is shared. The only exception is the concurrency that the async fetch snapshot and drain functions document. Independent data and model handles remain subject to database and filesystem locking. Runtime calls also follow the backend’s shared-state limits. Serialize OpenUSD runtimes across handles, because their cancellation, out-of-memory and underlying error state are process-global. Last-error text is thread-local for Suite operation failures, and handle-local where a handle-specific getter exists.

Error behavior: every public function returning ovclash_suite_result_t catches C++ exceptions, returns OVCLASH_SUITE_STATUS_ERROR and updates the thread-local last-error string. Destroy and cleanup functions return a result too. Call them explicitly, outside object finalizers, and check that result. Status code carried by ovclash_suite_result_t.

Values:

enumerator OVCLASH_SUITE_STATUS_SUCCESS#

The call completed.

enumerator OVCLASH_SUITE_STATUS_ERROR#

The call failed; the documented last-error getter describes why.

enumerator OVCLASH_SUITE_STATUS_UNAVAILABLE#

Only report-creation APIs return this: the record exists but its report is unavailable.

enum ovclash_suite_overlap_type_t#

Kind of a runtime or persisted overlap.

Values:

enumerator OVCLASH_SUITE_OVERLAP_NORMAL#

Mesh-vs-mesh overlap.

enumerator OVCLASH_SUITE_OVERLAP_DUPLICATE#

Duplicate mesh pair.

Runtime overlap data never uses it; fetch-and-save writes it for duplicates.

enumerator OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH#

Point-cloud-vs-mesh overlap.

enumerator OVCLASH_SUITE_OVERLAP_MESH_MESH#

Alias of OVCLASH_SUITE_OVERLAP_NORMAL.

enumerator OVCLASH_SUITE_OVERLAP_UNDEFINED#

A runtime pair type with no suite equivalent.

enum ovclash_suite_clash_state_t#

Review state of a persisted clash; ovclash_suite_runtime_fetch_and_save_begin lists the states fetching assigns.

Values:

enumerator OVCLASH_SUITE_CLASH_STATE_NEW#
enumerator OVCLASH_SUITE_CLASH_STATE_APPROVED#
enumerator OVCLASH_SUITE_CLASH_STATE_RESOLVED#
enumerator OVCLASH_SUITE_CLASH_STATE_CLOSED#
enumerator OVCLASH_SUITE_CLASH_STATE_INVALID#
enumerator OVCLASH_SUITE_CLASH_STATE_ACTIVE#
enum ovclash_suite_setting_id_t#

Identifiers of the Kit-compatible query settings.

Each enumerator, minus its OVCLASH_SUITE_ prefix, is a key of the query-settings JSON that ovclash_suite_run_settings_to_query_settings_json writes. No C function takes these values; language bindings read them through ovclash_suite_get_named_constant.

Values:

enumerator OVCLASH_SUITE_SETTING_LOGGING#
enumerator OVCLASH_SUITE_SETTING_DYNAMIC#
enumerator OVCLASH_SUITE_SETTING_DYNAMIC_START_TIME#
enumerator OVCLASH_SUITE_SETTING_DYNAMIC_END_TIME#
enumerator OVCLASH_SUITE_SETTING_PURGE_PERMANENT_OVERLAPS#
enumerator OVCLASH_SUITE_SETTING_QUANTIZED#
enumerator OVCLASH_SUITE_SETTING_SINGLE_THREADED#
enumerator OVCLASH_SUITE_SETTING_NEW_TASK_MANAGER#
enumerator OVCLASH_SUITE_SETTING_FILTER_TEST#
enumerator OVCLASH_SUITE_SETTING_TIGHT_BOUNDS#
enumerator OVCLASH_SUITE_SETTING_COPLANAR#
enumerator OVCLASH_SUITE_SETTING_NB_TASKS#
enumerator OVCLASH_SUITE_SETTING_POSE_EPSILON#
enumerator OVCLASH_SUITE_SETTING_BOUNDS_EPSILON#
enumerator OVCLASH_SUITE_SETTING_AREA_EPSILON#
enumerator OVCLASH_SUITE_SETTING_TRIS_PER_LEAF#
enumerator OVCLASH_SUITE_SETTING_TOLERANCE#
enumerator OVCLASH_SUITE_SETTING_ANY_HIT#
enumerator OVCLASH_SUITE_SETTING_OVERLAP_CODE#
enumerator OVCLASH_SUITE_SETTING_DUP_MESHES#
enumerator OVCLASH_SUITE_SETTING_STATIC_TIME#
enumerator OVCLASH_SUITE_SETTING_COMPUTE_MAX_LOCAL_DEPTH#
enumerator OVCLASH_SUITE_SETTING_DEPTH_EPSILON#
enumerator OVCLASH_SUITE_SETTING_DISCARD_TOUCHING_CONTACTS#
enumerator OVCLASH_SUITE_SETTING_PURGE_PERMANENT_STATIC_OVERLAPS#
enumerator OVCLASH_SUITE_SETTING_USE_USDRT#

Accepted, persisted and read back, but has no effect in ovclash.

In the Kit extension this setting selects a Fabric/USDRT scene traversal instead of
UsdStage::Traverse. Neither ovclash backend compiles that traversal. The ovstage backend
cannot have an equivalent toggle. Its only scene path is ovstage population, which reads
Fabric attributes, so there is no second traversal to switch to.

The setting is kept because it belongs to the Kit-compatible
ClashDetection.DEFAULT_SETTINGS table and is serialized into the stored settings of every
query. Setting it changes that serialized text and nothing else.
ovclash_suite_get_run_settings, and ovclash_get_settings on the canonical ABI, report the
stored value, so it round-trips without affecting clash results.
enumerator OVCLASH_SUITE_SETTING_TRIANGLE_LIMIT#
enumerator OVCLASH_SUITE_SETTING_IGNORE_REDUNDANT_OVERLAPS#
enumerator OVCLASH_SUITE_SETTING_IGNORE_INVISIBLE_PRIMS#
enumerator OVCLASH_SUITE_SETTING_CONTACT_CUTOFF#
enumerator OVCLASH_SUITE_SETTING_MAX_LOCAL_DEPTH_MODE#
enumerator OVCLASH_SUITE_SETTING_ENABLE_POINT_CLOUDS#
enumerator OVCLASH_SUITE_SETTING_POINT_SIZE_OVERRIDE#
enum ovclash_suite_overlap_report_flag_t#

Buffers requested from ovclash_suite_create_overlap_report, equal to the canonical OVCLASH_OVERLAP_REPORT_FLAG_* values.

FACES0, FACES1 and OUTLINE apply to mesh pairs and POINTS0 to point-cloud pairs; a flag that does not apply to the pair type is ignored.

Values:

enumerator OVCLASH_SUITE_OVERLAP_REPORT_DEFAULT#

Requests nothing; ovclash_suite_create_overlap_report fills no buffer for it.

enumerator OVCLASH_SUITE_OVERLAP_REPORT_FACES#

Legacy single-mesh face flag of the canonical API.

ovclash_suite_create_overlap_report ignores it.

enumerator OVCLASH_SUITE_OVERLAP_REPORT_OUTLINE#

Collision outline segments of a mesh pair, from hard intersections only.

enumerator OVCLASH_SUITE_OVERLAP_REPORT_FACES0#

Authored USD face indices of mesh 0.

enumerator OVCLASH_SUITE_OVERLAP_REPORT_FACES1#

Authored USD face indices of mesh 1.

enumerator OVCLASH_SUITE_OVERLAP_REPORT_POINTS0#

Point indices of a point-cloud pair, together with point_size0.

struct ovclash_suite_result_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Status-only result returned by Suite C ABI functions.

Field catalogue:

  • status: OVCLASH_SUITE_STATUS_SUCCESS when the call completed. On OVCLASH_SUITE_STATUS_ERROR, read the documented handle-local or thread-local last-error accessor. Report creation may also return OVCLASH_SUITE_STATUS_UNAVAILABLE, which means an absent report, not a processing failure. The struct owns no memory and can be copied by value.

Public Members

ovclash_suite_status_t status#
struct ovclash_suite_string_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Borrowed UTF-8 byte span.

Field catalogue:

  • ptr: first byte of the UTF-8 span. May be null only when length is 0.

  • length: byte count, excluding any trailing null. It counts bytes, not Unicode scalar values. Returned non-null spans are null-terminated for C compatibility. Read them by length, which excludes the trailing null. An empty returned string may be {NULL, 0}. Input spans are copied unless the receiving function documents borrowing, and need not be null-terminated.

This is a transitional local type. Its layout is byte-identical to ovx_string_t of ovx/string_types.h, which the canonical ovclash/ovclash.h uses as ovclash_string_t.

The local type remains because the core Suite headers (ovclash_suite.h, ovclash_suite_types.h, ovclash_suite_models.h and ovclash_suite_serializer.h) install as a self-contained group that includes no ovx/ header. An SDK consumer can then use the Suite API without the producer include tree. The optional ovstage extension ovclash_suite_ovstage.h includes ovclash/ovclash_ovstage.h, so it needs the ovstage ovx/ include tree, as the canonical header does.

This type is to become ovx_string_t once the Suite headers can always depend on the shared ovx/ tree, as the canonical header already does. The layouts are identical, so the change is a typedef swap, not an ABI break.

Public Members

const char *ptr#
size_t length#
struct ovclash_suite_run_settings_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Runtime clash settings.

Field catalogue:

  • enable_log, enable_full_scene, dynamic, purge_permanent_dynamic_overlaps, purge_permanent_static_overlaps, only_find_duplicates, ignore_redundant_overlaps, enable_point_clouds, ignore_invisible_prims, use_usdrt, single_threaded, new_task_manager, coplanar, any_hit, quantized, tight_bounds, subcomponent_filtering, compute_max_local_depth, discard_touching_contacts, set_times: boolean flags; 0 is false and non-zero is true. dynamic is query metadata that the native runtime does not read; see the time fields below. set_times only enables the end_time >= start_time check. It does not decide whether start_time and end_time apply.

  • max_local_depth_mode: a mode selector, not a flag, although it sits between two flags in the struct. It selects one of three depth algorithms and must be in [0, 2]: 0 is minimal, the legacy fast estimate; 1 is medium, the default; 2 is high, medium refined with 64 sampling directions. Every accepted value computes a depth. The three algorithms can return different depths for the same pair, so “non-zero is true” does not hold for this field. It is read only while compute_max_local_depth is non-zero. That flag is the on/off gate, and this scale has no “disabled” value. The scale is therefore offset by one from ovclash_max_local_depth_mode_t in ovclash.h, where 0 is DISABLED and 1, 2 and 3 are MINIMAL, MEDIUM and HIGH. The two scales are not interchangeable: a canonical enumerator passed here selects the next higher algorithm, and 3 is rejected. The Suite maps between the two scales explicitly.

  • nb_tasks, tris_per_leaf: non-negative task and element counts stored as uint32_t. Their validation differs, so neither is a precedent for the other. tris_per_leaf must be in [1, 15]; other values are rejected. Default 15. The value goes to PxBVH34MidphaseDesc::numPrimsPerLeaf, which PhysX accepts in [2, 15]. Mesh cooking retries with a larger value, which recovers 1. A value above 15 would fail every mesh cook, and the run would report zero clashes instead of an error. nb_tasks accepts any value up to 1000000 and rejects larger ones. The backend then clamps it to its 256-task maximum without notice. The settings read back hold the value passed in, not the clamped one: a request for 5000 reads back as 5000 while canonical storage holds

    1. Only the legacy task manager uses this cap, and ovstage further bounds its workers by hardware concurrency and available work. The new task manager ignores nb_tasks, and single_threaded overrides both managers. Default 128. Fetch-and-save frame preparation for directory stores and for custom serializers with prepare_frame follows the same settings on both backends. The new manager uses Carbonite’s worker budget. The legacy manager uses std::thread workers bounded by nb_tasks, hardware concurrency and available work. single_threaded keeps preparation serial. Built-in SQLite frame encoding and all serializer writes stay on the driving thread. On ovstage, Suite face and outline preparation also follows the live runtime threading settings. Its workers drain before buffers are published or released.

  • overlap_code: an algorithm selector, not a count. Only 1, 2 and 3 select an algorithm. 0 and every other value, including values above 3, behave identically. Neither backend validates it, so an out-of-range value is accepted without an error. Default 3.

  • triangle_limit: the maximum number of triangles reported per overlapping pair. 0 means unlimited, not none. any_hit overrides it to 1. No maximum is validated. Default 0, unlimited.

  • dynamic_start_time, dynamic_end_time, static_time, start_time, end_time: source sample times in seconds. USD time-code conversion uses the stage’s effective rate, the time_codes_per_second of ovclash_suite_stage_timeline_data_t. Only start_time, end_time and time_codes_per_second select the sampled range, as startTime and endTime do in ovclash_settings_t. start_time == end_time is a single static sample at that time; otherwise the run samples [start_time, end_time]. dynamic, static_time, dynamic_start_time and dynamic_end_time are Kit-compatible query metadata. They are validated as finite, persisted into the query-settings JSON and round-tripped by ovclash_suite_get_run_settings, but the native runtime does not read them to choose samples. Resolve them into start_time and end_time before applying the settings, as the Python layer and the C++ sample do.

  • time_codes_per_second: sampling frequency in samples per second, independent of the stage’s effective rate. Zero keeps the single-sample fallback of legacy settings. Positive values set the spacing of multiple samples. Negative values are rejected.

  • tolerance, pose_epsilon, bounds_epsilon, depth_epsilon, contact_cutoff, point_size_override: finite tolerances or point sizes in source scene units. area_epsilon is an area in squared scene units. Finite negative values are accepted. Their meaning depends on the setting; a negative value is not a general unset sentinel. The engine stores these values as float, so each must fit the float range (depth_epsilon only while discard_touching_contacts is set). ovclash_suite_set_run_settings rejects a struct with any out-of-range field. It then keeps the previous settings and names the field in the last-error text.

Public Members

uint32_t enable_log#
uint32_t enable_full_scene#
uint32_t dynamic#
uint32_t purge_permanent_dynamic_overlaps#
uint32_t purge_permanent_static_overlaps#
uint32_t only_find_duplicates#
uint32_t ignore_redundant_overlaps#
uint32_t enable_point_clouds#
uint32_t ignore_invisible_prims#
uint32_t use_usdrt#
uint32_t single_threaded#
uint32_t new_task_manager#
uint32_t coplanar#
uint32_t any_hit#
uint32_t quantized#
uint32_t tight_bounds#
uint32_t subcomponent_filtering#
uint32_t compute_max_local_depth#
uint32_t discard_touching_contacts#
uint32_t max_local_depth_mode#
uint32_t nb_tasks#
uint32_t tris_per_leaf#
uint32_t overlap_code#
uint32_t triangle_limit#
uint32_t set_times#
double dynamic_start_time#
double dynamic_end_time#
double static_time#
double start_time#
double end_time#
double time_codes_per_second#
double tolerance#
double pose_epsilon#
double bounds_epsilon#
double area_epsilon#
double depth_epsilon#
double contact_cutoff#
double point_size_override#
struct ovclash_suite_step_data_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Pipeline or async fetch progress snapshot.

Field catalogue for the pipeline getters ovclash_suite_get_pipeline_step_data and ovclash_suite_async_get_step_data:

  • name: borrowed UTF-8 step name owned by the runtime/async handle.

  • step_index: zero-based active step index.

  • nb_steps: total step count for the prepared pipeline.

  • progress: normalized progress in [0, 1] when known. On the OpenUSD backend an ovclash_suite_async_get_step_data poll may transiently report a value outside [0, 1] or a non-finite one; clamp it and treat a non-finite value as unknown (see ovclash_get_pipeline_step_data_async).

  • finished: non-zero when the reported step is the pipeline’s last step, which can be while it is still executing; use ovclash_suite_async_is_running to detect completion. ovclash_suite_fetch_async_get_step_data documents its own name, nb_steps and finished.

Public Members

ovclash_suite_string_t name#
uint32_t step_index#
uint32_t nb_steps#
float progress#
uint32_t finished#
struct ovclash_suite_overlap_data_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Raw overlap summary returned from the runtime.

Field catalogue:

  • name0/name1: borrowed source object paths owned by the runtime.

  • clash_hash, mesh_hash0, mesh_hash1: legacy 128-bit identifiers as [high64, low64].

  • nb_records: number of time/frame records in this overlap group.

  • nb_elements: collided element count reported by the backend.

  • type: ovclash_suite_overlap_type_t value: OVCLASH_SUITE_OVERLAP_NORMAL, OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH or OVCLASH_SUITE_OVERLAP_UNDEFINED.

  • time: source sample time in seconds.

  • min_distance, max_local_depth: source scene-unit distances/depths.

Public Members

ovclash_suite_string_t name0#
ovclash_suite_string_t name1#
uint64_t clash_hash[2]#
uint64_t mesh_hash0[2]#
uint64_t mesh_hash1[2]#
uint32_t nb_records#
uint32_t nb_elements#
uint32_t type#
double time#
double min_distance#
double max_local_depth#
struct ovclash_suite_duplicate_mesh_data_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Duplicate mesh summary returned from the runtime.

Field catalogue:

  • name0/name1: borrowed source object paths owned by the runtime.

  • clash_hash, mesh_hash0, mesh_hash1: legacy 128-bit identifiers as [high64, low64].

  • nb_tris: triangle count for the duplicate mesh pair.

  • time: source sample time in seconds.

  • matrix0/matrix1: reserved and always all-zero &#8212; the engine reports no per-prim transform for a duplicate pair; use ovclash_suite_get_prim_matrix when one is needed.

Public Members

ovclash_suite_string_t name0#
ovclash_suite_string_t name1#
uint64_t clash_hash[2]#
uint64_t mesh_hash0[2]#
uint64_t mesh_hash1[2]#
uint32_t nb_tris#
double time#
double matrix0[16]#
double matrix1[16]#
struct ovclash_suite_depenetration_data_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Depenetration result.

Field catalogue:

  • dir: unit xyz direction of the depenetration displacement when depth is positive, otherwise all zero.

  • depth: length of the depenetration displacement in source scene units; -1.0 after a failed ovclash_suite_compute_penetration_depth, except for the early rejections that function lists. The struct has no owned memory.

Public Members

double dir[3]#
double depth#
struct ovclash_suite_query_stats_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Runtime query statistics.

Field catalogue:

  • nb_meshes: discovered mesh prim count.

  • nb_shared_meshes: detected shared/instanced mesh count.

  • nb_cooked_meshes: mesh count cooked for clash execution.

  • nb_point_clouds: point-cloud prim count considered by the runtime.

Public Members

uint32_t nb_meshes#
uint32_t nb_shared_meshes#
uint32_t nb_cooked_meshes#
uint32_t nb_point_clouds#
struct ovclash_suite_stage_timeline_data_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Root-layer timeline metadata of the open stage, as USD resolves it.

Field catalogue:

  • start_time_code: stage startTimeCode (0.0 when unauthored).

  • end_time_code: stage endTimeCode (0.0 when unauthored).

  • time_codes_per_second: effective stage rate, resolving authored timeCodesPerSecond, then authored framesPerSecond, then 24.0. Seconds = time code divided by this rate, which is the conversion ovclash_suite_run_settings_t times use. The OpenUSD backend can report a nonpositive authored rate; reject a nonpositive or nonfinite rate before converting.

  • frames_per_second: stage framesPerSecond (24.0 when unauthored). For a Stage attached with ovclash_suite_attach_ovstage, the fields are the start_time_code, end_time_code, time_codes_per_second and frames_per_second of its binding, as supplied.

Public Members

double start_time_code#
double end_time_code#
double time_codes_per_second#
double frames_per_second#
struct ovclash_suite_overlap_report_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Borrowed overlap report buffers.

Field catalogue:

  • nb_colliding_faces0/colliding_faces0: authored USD face-index buffer for object 0. The pointer may be null only when nb_colliding_faces0 is 0.

  • nb_colliding_faces1/colliding_faces1: authored USD face-index buffer for object 1. The pointer may be null only when nb_colliding_faces1 is 0.

  • nb_colliding_segments/colliding_segments_xyzxyz: collision-outline segments from hard triangle pairs only; clearance near-misses add none. The buffer is flat, in xyzxyz order. The count is in segments of six floats each, so the buffer holds nb_colliding_segments * 6 floats. In contrast, ovclash_suite_clash_frame_info_view_t::nb_collision_outline_values counts floats. The pointer may be null only when the count is 0.

  • nb_colliding_points0/colliding_points0: point indices for point-cloud clashes; pointer may be null only when the count is 0.

  • point_size0: source point size used for point-cloud report generation.

  • matrix0/matrix1: row-major 4x4 local-to-world transforms. Pointer fields are borrowed through the report and may reference runtime-owned storage. Destroy the report before advancing another pipeline step, rerunning or resetting the runtime, invalidating its results, or destroying it. Matrix values are copied into this view.

Public Members

uint32_t nb_colliding_faces0#
const uint32_t *colliding_faces0#
uint32_t nb_colliding_faces1#
const uint32_t *colliding_faces1#
uint32_t nb_colliding_segments#
const float *colliding_segments_xyzxyz#
uint32_t nb_colliding_points0#
float point_size0#
const uint32_t *colliding_points0#
double matrix0[16]#
double matrix1[16]#
struct ovclash_suite_clash_info_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Processed clash-info view for one runtime overlap record, filled by ovclash_suite_create_clash_info.

Field catalogue:

  • identifier: always -1; the view is not persisted.

  • query_id: the query identifier passed to ovclash_suite_create_clash_info.

  • overlap_id: borrowed legacy overlap hash string (ovclash_suite_format_int128_hex of clash_hash).

  • overlap_type: ovclash_suite_overlap_type_t value.

  • present: always 1.

  • min_distance, max_local_depth: source scene-unit distance and depth of the record.

  • depth_epsilon, tolerance: the values passed to ovclash_suite_create_clash_info.

  • object_a_path/object_b_path: borrowed source prim paths.

  • object_a_mesh_crc/object_b_mesh_crc: borrowed legacy mesh hash strings.

  • start_time/end_time: both the record’s source sample time in seconds.

  • num_records: number of frame records the engine reports for the overlap group. ovclash_suite_create_clash_info copies that count unchanged, so it can exceed the number of records that actually produce an overlap report.

  • overlap_elements: backend collided element count.

  • state: always OVCLASH_SUITE_CLASH_STATE_NEW. String fields from ovclash_suite_create_clash_info are runtime-owned. They stay valid after the overlap report is destroyed. They become invalid at the next ovclash_suite_create_clash_info, ovclash_suite_runtime_save_overlap_to_data or fetch-and-save capture on the same runtime, whether or not that call succeeds, and when the runtime is destroyed.

Public Members

int64_t identifier#
int64_t query_id#
ovclash_suite_string_t overlap_id#
uint32_t overlap_type#
uint32_t present#
double min_distance#
double max_local_depth#
double depth_epsilon#
double tolerance#
ovclash_suite_string_t object_a_path#
ovclash_suite_string_t object_a_mesh_crc#
ovclash_suite_string_t object_b_path#
ovclash_suite_string_t object_b_mesh_crc#
double start_time#
double end_time#
uint32_t num_records#
uint32_t overlap_elements#
uint32_t state#
struct ovclash_suite_clash_frame_info_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Processed per-frame clash details.

Field catalogue:

  • timecode: source sample time in seconds.

  • min_distance, max_local_depth: source scene-unit distances/depths.

  • overlap_elements: collided element count for this frame.

  • nb_usd_faces0/usd_faces0 and nb_usd_faces1/usd_faces1: authored USD face-index buffers; pointer may be null only when the matching count is 0.

  • nb_usd_points0/usd_points0: point index buffer for point-cloud clashes.

  • nb_collision_outline_values/collision_outline_xyzxyz: outline float values in xyzxyz order, from hard triangle pairs only; clearance near-misses add none. The pointer may be null only when count is 0.

  • point_size0: source point size for point-cloud clashes.

  • object_0_matrix/object_1_matrix: row-major 4x4 local-to-world transforms copied from the report. Pointer fields are borrowed from the generated report.

Public Members

double timecode#
double min_distance#
double max_local_depth#
uint32_t overlap_elements#
uint32_t nb_usd_faces0#
const uint32_t *usd_faces0#
uint32_t nb_usd_faces1#
const uint32_t *usd_faces1#
uint32_t nb_usd_points0#
const uint32_t *usd_points0#
uint32_t nb_collision_outline_values#
const float *collision_outline_xyzxyz#
float point_size0#
double object_0_matrix[16]#
double object_1_matrix[16]#
struct ovclash_suite_query_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Persistent query record view.

Field catalogue:

  • identifier: persistent query id, or -1 before insert.

  • query_name: user-facing query name.

  • object_a_path/object_b_path: stored first/second scope path strings.

  • settings_json: legacy clash settings JSON text; any syntactically valid JSON value, or an empty string, is accepted on input.

  • creation_timestamp/last_modified_timestamp: legacy storage timestamp strings preserved by the native serializer.

  • last_modified_by: user string for the last mutation.

  • comment: user comment.

  • roi_include_path/roi_exclude_path: persisted ROI include/exclude strings. String fields are borrowed on output and copied on input.

Public Members

int64_t identifier#
ovclash_suite_string_t query_name#
ovclash_suite_string_t object_a_path#
ovclash_suite_string_t object_b_path#
ovclash_suite_string_t settings_json#
ovclash_suite_string_t creation_timestamp#
ovclash_suite_string_t last_modified_timestamp#
ovclash_suite_string_t last_modified_by#
ovclash_suite_string_t comment#
ovclash_suite_string_t roi_include_path#
ovclash_suite_string_t roi_exclude_path#
struct ovclash_suite_point_cloud_settings_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Persistent point-cloud settings view.

Field catalogue:

  • identifier: persistent settings id, or -1 before insert.

  • point_cloud_prim_path: source point-cloud prim path.

  • destination_path: generated destination/output prim path.

  • save_to_session_layer, skip_rendering: 0/1 flags.

  • max_lod_level: maximum level of detail recorded for point-cloud extraction; ovclash stores it verbatim and gives no value, -1 included, a special meaning. The default, OVCLASH_SUITE_POINT_CLOUD_SETTINGS_MAX_LOD_LEVEL (1000000, see ovclash_suite_get_named_constant), is effectively unlimited. String fields are borrowed on output and copied on input.

Public Members

int64_t identifier#
ovclash_suite_string_t point_cloud_prim_path#
ovclash_suite_string_t destination_path#
uint32_t save_to_session_layer#
uint32_t skip_rendering#
int64_t max_lod_level#
struct ovclash_suite_clash_info_record_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Persistent clash-info database record view.

Field catalogue:

  • identifier: persistent overlap id, or -1 before insert.

  • query_id: owning query id.

  • overlap_id: legacy overlap hash string.

  • overlap_type: ovclash_suite_overlap_type_t value.

  • present: 0/1 presence flag.

  • min_distance, max_local_depth, depth_epsilon, tolerance: source scene-unit distances/depths/tolerances.

  • object_a_path/object_b_path: persisted source prim paths.

  • object_a_mesh_crc/object_b_mesh_crc: persisted mesh hash strings.

  • start_time/end_time: first/last source sample time in seconds.

  • num_records, overlap_elements: frame/element counts. Overlaps written by ovclash_suite_runtime_save_overlap_to_data store the number of records that actually reported, which can be fewer than the engine’s record count.

  • state: ovclash_suite_clash_state_t value.

  • priority: legacy priority integer.

  • person_in_charge, creation_timestamp, last_modified_timestamp, last_modified_by, comment: user/editable metadata strings.

  • penetration_depth_px/nx/py/ny/pz/nz: per-axis source scene-unit penetration depths.

  • frame_count: on output, the number of stored frame records. On input, the number of placeholder frame rows that ovclash_suite_data_insert_overlap creates. ovclash_suite_data_update_overlap also creates them while the overlap has no frame rows. A count above 1000000 that would be created is rejected. String fields are borrowed on output and copied on input.

Public Members

int64_t identifier#
int64_t query_id#
ovclash_suite_string_t overlap_id#
uint32_t overlap_type#
uint32_t present#
double min_distance#
double max_local_depth#
double depth_epsilon#
double tolerance#
ovclash_suite_string_t object_a_path#
ovclash_suite_string_t object_a_mesh_crc#
ovclash_suite_string_t object_b_path#
ovclash_suite_string_t object_b_mesh_crc#
double start_time#
double end_time#
uint32_t num_records#
uint32_t overlap_elements#
uint32_t state#
uint32_t priority#
ovclash_suite_string_t person_in_charge#
ovclash_suite_string_t creation_timestamp#
ovclash_suite_string_t last_modified_timestamp#
ovclash_suite_string_t last_modified_by#
ovclash_suite_string_t comment#
double penetration_depth_px#
double penetration_depth_nx#
double penetration_depth_py#
double penetration_depth_ny#
double penetration_depth_pz#
double penetration_depth_nz#
uint32_t frame_count#
struct ovclash_suite_clash_frame_info_record_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Persistent clash-frame database record view.

Field catalogue:

  • identifier: persistent frame id, or -1 before insert.

  • clash_info_id: owning overlap id.

  • timecode: source sample time in seconds.

  • min_distance, max_local_depth: source scene-unit distances/depths.

  • overlap_elements: collided element count for this frame.

  • nb_usd_faces0/usd_faces0 and nb_usd_faces1/usd_faces1: authored USD face-index buffers; pointer may be null only when the matching count is 0.

  • nb_collision_outline_values/collision_outline_xyzxyz: outline float values in xyzxyz order, from hard triangle pairs only; clearance near-misses add none. The pointer may be null only when count is 0.

  • object_0_matrix/object_1_matrix: row-major 4x4 local-to-world transforms with 16 values. In-memory frame models copy these values without finite validation; JSON persistence rejects non-finite values.

  • penetration_depth_px/nx/py/ny/pz/nz: per-axis source scene-unit penetration depths.

  • nb_usd_points0/usd_points0: point index buffer for point-cloud clashes.

  • nb_usd_points0_sizes/usd_points0_sizes: point-size buffer with its own count; the pointer may be null only when this count is 0. Runtime-generated frames store one cloud-wide width when point indices are present. That width is the 0.0 sentinel when the scalar width varies or is unavailable. Imported records may carry per-point widths, so never infer this count from nb_usd_points0. Pointer fields are borrowed on output and copied on input.

Public Members

int64_t identifier#
int64_t clash_info_id#
double timecode#
double min_distance#
double max_local_depth#
uint32_t overlap_elements#
uint32_t nb_usd_faces0#
const uint32_t *usd_faces0#
uint32_t nb_usd_faces1#
const uint32_t *usd_faces1#
uint32_t nb_collision_outline_values#
const float *collision_outline_xyzxyz#
double object_0_matrix[16]#
double object_1_matrix[16]#
double penetration_depth_px#
double penetration_depth_nx#
double penetration_depth_py#
double penetration_depth_ny#
double penetration_depth_pz#
double penetration_depth_nz#
uint32_t nb_usd_points0#
const uint32_t *usd_points0#
uint32_t nb_usd_points0_sizes#
const float *usd_points0_sizes#
struct ovclash_suite_state_count_view_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Clash-state aggregate count for one query.

Field catalogue:

  • state: ovclash_suite_clash_state_t bucket value.

  • count: number of overlaps in that state for the queried query id.

Public Members

uint32_t state#
uint32_t count#
struct ovclash_suite_export_column_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Export column definition.

Field catalogue:

  • order: zero-based index of this column’s cell within each row. JSON and HTML export both read it as row_values[row * column_count + order]. Must be less than column_count. Columns are emitted in array order; order does not reorder them. Several columns may name the same cell.

  • name: copied input column label. HTML export renders every cell of a column named exactly Image as an image whose source is the cell value.

  • right_aligned: non-zero right-aligns the column in HTML export; JSON export ignores it.

Public Members

uint32_t order#
ovclash_suite_string_t name#
uint32_t right_aligned#
struct ovclash_suite_export_info_t#
#include <include/ovclash_suite/ovclash_suite_types.h>

Name/value metadata item passed to export functions.

Field catalogue:

  • name: copied UTF-8 metadata key.

  • value: copied UTF-8 metadata value. Strings are copied by the exporter during the call.

Suite C API#

Runtime orchestration, synchronous and asynchronous pipelines, SQLite or JSON-directory persistence, and JSON/HTML export. Threading and Ownership gives the threading rules of runtime, data and model handles and the size-query rule of the functions that write text. Suite Workflows walks through a complete Suite program.

Runtime API

Per-function error catalogue for the runtime API: each runtime function returning ovclash_suite_result_t returns OVCLASH_SUITE_STATUS_SUCCESS when the requested stage, settings, scope, pipeline, query, report or persistence operation completed and the documented outputs are initialized.

It returns OVCLASH_SUITE_STATUS_ERROR when:

  • a runtime handle, output pointer or required matrix pointer is null;

  • a string span is invalid or not UTF-8;

  • no stage is open, or the selected backend does not support the settings or scope;

  • the pipeline is in the wrong state, or a step, overlap, record or duplicate index is out of range;

  • native clash execution fails, or report buffers are missing or inconsistent;

  • a data handle supplied to the fast-save path is not writable;

  • allocation fails, or a C++ exception is caught.

ovclash_suite_get_last_error returns the runtime-specific detail, and ovclash_suite_get_thread_last_error the thread-local detail.

Threading: callers serialize all access to a shared runtime or async handle. A runtime and every async handle it created share one serialization domain. No call on such an async handle may overlap any call on its runtime, ovclash_suite_get_last_error and ovclash_suite_destroy_runtime included. The async calls update the active-run guard and error text of the runtime, and destroying the runtime detaches its async handle. Poll progress from another thread only while no call on the runtime is in flight. Independent ovstage runtime handles may be used concurrently. OpenUSD runtime calls must also be serialized across handles, because cancellation, out-of-memory and underlying error state are process-global.

Ownership: the caller owns runtime-created report and async handles until it calls their matching destroy function. Runtime string and report views are borrowed from the owning runtime or report handle. On ovstage, report arrays borrow runtime result storage: destroy reports before rerunning or resetting the runtime or invalidating its results. Always destroy reports before their runtime.

A live fetch-and-save operation reserves its runtime until the fetch is destroyed, also after completion or failure. During that reservation, runtime destroy and reset, stage, settings and scope changes, pipeline creation and execution, and depth computation fail. Read-only access to results stays available during a synchronous fetch. An asynchronous fetch rejects every runtime call outside its worker until the fetch is destroyed. The guard relies on serialized caller access; it is neither a mutex nor a lease for separately created report handles. Destroy the fetch before retrying a rejected operation.

ovclash_suite_result_t ovclash_suite_create_runtime(
ovclash_suite_runtime_t **out_runtime,
)#

Creates a suite runtime handle.

Parameters:

out_runtime – Receives the created runtime handle. Must not be null and must be destroyed with ovclash_suite_destroy_runtime.

Returns:

Success when the handle is allocated. Failure when out_runtime is null, allocation fails, or an exception is caught.

ovclash_suite_result_t ovclash_suite_destroy_runtime(
ovclash_suite_runtime_t *runtime,
)#

Destroys a suite runtime handle.

Destruction does not cancel an unfinished pipeline started by ovclash_suite_run_pipeline_async. Like ovclash_release_context, it blocks until that run completes and discards its results. Call ovclash_suite_async_cancel first to stop the run early. The async handle stays caller-owned; release it with ovclash_suite_async_destroy afterwards. No call on that handle may be in flight during destruction. Afterwards every call on it except ovclash_suite_async_destroy fails.

Parameters:

runtime – Runtime handle returned by ovclash_suite_create_runtime. May be null.

Returns:

Success when the handle is released or runtime is null. Failure if a fetch is alive or cleanup catches an unexpected exception. An active-fetch rejection retains the runtime; destroy the fetch before retrying runtime destruction.

ovclash_suite_result_t ovclash_suite_reset_runtime(
ovclash_suite_runtime_t *runtime,
)#

Clears runtime state while keeping the handle alive.

Parameters:

runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

Returns:

Success, or error for a null runtime, an active async pipeline or fetch, or a reset the backend rejects.

ovclash_suite_string_t ovclash_suite_get_last_error(
const ovclash_suite_runtime_t *runtime,
)#

Returns the last error message recorded on a runtime handle.

While an async fetch owner is alive, returns the thread-local access-rejection diagnostic of the caller without reading runtime state. ovclash_suite_fetch_async_get_last_error returns the diagnostic of the operation. Destroy that owner before querying runtime state.

Parameters:

runtime – Runtime handle to query. May be null. A null handle, or one with no recorded error, falls back to the thread-local last error; the view is empty only when that is empty too.

ovclash_suite_string_t ovclash_suite_get_thread_last_error(void)#

Returns the last thread-local error recorded by a Suite API without a handle-local error channel.

Once the thread-local storage of the calling thread is destroyed, a failure records a static notice instead of its detail. At exit, glibc destroys that storage of the main thread before static destructors run.

Returns:

Library-owned UTF-8 string view, valid until the next Suite API call on the same thread.

ovclash_suite_result_t ovclash_suite_get_named_constant(
ovclash_suite_string_t name,
int64_t *out_value,
)#

Looks up a public numeric ABI constant by its C identifier.

Dynamic language bindings use it to derive enum, flag, schema-version and compatibility constants from the native library instead of duplicating integer literals. The supported names are:

  • the enumerators of the OVCLASH_SUITE_* enums;

  • the alias spellings OVCLASH_OVERLAP_TYPE_* and OVCLASH_OVERLAP_REPORT_*, without the PAIR or FLAG infix of ovclash.h;

  • the schema versions OVCLASH_SUITE_CLASH_QUERY_VERSION, OVCLASH_SUITE_CLASH_INFO_VERSION, OVCLASH_SUITE_CLASH_FRAME_INFO_VERSION and OVCLASH_SUITE_POINT_CLOUD_SETTINGS_VERSION;

  • the model default OVCLASH_SUITE_POINT_CLOUD_SETTINGS_MAX_LOD_LEVEL.

The enumerator names of the canonical ovclash.h are not looked up, and an unknown name fails.

Parameters:
  • name – Length-prefixed constant identifier, for example OVCLASH_SUITE_SETTING_DYNAMIC.

  • out_value – Receives the constant value. Must not be null.

ovclash_suite_result_t ovclash_suite_is_out_of_memory(
ovclash_suite_runtime_t *runtime,
uint32_t *out_is_out_of_memory,
)#

Queries whether the last runtime execution reported native out-of-memory.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_is_out_of_memory – Receives 1 when the backend reported out-of-memory, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_sdf_path_to_int(
ovclash_suite_string_t prim_path,
uint64_t *out_encoded_path,
)#

Encodes a USD Sdf path into the integer path form used by the clash backend.

Parameters:
  • prim_path – Length-prefixed USD prim path to encode.

  • out_encoded_path – Receives the encoded path value. Must not be null.

ovclash_suite_result_t ovclash_suite_get_prim_matrix(
ovclash_suite_runtime_t *runtime,
ovclash_suite_string_t prim_path,
double time,
double *out_matrix,
)#

Reads a prim’s local-to-world transform from the currently opened stage.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • prim_path – Length-prefixed USD prim path to query.

  • time – USD time code (not seconds) at which the transform is evaluated.

  • out_matrix – Receives a row-major 4x4 transform. Must point to 16 doubles.

ovclash_suite_result_t ovclash_suite_get_stage_timeline_data(
ovclash_suite_runtime_t *runtime,
ovclash_suite_stage_timeline_data_t *out_data,
)#

Reads the timeline metadata of the currently opened stage.

Fails when no stage is open. Use it to convert between the time codes of the stage and the seconds in start_time and end_time of ovclash_suite_run_settings_t, which select the sampled range: seconds = time code / time_codes_per_second. It can also supply a dynamic range from the stage. static_time, dynamic_start_time and dynamic_end_time are persisted query metadata only; the runtime does not read them. Available on both backends without the OpenUSD Python bindings.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_data – Receives the stage timeline record; zeroed before validation. Must not be null.

ovclash_suite_result_t ovclash_suite_open_stage(
ovclash_suite_runtime_t *runtime,
ovclash_suite_string_t stage_path,
)#

Opens a file-backed USD stage for clash detection.

A successful open clears the scope set by ovclash_suite_set_scope; set it again for a scoped run on the new stage. A failed open keeps it. A non-empty scope turns the engine’s full-scene selection off; a successful open turns it back on when the run settings in effect enable enable_full_scene, so a run with no new scope covers the whole new stage. Those are the settings last applied with ovclash_suite_set_run_settings or, before any successful apply, the engine defaults, which enable it.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • stage_path – Length-prefixed filesystem path to the USD stage.

ovclash_suite_result_t ovclash_suite_set_run_settings(
ovclash_suite_runtime_t *runtime,
const ovclash_suite_run_settings_t *settings,
)#

Applies clash runtime settings.

The threading settings may change after the pipeline finishes and before ovclash_suite_runtime_fetch_and_save_begin, for example parallel detection followed by single-threaded fetching. Completed results are kept. To switch the fetch mode, read the current settings first (ovclash_suite_get_default_run_settings when none were applied, because ovclash_suite_get_run_settings then returns a zeroed struct) and change only the threading fields. Finish or cancel an active async pipeline, and destroy any live fetch operation, before changing settings.

A scope set by ovclash_suite_set_scope survives a settings change, in either call order. The floating-point fields that the engine stores as float must lie within the float range: pose_epsilon, bounds_epsilon, area_epsilon, contact_cutoff, tolerance, point_size_override, and depth_epsilon while discard_touching_contacts is set.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • settings – Settings to apply. Must not be null. The struct is copied.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when the engine accepted the settings. OVCLASH_SUITE_STATUS_ERROR, keeping the previous settings, when an argument is null, an async pipeline or a fetch is alive, a double is non-finite, a float-stored field exceeds the float range, max_local_depth_mode exceeds 2, nb_tasks exceeds 1000000, tris_per_leaf is outside [1, 15], time_codes_per_second is negative, set_times is non-zero with end_time below start_time, or the engine rejects them. A failure to re-apply the cached scope afterwards also returns OVCLASH_SUITE_STATUS_ERROR, with the new settings already in effect.

ovclash_suite_result_t ovclash_suite_get_run_settings(
const ovclash_suite_runtime_t *runtime,
ovclash_suite_run_settings_t *out_settings,
)#

Reads back the run settings currently applied to a runtime.

The inverse of ovclash_suite_set_run_settings. Reports the last settings that the engine accepted; a rejected apply leaves the previous values in place. Before any successful apply it reports a zero-initialized struct. That struct differs from ovclash_suite_get_default_run_settings, and the runtime does not use it either: until then, detection and fetch preparation run with the engine defaults, the ovclash_reset_settings table.

Suite-only fields that the canonical settings struct cannot carry (dynamic, static_time, set_times, depth_epsilon, …) round-trip here, although the engine cannot return them.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_settings – Receives the current settings. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS, or an error status if either argument is null or an async fetch owner is alive (nothing is written).

ovclash_suite_result_t ovclash_suite_set_scope(
ovclash_suite_runtime_t *runtime,
const ovclash_suite_string_t *prim_paths1,
size_t prim_paths1_count,
const ovclash_suite_string_t *prim_paths2,
size_t prim_paths2_count,
)#

Restricts clash detection to one or two sets of USD prim paths.

The paths are copied into runtime state and forwarded to ovclash_set_scope_paths. paths1 alone means paths1 against itself, both non-empty means paths1 against paths2, and both empty means no scope. The runtime handle is mutated only after argument validation succeeds. The runtime applies the copy again after each ovclash_suite_set_run_settings, and before ovclash_suite_create_pipeline builds, so scope and settings may be set in either order. A successful ovclash_suite_open_stage or ovstage attachment clears the scope.

A non-empty scope turns the full-scene selection of the engine off. A both-empty scope, a successful open or an attachment turns it back on when the run settings in effect enable enable_full_scene. The settings in effect are those last applied with ovclash_suite_set_run_settings or, before any successful apply, the engine defaults, which enable it. An unscoped run therefore selects the whole stage, whichever of scope and settings was set last. With enable_full_scene cleared, an unscoped run selects nothing.

Threading: callers serialize access to a shared runtime while changing the scope. Independent ovstage runtime handles may be configured concurrently.

Example:

ovclash_suite_string_t a[] = { { "/World/A", 8 } };
ovclash_suite_string_t b[] = { { "/World/B", 8 } };
ovclash_suite_set_scope(runtime, a, 1, b, 1);

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • prim_paths1 – Array of first-scope prim paths. May be null when prim_paths1_count is zero.

  • prim_paths1_count – Number of entries in prim_paths1.

  • prim_paths2 – Array of second-scope prim paths. May be null when prim_paths2_count is zero.

  • prim_paths2_count – Number of entries in prim_paths2.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when the scope is accepted. OVCLASH_SUITE_STATUS_ERROR when runtime is null, an async pipeline or a fetch is alive, either array pointer is null with a non-zero count, any string span is invalid or non-UTF-8, the engine rejects an entry (empty, containing an embedded NUL character, or not an absolute prim path), memory allocation fails, or a C++ exception is caught. Error detail is available through ovclash_suite_get_last_error(runtime) and ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_create_pipeline(
ovclash_suite_runtime_t *runtime,
uint32_t *out_step_count,
)#

Builds the runtime pipeline for the currently opened stage, settings, and scope.

Preconditions: configure settings and scope first when non-default behavior is needed. The runtime must not be running an async pipeline. Building the pipeline needs no stage; a missing stage surfaces from ovclash_suite_run_pipeline_step or the async run.

Side effects: applies the scope set by ovclash_suite_set_scope again and, on success, replaces any previously prepared pipeline and stores the new step count. A failed ovstage build keeps the previous pipeline. Runtime result buffers are populated only when ovclash_suite_run_pipeline_step or ovclash_suite_run_pipeline_async runs. A failure to apply the scope or to create the pipeline leaves *out_step_count at 0.

Ownership: the caller keeps owning runtime. out_step_count receives a scalar value and owns no memory.

Threading: callers serialize access to runtime while creating or running a pipeline. Independent ovstage runtime handles may create pipelines concurrently.

Example:

uint32_t steps = 0;
if (ovclash_suite_create_pipeline(runtime, &steps).status == OVCLASH_SUITE_STATUS_SUCCESS) {
    for (uint32_t index = 0; index < steps; ++index) {
        ovclash_suite_run_pipeline_step(runtime, index);
    }
}

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_step_count – Receives the number of pipeline steps. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when the pipeline is prepared and out_step_count is initialized. OVCLASH_SUITE_STATUS_ERROR when runtime or out_step_count is null, an async pipeline or a fetch is alive, applying the scope again fails, backend pipeline creation fails, an unsupported backend capability is requested, allocation fails, or a C++ exception is caught. ovclash_suite_get_last_error(runtime) and ovclash_suite_get_thread_last_error return the failure detail.

ovclash_suite_result_t ovclash_suite_get_pipeline_step_data(
ovclash_suite_runtime_t *runtime,
uint32_t step_index,
ovclash_suite_step_data_t *out_step_data,
)#

Describes one planned pipeline step.

progress is step_index / nb_steps and finished marks the last step; neither reflects execution. Use ovclash_suite_async_get_step_data for live progress.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • step_index – Zero-based pipeline step index.

  • out_step_data – Receives step name, index, count, progress, and finished state. Must not be null.

ovclash_suite_result_t ovclash_suite_run_pipeline_step(
ovclash_suite_runtime_t *runtime,
uint32_t step_index,
)#

Executes one pipeline step.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • step_index – Zero-based pipeline step index to execute.

ovclash_suite_result_t ovclash_suite_run_pipeline_async(
ovclash_suite_runtime_t *runtime,
ovclash_suite_async_t **out_async,
)#

Starts asynchronous execution of the prepared pipeline.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_async – Receives the async handle. Must not be null and must be destroyed with ovclash_suite_async_destroy.

ovclash_suite_result_t ovclash_suite_async_is_running(
ovclash_suite_async_t *async_handle,
uint32_t *out_running,
)#

Polls whether an asynchronous pipeline is still running.

Parameters:
  • async_handle – Async handle returned by ovclash_suite_run_pipeline_async. Must not be null.

  • out_running – Receives 1 while execution is still active, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_async_get_step_data(
ovclash_suite_async_t *async_handle,
ovclash_suite_step_data_t *out_step_data,
)#

Reads progress information from an asynchronous pipeline.

progress is forwarded unclamped from ovclash_get_pipeline_step_data_async. On OpenUSD, a poll that races the work-counter reset of a phase can report it outside [0, 1] or non-finite. Consumers clamp it and treat a non-finite value as unknown. ovstage reports a locked, clamped snapshot. Clash results are unaffected.

Parameters:
  • async_handle – Async handle returned by ovclash_suite_run_pipeline_async. Must not be null.

  • out_step_data – Receives the active step information. Must not be null.

ovclash_suite_result_t ovclash_suite_async_finish(
ovclash_suite_async_t *async_handle,
)#

Waits for asynchronous pipeline execution to finish and consumes the engine run.

After finish or cancel, polling, finish, and cancel calls on the same handle return OVCLASH_SUITE_STATUS_ERROR. Release the remaining handle with ovclash_suite_async_destroy.

Parameters:

async_handle – Async handle returned by ovclash_suite_run_pipeline_async. Must not be null.

ovclash_suite_result_t ovclash_suite_async_cancel(
ovclash_suite_async_t *async_handle,
)#

Requests cancellation of asynchronous pipeline execution.

Blocks until the worker stops and consumes the engine run. Release the remaining handle with ovclash_suite_async_destroy; a later ovclash_suite_async_finish on it returns OVCLASH_SUITE_STATUS_ERROR.

Parameters:

async_handle – Async handle returned by ovclash_suite_run_pipeline_async. Must not be null.

ovclash_suite_result_t ovclash_suite_async_destroy(
ovclash_suite_async_t *async_handle,
)#

Releases an asynchronous pipeline handle.

An unfinished run is finished first, blocking until it completes. The handle may outlive its runtime; after ovclash_suite_destroy_runtime this only frees it. While the runtime is alive, this call, like every other call on the handle, must not overlap a call on that runtime.

Parameters:

async_handle – Async handle returned by ovclash_suite_run_pipeline_async. May be null.

ovclash_suite_result_t ovclash_suite_get_nb_overlaps(
ovclash_suite_runtime_t *runtime,
uint32_t *out_overlap_count,
)#

Queries the number of detected overlap groups.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_overlap_count – Receives the overlap group count. Must not be null.

ovclash_suite_result_t ovclash_suite_get_nb_duplicates(
ovclash_suite_runtime_t *runtime,
uint32_t *out_duplicate_count,
)#

Queries the number of detected duplicate mesh pairs.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_duplicate_count – Receives the duplicate pair count. Must not be null.

ovclash_suite_result_t ovclash_suite_get_overlap_data(
ovclash_suite_runtime_t *runtime,
uint32_t overlap_index,
uint32_t record_index,
ovclash_suite_overlap_data_t *out_data,
)#

Reads detailed data for one overlap record.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • overlap_index – Zero-based overlap group index.

  • record_index – Zero-based record/frame index inside the overlap group.

  • out_data – Receives overlap names, hashes, counts, type, time, distance, and depth. Must not be null.

ovclash_suite_result_t ovclash_suite_get_duplicate_data(
ovclash_suite_runtime_t *runtime,
uint32_t duplicate_index,
ovclash_suite_duplicate_mesh_data_t *out_data,
)#

Reads duplicate mesh data for one duplicate pair.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • duplicate_index – Zero-based duplicate mesh pair index.

  • out_data – Receives duplicate names, hashes, triangle count and time; the matrices stay zero. Must not be null.

ovclash_suite_result_t ovclash_suite_get_query_stats(
ovclash_suite_runtime_t *runtime,
ovclash_suite_query_stats_t *out_stats,
)#

Queries runtime statistics for the last pipeline execution.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • out_stats – Receives mesh and point cloud counters. Must not be null.

ovclash_suite_result_t ovclash_suite_compute_overlap_max_local_depth(
ovclash_suite_runtime_t *runtime,
uint32_t overlap_index,
uint32_t record_index,
double *out_depth,
)#

Computes the maximum local depth for an already detected overlap record.

Not supported for point-cloud overlaps. The backends compute the depth from the mesh pair behind the record, so an overlap whose ovclash_suite_overlap_data_t::type is OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH fails here. Test the overlap type before the call.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • overlap_index – Zero-based overlap group index.

  • record_index – Zero-based record/frame index inside the overlap group.

  • out_depth – Receives the computed maximum local depth. Must not be null.

ovclash_suite_result_t ovclash_suite_compute_max_local_depth(
ovclash_suite_runtime_t *runtime,
ovclash_suite_string_t mesh_path0,
const double *matrix0,
ovclash_suite_string_t mesh_path1,
const double *matrix1,
double *out_depth,
)#

Computes maximum local depth between two mesh instances.

Both paths must resolve to UsdGeomMesh prims. A UsdGeomPoints path is never loaded as a mesh, so the call fails for it. A stage must be open, but no pipeline run is required: the call loads and cooks the two meshes with the settings in effect. It fails unless those settings enable compute_max_local_depth, which the engine defaults do not. max_local_depth_mode selects the algorithm. *out_depth is unchanged on failure.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • mesh_path0 – Length-prefixed USD path of the first mesh.

  • matrix0 – Row-major 4x4 transform for the first mesh. Must point to 16 doubles.

  • mesh_path1 – Length-prefixed USD path of the second mesh.

  • matrix1 – Row-major 4x4 transform for the second mesh. Must point to 16 doubles.

  • out_depth – Receives the computed maximum local depth. Must not be null.

ovclash_suite_result_t ovclash_suite_compute_penetration_depth(
ovclash_suite_runtime_t *runtime,
ovclash_suite_string_t mesh_path0,
const double *matrix0,
ovclash_suite_string_t mesh_path1,
const double *matrix1,
double dir_x,
double dir_y,
double dir_z,
ovclash_suite_depenetration_data_t *out_data,
)#

Computes penetration depth along a supplied direction between two mesh instances.

Both paths must resolve to UsdGeomMesh prims. A UsdGeomPoints path is never loaded as a mesh, so the call fails for it.

The direction need not be normalized; it is converted to float before the query. Each component must be finite and no larger in magnitude than FLT_MAX. The square of at least one float component must be a normal float; squares below FLT_MIN count as zero, because PhysX flushes them. The squared float length must not overflow. A zero direction, a direction too small to survive the conversion, and a direction whose length overflows float are rejected with an error rather than queried.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • mesh_path0 – Length-prefixed USD path of the first mesh.

  • matrix0 – Row-major 4x4 transform for the first mesh. Must point to 16 doubles.

  • mesh_path1 – Length-prefixed USD path of the second mesh.

  • matrix1 – Row-major 4x4 transform for the second mesh. Must point to 16 doubles.

  • dir_x – X component of the query direction.

  • dir_y – Y component of the query direction.

  • dir_z – Z component of the query direction.

  • out_data – Receives penetration direction and depth. Must not be null. A failure other than the rejection while a fetch is alive, or a call made from inside an ovstage owner operation, leaves a zero direction and depth -1.0.

ovclash_suite_result_t ovclash_suite_create_overlap_report(
ovclash_suite_runtime_t *runtime,
uint32_t overlap_index,
uint32_t record_index,
uint32_t flags,
ovclash_suite_overlap_report_t **out_report,
)#

Creates a detailed overlap report containing requested face, point, outline, and matrix buffers.

Destroy the report before advancing another pipeline step, rerunning or resetting the runtime, invalidating its results, or destroying the runtime. The runtime must stay alive until the report is destroyed. On ovstage, report buffers borrow storage from the runtime results; creating a report does not extend the lifetime of that storage.

Point-cloud overlaps are supported. For them the report holds the indices of the clashing points (OVCLASH_SUITE_OVERLAP_REPORT_POINTS0) and the cloud-wide point_size0. That size is 0.0 when per-point authored widths that actually vary size the cloud; this API does not resolve those widths. A uniform widths array holds one value repeated per point. USD’s default “vertex” interpolation makes an exporter write such an array for a cloud with one size. For such an array the report holds that single width on the ovstage backend, and 0.0 on the OpenUSD backend, whose sizing lives in the shared engine. See “Point-cloud widths in reports” in the Limitations guide of the ovclash documentation.

Faces and collision outlines are reported for mesh-vs-mesh pairs only. Both backends ignore the flags that do not apply to the pair type, and OVCLASH_SUITE_OVERLAP_REPORT_DEFAULT and OVCLASH_SUITE_OVERLAP_REPORT_FACES select nothing here. Both backends compute collision outlines under the floating-point controls of the calling thread, so reports created under different rounding or denormal modes can differ. A Suite runtime always uses the default ovstage matrix decomposition, so its outlines always follow the calling thread’s controls.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • overlap_index – Zero-based overlap group index.

  • record_index – Zero-based record/frame index inside the overlap group.

  • flags – Bitmask of ovclash_suite_overlap_report_flag_t values selecting report buffers.

  • out_report – Receives the created report handle. Must not be null and must be destroyed with ovclash_suite_destroy_overlap_report.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS with a report; OVCLASH_SUITE_STATUS_UNAVAILABLE with a null report when the record exists but cannot provide report data; OVCLASH_SUITE_STATUS_ERROR for invalid arguments, extraction failures, cancellation, or allocation failure.

ovclash_suite_result_t ovclash_suite_get_overlap_report_view(
ovclash_suite_overlap_report_t *report,
ovclash_suite_overlap_report_view_t *out_view,
)#

Returns the buffer view for an overlap report.

Parameters:
  • report – Report handle returned by ovclash_suite_create_overlap_report. Must not be null.

  • out_view – Receives borrowed buffer pointers and copied counts, point size and transforms. Must not be null. The view does not extend the report or runtime-buffer lifetime.

ovclash_suite_result_t ovclash_suite_destroy_overlap_report(
ovclash_suite_overlap_report_t *report,
)#

Destroys an overlap report handle and invalidates views that reference its buffers.

The runtime that created the report must still be alive.

Parameters:

report – Report handle returned by ovclash_suite_create_overlap_report. May be null.

ovclash_suite_result_t ovclash_suite_create_clash_info(
ovclash_suite_runtime_t *runtime,
uint32_t overlap_index,
uint32_t record_index,
int64_t query_id,
double tolerance,
double depth_epsilon,
ovclash_suite_clash_info_view_t *out_clash_info,
ovclash_suite_clash_frame_info_view_t *out_frame_info,
ovclash_suite_overlap_report_t **out_report,
)#

Builds suite-level clash info and frame info records for one overlap record.

num_records of the clash info is the engine record count of the whole overlap group, not the number of records that can be reported. ovclash_suite_runtime_save_overlap_to_data persists the surviving count instead, so the two disagree for an overlap that loses records. The report is created with FACES0, FACES1 and OUTLINE for a mesh pair, and with POINTS0 for a point-cloud pair. The returned report and the borrowed frame buffers follow the runtime and report lifetime rules of ovclash_suite_create_overlap_report.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null.

  • overlap_index – Zero-based overlap group index.

  • record_index – Zero-based record/frame index inside the overlap group.

  • query_id – Query identifier to store in the returned clash info.

  • tolerance – Tolerance recorded in the returned clash info.

  • depth_epsilon – Depth epsilon recorded in the returned clash info.

  • out_clash_info – Receives the clash info view. Must not be null. Its strings are runtime-owned: they stay valid after the report is destroyed, but only until the next ovclash_suite_create_clash_info, ovclash_suite_runtime_save_overlap_to_data or fetch-and-save capture on the same runtime, whether or not that call succeeds, or until the runtime is destroyed. Copy them to keep them longer.

  • out_frame_info – Receives the frame info view. Its buffers are borrowed through out_report and follow the lifetime rules of ovclash_suite_create_overlap_report. Must not be null.

  • out_report – Receives the report associated with borrowed frame buffers. Must not be null and must be destroyed with ovclash_suite_destroy_overlap_report.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when the clash-info views are populated. OVCLASH_SUITE_STATUS_UNAVAILABLE when a valid record has no available report; the output views are then empty and out_report is null. Only this status permits skipping a frame. OVCLASH_SUITE_STATUS_ERROR when the runtime, an output pointer, a backend index, the report buffers or an allocation fails. ovclash_suite_get_last_error(runtime) and ovclash_suite_get_thread_last_error return the failure detail.

ovclash_suite_result_t ovclash_suite_runtime_save_overlap_to_data(
ovclash_suite_runtime_t *runtime,
ovclash_suite_data_t *data,
uint32_t overlap_index,
int64_t query_id,
double tolerance,
double depth_epsilon,
uint32_t commit,
int64_t *out_identifier,
uint32_t *out_frame_count,
)#

Processes and persists one runtime overlap directly into a suite data store.

It persists one overlap through the fetch-and-save engine, without approval comparison or reconciliation. It keeps the editable metadata of an existing overlap with the same query_id and overlap id, and updates runtime-owned fields from the current clash result. It replaces frame rows in bulk, and commits explicitly like the data-store APIs.

A record that the engine still resolves but cannot produce an overlap report for is dropped, as in the Kit extension, rather than failing the whole overlap. A record index that the engine does not know still fails the save, and an overlap whose records all fail to report is an error. The persisted overlap therefore describes only the surviving records. Its num_records and *out_frame_count are the surviving count, and its start_time and end_time are the sample times of the first and last surviving record. An *out_frame_count below the engine record count of the overlap (nb_records from ovclash_suite_get_overlap_data) is thus a legitimate SUCCESS outcome. A caller that needs to know whether records were lost compares the two itself. ovclash_suite_create_clash_info reports the engine count in its num_records, so the two APIs disagree about the same overlap once a record is dropped.

Parameters:
  • runtime – Runtime handle returned by ovclash_suite_create_runtime. Must not be null and must own completed results. Rejected while an async pipeline or a fetch is alive on it.

  • data – Suite data handle created by either data factory. Must not be null and must be writable. Rejected while a fetch is alive on it.

  • overlap_index – Zero-based overlap group index in runtime results.

  • query_id – Query identifier to assign to the persisted overlap.

  • tolerance – Tolerance stored on the persisted overlap.

  • depth_epsilon – Depth epsilon stored on the persisted overlap.

  • commit – Non-zero to commit after this overlap. Zero leaves the serializer transaction open for a later commit.

  • out_identifier – Receives the persisted overlap identifier. Must not be null.

  • out_frame_count – Receives the number of persisted frame records, which can be fewer than the overlap’s engine record count. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS on success; OVCLASH_SUITE_STATUS_ERROR when arguments, runtime results, report buffers, data store state, or storage writes fail. Failure text is available through ovclash_suite_get_last_error(runtime), ovclash_suite_data_get_last_error(data), or ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_begin(
ovclash_suite_runtime_t *runtime,
ovclash_suite_data_t *data,
const ovclash_suite_fetch_serializer_t *serializer,
int64_t query_id,
double tolerance,
double depth_epsilon,
uint32_t include_duplicates,
uint32_t resolve_stale,
ovclash_suite_fetch_and_save_t **out_fetch,
)#

Begins incremental fetching, serialization and saving of the runtime’s completed results into a query.

Pass a null serializer to use the built-in SQLite or directory serializer of the live data handle. For a custom destination, pass a serializer callback table and null data. Exactly one of data and serializer must be non-null; both or neither returns an error. The custom table is copied, and its user_data and destination must outlive the operation. The required callbacks must be non-null, and prepare_frame and release_frame must be both null or both set. See the callback contract in ovclash_suite_serializer.h.

Threading: the operation uses the runtime threading settings single_threaded, new_task_manager and nb_tasks: the applied ones or, before any successful ovclash_suite_set_run_settings, the engine defaults. Frame preparation of the directory serializer and of an optional custom serializer captures these settings at begin and may use workers. Built-in SQLite frame encoding stays on the driving thread. Report extraction reads the live runtime settings, so set threading before begin and leave it unchanged until destroy. Serializer writes and report acquisition are serialized. On ovstage, face and outline preparation can use workers on immutable captured inputs. Every started worker drains before prepared buffers are published, or released after a failure or cancellation. Report release and SQLite frame encoding stay on the driving thread. last_modified_by uses the user name captured once at begin, refreshed for each new operation. No fetch work runs between calls.

Reservation: the operation reserves its runtime and built-in destination until it is destroyed, also after completion or failure. In that time, runtime destruction, reset and settings changes are rejected, as are destination writes, reopen, save-as, close and destruction. A custom destination must enforce its own lifetime and connection stability. Serialize access to these handles; the reservation does not make concurrent API calls safe.

States: existing overlap identifiers and annotations are kept. With resolve_stale nonzero, re-detected normal and duplicate overlaps become ACTIVE, except an APPROVED clash whose detected contents are exactly unchanged. Built-in data handles supply the comparison reader automatically. A custom serializer without a reader conservatively sets re-detected clashes to ACTIVE. The comparison covers type, tolerance, depth epsilon, object paths and mesh checksums, aggregate results, and the complete ordered frame contents (times, matrices, metrics and geometry). Floating-point equality uses no epsilon and ignores the denormal controls of the caller. Signed zeros compare equal, while NaN never proves unchanged contents. Stored overlap and frame row identifiers, review fields, timestamps and user penetration-depth annotations are excluded. The query and the ordered pair hash establish result identity; a matching overlap hash alone does not prove unchanged contents. With resolve_stale zero, stored states are kept. New overlaps start NEW and are not promoted during their first fetch. Absent results are marked not present in either mode, and become RESOLVED when resolve_stale is nonzero.

Transactions: after capture, the reconciliation of absent results can span several next calls, and its changes stay pending until the final commit. Destroying an unfinished operation performs no further reconciliation. It keeps completed writes and earlier reconciliation changes, unless the cleanup of an incomplete overlap fails and requires a full rollback. Fetch-and-save is not all-or-nothing; ovclash_suite_runtime_fetch_and_save_next describes the rollback rules. The storage transaction belongs to the data handle, so completion or a full rollback also affects unrelated writes already pending on that handle. An initialization failure does not roll back those earlier writes.

Parameters:
  • runtime – Runtime with completed results. Must not be null or have an active async pipeline.

  • data – Live built-in destination when serializer is null; otherwise must be null.

  • serializer – Optional custom serializer. Null selects the data handle’s storage backend.

  • query_id – Identifier of the owning stored query.

  • tolerance – Tolerance recorded on normal overlaps; must be finite.

  • depth_epsilon – Depth epsilon recorded on normal overlaps; must be finite.

  • include_duplicates – Nonzero to persist duplicate results. Pass the setting of the owning query; it does not depend on runtime settings changed after detection.

  • resolve_stale – Nonzero to resolve absent clashes and set re-detected normal and duplicate overlaps to ACTIVE, preserving APPROVED only when detected contents are exactly unchanged. Zero preserves stored states.

  • out_fetch – Receives an owned operation; cleared on failure. Must not be null.

Returns:

Success after initialization, or error for invalid arguments or destination reads. Error text is available through ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_begin_with_reader(
ovclash_suite_runtime_t *runtime,
ovclash_suite_data_t *data,
const ovclash_suite_fetch_serializer_t *serializer,
const ovclash_suite_fetch_saved_data_reader_t *reader,
int64_t query_id,
double tolerance,
double depth_epsilon,
uint32_t include_duplicates,
uint32_t resolve_stale,
ovclash_suite_fetch_and_save_t **out_fetch,
)#

Begins fetching with an optional saved-data reader for a custom serializer.

Follows the lifetime, transaction and state rules of fetch_and_save_begin. A reader enables the exact comparison of approved overlaps before replacement. Built-in data supplies its own reader, so pass a null reader with a built-in destination. With resolve_stale nonzero and no custom reader, unchanged content cannot be proven, and re-detected approved custom overlaps become ACTIVE. The reader table is copied, and both callbacks are required when it is supplied. Its user_data and saved destination must outlive the operation. The reader runs on the driving thread and must return the complete detected header and the ordered saved frame payload. Its optional close callback releases saved-reader resources on that same thread, also when an unfinished operation is destroyed. Drive and destroy synchronous fetching on a thread that suits the custom reader resources. A failed close may be retried during cleanup. See ovclash_suite_fetch_saved_data_reader_t for the lifetimes of callback outputs.

Parameters:
  • runtime – Runtime with completed results. Must not be null or have an active async pipeline.

  • data – Live built-in destination when serializer is null; otherwise must be null.

  • serializer – Optional custom serializer. Null selects the data handle’s storage backend.

  • reader – Optional custom saved-data reader. Must be null with a built-in data handle.

  • query_id – Identifier of the owning stored query.

  • tolerance – Tolerance recorded on normal overlaps; must be finite.

  • depth_epsilon – Depth epsilon recorded on normal overlaps; must be finite.

  • include_duplicates – Nonzero to persist the owning query’s duplicate results.

  • resolve_stale – Nonzero to update states, retaining APPROVED only for exactly unchanged detected contents. Zero preserves stored states.

  • out_fetch – Receives an owned operation; cleared on failure. Must not be null.

Returns:

Success after initialization, or error for invalid arguments or destination reads. Error text is available through ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_next(
ovclash_suite_fetch_and_save_t *fetch,
double *out_progress,
uint32_t *out_complete,
)#

Fetches, serializes and saves the next part of the work.

Each call attempts at most 1024 runtime frame reports, across approval comparison and capture, and advances at most 1024 overlaps. It also stops when the acquired runtime report payload reaches 8 MiB; one indivisible report may exceed that threshold. A long overlap resumes on a later call, with its savepoint kept open. Reconciliation scans at most 1024 stored identifiers per call. These are work bounds, not wall-clock guarantees; begin enumerates all existing identifiers. No borrowed report or active preparation task survives a return; serializer scratch allocations may be reused. Serialize access to the operation, runtime and destination; reentrant next and destroy calls are rejected.

Failure and transaction behavior, identical in single-threaded and parallel modes:

  • A serializer callback that reports failure during saved-result reads, writes, reconciliation or transaction handling requests a ROLLBACK of the entire pending transaction. That includes the batches of earlier calls and any other uncommitted writes on the destination. Data committed earlier is kept.

  • Extraction, frame preparation, scheduling or other native processing failures keep the pending overlaps completed earlier. ABORT_OVERLAP restores an incomplete streamed overlap. When that cleanup reports failure, the engine requests a full ROLLBACK instead.

  • Completion reconciles absent overlaps and calls the idempotent BEGIN before COMMIT, even for empty results, which publishes other pending writes too. Stopping between calls leaves completed writes pending. Destroying the operation restores an unfinished overlap. It keeps completed writes, unless ABORT_OVERLAP fails and cleanup must fall back to a full ROLLBACK.

Custom serializers must implement these transaction callbacks; the engine cannot guarantee recovery when their rollback fails. Closing or destroying built-in data attempts to commit the remaining pending writes. Cleanup after an extraction or preparation failure, or after abandonment, can therefore persist partial results.

A failed operation must be destroyed; it cannot be resumed.

Parameters:
  • fetch – Operation returned by ovclash_suite_runtime_fetch_and_save_begin. Must not be null.

  • out_progress – Receives monotone progress in [0,1]. Must not be null.

  • out_complete – Receives 1 after reconciliation and commit, otherwise 0. Must not be null.

Returns:

Success after advancing, or error for invalid arguments, extraction, encoding or storage failures. Error text is available through ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_get_counts(
ovclash_suite_fetch_and_save_t *fetch,
uint64_t *out_written,
uint64_t *out_total,
)#

Reads the exact counts of this operation, before its first step or after a successful step.

The counts include normal overlap groups and the duplicates selected at begin, not frames or destination rows that existed before. An incomplete streamed overlap does not count as written. Written results stay pending until next reports completion after reconciliation and commit, so written == total alone does not imply a commit. A later failure may roll pending writes back. The call performs no work. Serialize access as for next. Failed or executing operations are rejected.

Parameters:
  • fetch – Live operation returned by begin. Must not be null, failed or executing callbacks.

  • out_written – Receives the number of fully written result groups. Must not be null.

  • out_total – Receives the number of result groups selected at begin. Must not be null.

Returns:

Success with both counts, or error for invalid arguments or operation state. Error text is available through ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_destroy(
ovclash_suite_fetch_and_save_t *fetch,
)#

Destroys an operation and releases its reservation of the runtime and destination.

Null is accepted. An unfinished overlap is aborted. Completed writes stay pending, unless the abort fails and requires a full rollback. Destroy the operation before its runtime or destination. Unlike this destructor, closing or destroying built-in data attempts to commit pending writes, including results kept after a fetch failure. A cleanup failure returns an error and still consumes the operation, so do not retry the destruction. A failed overlap abort is reported even when the fallback rollback succeeds. The one exception is a rejected reentrant destroy from a running callback, which leaves the operation alive.

Parameters:

fetch – Operation to consume. May be null. Destroy after success, failure or abandonment.

Returns:

Success after release, or error for cleanup failure or rejected reentrant destruction. Read ovclash_suite_get_thread_last_error for the diagnostic.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_async(
ovclash_suite_runtime_t *runtime,
ovclash_suite_data_t *data,
const ovclash_suite_fetch_serializer_t *serializer,
int64_t query_id,
double tolerance,
double depth_epsilon,
uint32_t include_duplicates,
uint32_t resolve_stale,
ovclash_suite_fetch_async_t **out_async,
)#

Starts fetch and save on one background worker, including serializer initialization and cleanup.

This is the asynchronous equivalent of the bounded fetch-and-save API. Serializer writes stay sequential; eligible frame preparation may use the existing parallel scheduler of the runtime. The runtime and the built-in destination are leased exclusively until the returned handle is destroyed, also after finish or cancel. Calls from other threads cannot access the state of either owner, and the caller receives the rejection diagnostics. Native driver callbacks keep the read access that capture needs; preparation workers do not inherit it. Owner mutations still reject the lease. Finish or destroy the detection pipeline handle before launching this operation.

A custom serializer callback table is copied, but its user_data and the objects it references must stay alive until destruction. Callbacks run on the background worker, and eligible preparation callbacks can run on scheduler workers. Choosing this API opts those callbacks into background execution. The synchronous bounded API keeps running callbacks on the calling thread.

Parameters:
  • runtime – Runtime containing completed detection results. Must not be null.

  • data – Built-in destination, or null when a custom serializer is supplied.

  • serializer – Optional custom serializer callbacks. The built-in destination is used when null.

  • query_id – Identifier of the owning stored query.

  • tolerance – Tolerance recorded on normal overlaps; must be finite.

  • depth_epsilon – Depth epsilon recorded on normal overlaps; must be finite.

  • include_duplicates – Non-zero to persist duplicate results too.

  • resolve_stale – Non-zero to reconcile stale overlap records after successful fetching.

  • out_async – Receives the owned operation handle, or null on launch failure. Must not be null.

Returns:

SUCCESS when launched; ERROR for invalid arguments, busy owners, live destination cursors, or launch failure. Worker failures are reported by finish and the operation error accessor.

ovclash_suite_result_t ovclash_suite_runtime_fetch_and_save_async_with_reader(
ovclash_suite_runtime_t *runtime,
ovclash_suite_data_t *data,
const ovclash_suite_fetch_serializer_t *serializer,
const ovclash_suite_fetch_saved_data_reader_t *reader,
int64_t query_id,
double tolerance,
double depth_epsilon,
uint32_t include_duplicates,
uint32_t resolve_stale,
ovclash_suite_fetch_async_t **out_async,
)#

Starts background fetch and save with a custom saved-history reader.

The ownership, synchronization and cleanup contracts of ovclash_suite_runtime_fetch_and_save_async also apply here. A non-null reader requires a custom serializer and both read callbacks. Its table is copied before launch; user_data and the objects it references must stay alive until the async handle is destroyed. Saved-history reads run sequentially on the background worker before an overlap is replaced. The optional saved-reader close also runs on that worker, before the terminal outcome is published, also on cancellation and destruction. A close failure is reported without replacing an earlier processing diagnostic. A custom reader that keeps failing owns its remaining resources. With resolve_stale enabled, exactly unchanged APPROVED clashes keep their state, changed detected clashes become ACTIVE, and absent clashes become RESOLVED. With resolve_stale disabled, stored states are kept and saved-history reads are skipped.

Parameters:
  • runtime – Runtime containing completed detection results. Must not be null.

  • data – Built-in destination, or null when a custom serializer is supplied.

  • serializer – Optional custom serializer callbacks.

  • reader – Optional custom saved-history callbacks; null retains the reader-less behavior.

  • query_id – Identifier of the owning stored query.

  • tolerance – Tolerance recorded on normal overlaps; must be finite.

  • depth_epsilon – Depth epsilon recorded on normal overlaps; must be finite.

  • include_duplicates – Nonzero to persist duplicate results too.

  • resolve_stale – Nonzero to reconcile clash states after successful fetching.

  • out_async – Receives the owned handle, or null on launch failure. Must not be null.

Returns:

SUCCESS when launched; ERROR for invalid arguments, busy owners, live destination cursors, or launch failure. Worker failures are reported by finish and the operation error accessor.

ovclash_suite_result_t ovclash_suite_fetch_async_is_running(
ovclash_suite_fetch_async_t *async,
uint32_t *out_running,
)#

Reads a synchronized running snapshot.

Zero means that the worker and its cleanup have completed. Polling may overlap one finish or cancel call. Serialize control calls with each other; destruction must not overlap any call on the handle. The handle stays valid until it is explicitly destroyed.

Parameters:
  • async – Owned async fetch handle. Must not be null.

  • out_running – Receives non-zero while the worker runs. Must not be null.

Returns:

SUCCESS for a valid snapshot, or ERROR for invalid arguments.

ovclash_suite_result_t ovclash_suite_fetch_async_get_step_data(
ovclash_suite_fetch_async_t *async,
ovclash_suite_step_data_t *out_step_data,
)#

Reads a synchronized progress snapshot.

name is static storage. step_index names one of three phases: initialization, fetching, and reconciliation and commit; nb_steps is always 3. progress is the progress of the whole operation in [0, 1], independent of the phase index; only a successful committed completion reaches 1. finished is non-zero exactly when ovclash_suite_fetch_async_is_running would report zero: after success, failure or cancellation in any phase. step_index then still names the phase in which the operation stopped. Polling may overlap one finish or cancel call; destruction must not overlap any call on the handle.

Parameters:
  • async – Owned async fetch handle. Must not be null.

  • out_step_data – Receives the snapshot, including finished state. Must not be null.

Returns:

SUCCESS for a valid snapshot, or ERROR for invalid arguments.

ovclash_suite_result_t ovclash_suite_fetch_async_get_counts(
ovclash_suite_fetch_async_t *async,
uint64_t *out_written,
uint64_t *out_total,
uint32_t *out_initialized,
)#

Reads the synchronized written and total counters.

out_initialized is zero until initialization succeeds. An initialized total of zero denotes an empty result set. Output pointers must not be null. Polling may overlap one finish or cancel call; destruction must not overlap any call on the handle.

Parameters:
  • async – Owned async fetch handle. Must not be null.

  • out_written – Receives completed overlap and duplicate records.

  • out_total – Receives the total overlap and duplicate record count.

  • out_initialized – Receives non-zero once initialization succeeds.

Returns:

SUCCESS for a valid snapshot, or ERROR for invalid arguments.

ovclash_suite_result_t ovclash_suite_fetch_async_get_last_error(
ovclash_suite_fetch_async_t *async,
ovclash_suite_string_t *out_error,
)#

Reads the diagnostic of the operation.

The string storage stays valid until the handle is destroyed. Polling may overlap one finish or cancel call; destruction must not overlap any call on the handle.

Parameters:
  • async – Owned async fetch handle. Must not be null.

  • out_error – Receives an empty string while running, or the terminal diagnostic. Must not be null.

Returns:

SUCCESS for a valid snapshot, or ERROR for invalid arguments.

ovclash_suite_result_t ovclash_suite_fetch_async_finish(
ovclash_suite_fetch_async_t *async,
)#

Waits for the worker to complete and returns its outcome.

Failures are published on the calling thread. Repeated calls return the same outcome. The owner lease stays held until the handle is destroyed.

Parameters:

async – Owned async fetch handle. Must not be null; worker callback reentry is rejected.

Returns:

SUCCESS after committed completion; ERROR after cancellation, processing/cleanup failure, or invalid/reentrant use. Read the operation error accessor for terminal failure detail.

ovclash_suite_result_t ovclash_suite_fetch_async_cancel(
ovclash_suite_fetch_async_t *async,
)#

Requests cooperative cancellation and waits for cleanup.

Completed overlap records keep the partial-write semantics of the bounded API; an incomplete current overlap is aborted. A successful cancellation cleanup returns success, and a later finish reports the cancellation outcome. A cleanup failure returns an error. A call after completion is harmless.

Parameters:

async – Owned async fetch handle. Must not be null; worker callback reentry is rejected.

Returns:

SUCCESS after clean cancellation or successful completion; ERROR for processing/cleanup failure or invalid/reentrant use. Read the operation error accessor for failure detail.

ovclash_suite_result_t ovclash_suite_fetch_async_destroy(
ovclash_suite_fetch_async_t *async,
)#

Cancels and drains unfinished work, releases both owner leases, and consumes the handle.

The handle is consumed even when processing or cleanup failed. Destruction from the worker callbacks of the operation is rejected and leaves the handle alive, because those callbacks cannot join themselves. A failed wait also keeps ownership. Null is harmless. A foreign-language caller that can be interrupted while it handles the return can use ovclash_suite_fetch_async_destroy_owned to observe the consumption.

Parameters:

async – Owned async fetch handle to consume, or null.

Returns:

SUCCESS after clean cancellation/completion or for null; ERROR for processing/cleanup failure or reentrant use. When a consumed handle failed, the detail is published to the thread-local last error of the caller.

ovclash_suite_result_t ovclash_suite_fetch_async_destroy_owned(
ovclash_suite_fetch_async_t **async,
)#

Cancels and drains an owned handle, and publishes the consumption through the caller-owned pointer.

Once draining succeeds and destruction is accepted, sets *async to null before it releases the handle or publishes its terminal diagnostic, also when processing or cleanup failed. A rejected callback reentry or a failed wait leaves *async unchanged for a later retry. A pointer to a null handle succeeds. Serialize access to the pointer and the handle; destruction must not overlap another call on that handle.

Parameters:

async – Caller-owned handle pointer to consume. Must not be null; *async may be null.

Returns:

SUCCESS after clean cancellation/completion or for a null handle; ERROR for invalid arguments, processing/cleanup failure, a failed wait, or reentrant use. Read *async to distinguish accepted consumption from rejection before retrying destruction.

ovclash_suite_result_t ovclash_suite_format_int128_hex(
uint64_t hi,
uint64_t lo,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Formats a 128-bit integer as the hexadecimal string used by clash identifiers.

The text is 0x followed by lowercase hexadecimal digits without leading zeros, for example 0x0 for zero. The locale does not affect it.

Parameters:
  • hi – High 64 bits of the integer.

  • lo – Low 64 bits of the integer.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when a buffer is supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_html_escape(
ovclash_suite_string_t text,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Escapes text for HTML output using the suite export escaping rules.

Replaces the ampersand, less-than, greater-than, double-quote and apostrophe characters with HTML character references; every other byte is copied unchanged.

Parameters:
  • text – Length-prefixed text to escape.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when a buffer is supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_current_timestamp(
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Returns the current timestamp using the suite storage timestamp format.

The text is the local time as YYYY-MM-DD HH:MM:SS.ffffff, with microseconds.

Parameters:
  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when a buffer is supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_current_user_name(
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Returns the current user name used for clash metadata.

Resolved from LOGNAME, USER, LNAME and USERNAME, then from the OS account: the password database entry of the real user ID on POSIX, GetUserNameW on Windows. A value that is not valid UTF-8 is skipped. The name is empty when no value qualifies.

Parameters:
  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when a buffer is supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_file_exists(
ovclash_suite_string_t path,
uint32_t *out_exists,
)#

Checks whether path names a regular file, following symbolic links (os.path.isfile parity).

Parameters:
  • path – Length-prefixed filesystem path to test.

  • out_exists – Receives 1 for a regular file, 0 for an empty or missing path, a directory, another file type, or a path containing an embedded NUL character. Must not be null.

ovclash_suite_result_t ovclash_suite_copy_file(
ovclash_suite_string_t source_path,
ovclash_suite_string_t target_path,
uint32_t follow_symlinks,
uint32_t *out_copied,
)#

Copies a regular file, or recreates a symbolic link, with shutil.copy semantics.

When target_path names an existing directory, the copy is written into it under the file name of the source. An existing target file is overwritten. The permission bits of the source are then applied to the target. With follow_symlinks zero and a symbolic-link source, the link itself is recreated at the target, which fails when the target already exists. Copy failures are reported through out_copied, not through the result code.

Parameters:
  • source_path – Length-prefixed source filesystem path.

  • target_path – Length-prefixed target filesystem path.

  • follow_symlinks – Non-zero to copy the linked target when source_path is a symbolic link.

  • out_copied – Receives 1 when the copy and the permission-bit copy both succeeded, otherwise 0: for an empty path, a missing or directory source, a failed copy, or a failed permission copy, which leaves the target already written. Must not be null.

Returns:

Failure when out_copied is null or a path is an invalid span, is not valid UTF-8 or contains an embedded NUL character; nothing is copied then.

ovclash_suite_result_t ovclash_suite_delete_file(
ovclash_suite_string_t path,
uint32_t *out_deleted,
)#

Deletes a non-directory filesystem entry without following symbolic links, with os.remove semantics: a symbolic link is removed, never its target.

Parameters:
  • path – Length-prefixed filesystem path to delete.

  • out_deleted – Receives 1 when an entry was removed, otherwise 0: for an empty or missing path, a directory, or a failed removal. Must not be null.

Returns:

Failure when out_deleted is null or path is an invalid span, is not valid UTF-8 or contains an embedded NUL character; nothing is deleted then.

ovclash_suite_result_t ovclash_suite_probe_legacy_clash_detection_file(
ovclash_suite_string_t file_path,
uint32_t *out_is_legacy_container,
uint32_t *out_has_sqlite_payload,
)#

Probes whether a file is a legacy .clashDetection container.

The legacy container format starts with a 16-byte clashDetection header, followed by a SQLite database payload. This function only probes the format; it neither opens the SQLite database nor migrates schemas.

Parameters:
  • file_path – Length-prefixed filesystem path to inspect. ptr may be null only when length is zero.

  • out_is_legacy_container – Receives 1 when the file starts with the legacy clashDetection magic, otherwise 0. Must not be null.

  • out_has_sqlite_payload – Receives 1 when the file is a legacy container and the embedded payload starts with a SQLite database header, otherwise 0. Must not be null.

Returns:

Success when the probe completed. Missing files, empty paths, short files and non-legacy files are reported through zero output values. Failure is reserved for invalid arguments, an invalid string span, invalid UTF-8, a path containing an embedded NUL character, or a caught exception.

ovclash_suite_result_t ovclash_suite_export_rows_json(
const ovclash_suite_export_column_t *columns,
size_t column_count,
const ovclash_suite_string_t *row_values,
size_t row_value_count,
size_t row_count,
const ovclash_suite_export_info_t *additional_info,
size_t additional_info_count,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Exports tabular rows to JSON.

Error behavior: fails when an input pointer and count pair is inconsistent, when an input string span has a null ptr with a non-zero length, or when a column name, row value or additional-info name or value is not valid UTF-8. It also fails when a column order is out of range for column_count, when row_value_count cannot cover row_count * column_count without overflow, or when a non-null out_buffer is too small. A null out_buffer with size zero remains the supported size query and succeeds when the export inputs are valid.

Parameters:
  • columns – Column definitions, emitted in array order; each entry’s order selects its cell within a row. May be null when column_count is zero.

  • column_count – Number of entries in columns.

  • row_values – Flattened row-major cell values. May be null only when row_value_count is zero.

  • row_value_count – Number of entries in row_values. Must be at least row_count * column_count.

  • row_count – Number of rows represented by row_values.

  • additional_info – Optional name/value metadata entries. May be null when additional_info_count is zero.

  • additional_info_count – Number of entries in additional_info.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when a buffer is supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_export_rows_html(
ovclash_suite_string_t title,
ovclash_suite_string_t subtitle,
const ovclash_suite_export_column_t *columns,
size_t column_count,
const ovclash_suite_string_t *row_values,
size_t row_value_count,
size_t row_count,
const ovclash_suite_export_info_t *additional_info,
size_t additional_info_count,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Exports tabular rows to HTML.

Error behavior: fails when an input pointer and count pair is inconsistent, when an input string span has a null ptr with a non-zero length, or when the title, the subtitle, a column name, a row value or an additional-info name or value is not valid UTF-8. It also fails when a column order is out of range for column_count, when row_value_count cannot cover row_count * column_count without overflow, or when a non-null out_buffer is too small. A null out_buffer with size zero remains the supported size query and succeeds when the export inputs are valid.

Parameters:
  • title – Length-prefixed document title.

  • subtitle – Length-prefixed document subtitle.

  • columns – Column definitions, emitted in array order; each entry’s order selects its cell within a row. May be null when column_count is zero.

  • column_count – Number of entries in columns.

  • row_values – Flattened row-major cell values. May be null only when row_value_count is zero.

  • row_value_count – Number of entries in row_values. Must be at least row_count * column_count.

  • row_count – Number of rows represented by row_values.

  • additional_info – Optional name/value metadata entries. May be null when additional_info_count is zero.

  • additional_info_count – Number of entries in additional_info.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when a buffer is supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_export_rows_json_text(
const ovclash_suite_export_column_t *columns,
size_t column_count,
const ovclash_suite_string_t *row_values,
size_t row_value_count,
size_t row_count,
const ovclash_suite_export_info_t *additional_info,
size_t additional_info_count,
ovclash_suite_export_text_t **out_text,
)#

Exports tabular rows to JSON and returns an owned immutable text handle.

Error behavior: identical to ovclash_suite_export_rows_json, except no caller buffer is used.

Parameters:
  • columns – Column definitions, emitted in array order; each entry’s order selects its cell within a row. May be null when column_count is zero.

  • column_count – Number of entries in columns.

  • row_values – Flattened row-major cell values. May be null only when row_value_count is zero.

  • row_value_count – Number of entries in row_values. Must be at least row_count * column_count.

  • row_count – Number of rows represented by row_values.

  • additional_info – Optional name/value metadata entries. May be null when additional_info_count is zero.

  • additional_info_count – Number of entries in additional_info.

  • out_text – Receives an owned export text handle. Must not be null and must be destroyed with ovclash_suite_export_text_destroy.

ovclash_suite_result_t ovclash_suite_export_rows_html_text(
ovclash_suite_string_t title,
ovclash_suite_string_t subtitle,
const ovclash_suite_export_column_t *columns,
size_t column_count,
const ovclash_suite_string_t *row_values,
size_t row_value_count,
size_t row_count,
const ovclash_suite_export_info_t *additional_info,
size_t additional_info_count,
ovclash_suite_export_text_t **out_text,
)#

Exports tabular rows to HTML and returns an owned immutable text handle.

Error behavior: identical to ovclash_suite_export_rows_html, except no caller buffer is used.

Parameters:
  • title – Length-prefixed document title.

  • subtitle – Length-prefixed document subtitle.

  • columns – Column definitions, emitted in array order; each entry’s order selects its cell within a row. May be null when column_count is zero.

  • column_count – Number of entries in columns.

  • row_values – Flattened row-major cell values. May be null only when row_value_count is zero.

  • row_value_count – Number of entries in row_values. Must be at least row_count * column_count.

  • row_count – Number of rows represented by row_values.

  • additional_info – Optional name/value metadata entries. May be null when additional_info_count is zero.

  • additional_info_count – Number of entries in additional_info.

  • out_text – Receives an owned export text handle. Must not be null and must be destroyed with ovclash_suite_export_text_destroy.

ovclash_suite_result_t ovclash_suite_export_text_get_view(
const ovclash_suite_export_text_t *text,
ovclash_suite_string_t *out_text,
)#

Returns a borrowed UTF-8 view of an owned export text handle.

Parameters:
  • text – Export text handle returned by an *_text export function. Must not be null.

  • out_text – Receives a borrowed byte span valid until text is destroyed. Must not be null.

ovclash_suite_result_t ovclash_suite_export_text_destroy(
ovclash_suite_export_text_t *text,
)#

Destroys an owned export text handle.

Parameters:

text – Export text handle returned by an *_text export function. May be null.

Data Serialization API

Per-function error catalogue for the data API: each data function returning ovclash_suite_result_t returns OVCLASH_SUITE_STATUS_SUCCESS when the requested query, mutation, migration or serialization step completed and the documented outputs are initialized.

It returns OVCLASH_SUITE_STATUS_ERROR when:

  • the data handle is invalid, an output pointer is null, or a required store is not open;

  • a string span is invalid or not UTF-8;

  • a counted array or nested frame buffer is null with a non-zero count;

  • a row, index or identifier is out of range;

  • schema compatibility or migration fails, or a legacy .clashDetection container cannot be extracted or written;

  • SQLite reports an error, or a filesystem operation fails;

  • an allocation fails, or a C++ exception is caught.

The handle-local ovclash_suite_data_get_last_error(data) and the thread-local ovclash_suite_get_thread_last_error carry the concrete reason.

Scalar overlap and frame values stored in SQLite REAL columns reject NaN with OVCLASH_SUITE_STATUS_ERROR, rather than storing NULL and reading it back as zero. Infinities and finite values are supported. SQLite REAL does not preserve the sign of zero. Frame matrices still require finite values. Numeric BLOB arrays keep their bit-exact storage. Directory JSON records encode NaN and the infinities as the string tags “NaN”, “+Infinity” and “-Infinity”, default-time NaN values included, and keep the sign of a finite zero. Matrices require finite values on both backends.

Transactions: the storage transaction belongs to the data handle. Writes made with commit = 0 stay pending until ovclash_suite_data_commit, a later call with commit != 0, or close, which commits them. A mutation that fails after its storage write began rolls back the whole pending transaction, including earlier uncommitted writes that returned success; committed data is kept. Such failures include the value checks that the store makes while writing: a NaN REAL value on a SQLite store, a non-finite frame matrix on either store and, on a directory store, a record string containing NUL. They also include constraint, SQLite and filesystem errors, and a failed commit. Argument, open-state, fetch-reservation and not-found failures are reported before the write begins and leave pending writes untouched. When earlier batched writes must survive, validate the inputs, or commit, before a write that may fail.

Threading: callers serialize all access to a shared data handle. Independent data handles may be used concurrently, subject to SQLite and filesystem locking on the same database path. A directory root permits one open handle at a time; opening the same root elsewhere fails until the owning handle closes. For a deferred directory that does not exist yet, ownership begins at the first write. A live fetch reserves its destination until it is destroyed, and rejects public mutations. An asynchronous fetch also rejects reads of a built-in destination from every thread but its worker. Live overlap and frame cursors, even exhausted or empty ones, prevent open, save, save-as, migrate, close and destroy. Destroy dependent operations and cursors before changing the store lifecycle.

Ownership: the query, overlap, frame and point-cloud-settings getters that are not cursors borrow the per-kind scratch record of the data handle. Copy a view before another getter of the same kind, any mutation of the data handle, close or destroy. A cursor view belongs to its cursor instead and lasts until the next advance or the destruction of that cursor. Insert, update and replace functions copy all supplied views during the call.

Example:

ovclash_suite_data_t* data = 0;
if (ovclash_suite_data_create(&data).status == OVCLASH_SUITE_STATUS_SUCCESS) {
    ovclash_suite_data_open(data, (ovclash_suite_string_t){ "scene.ovclashdb", 15 });
    uint32_t query_count = 0;
    ovclash_suite_data_get_query_count(data, &query_count);
    ovclash_suite_data_destroy(data);
}

ovclash_suite_result_t ovclash_suite_data_create(
ovclash_suite_data_t **out_data,
)#

Creates a suite data/serialization handle backed by SQLite.

Parameters:

out_data – Receives the created data handle. Must not be null and must be destroyed with ovclash_suite_data_destroy.

Returns:

Success when the handle is allocated. Failure when out_data is null, allocation fails, or an exception is caught.

ovclash_suite_result_t ovclash_suite_data_create_directory(
ovclash_suite_data_t **out_data,
)#

Creates a Suite data handle backed by a human-readable directory of JSON records.

All data, cursor and runtime-save functions accept this handle. Open supplies the root directory path; file name extensions have no special meaning for this backend. Each query, point-cloud setting, overlap header and frame is stored separately. Existing SQLite stores keep using ovclash_suite_data_create. A record string containing an embedded NUL is rejected on write; an escaped NUL inside opaque query settings JSON is still supported. Symbolic links are rejected in the normalized absolute root path and its ancestors, in record paths and in reserved internal paths, also for save-as destinations. Callers may resolve trusted aliases explicitly before supplying a path. Windows directory junctions and volume mount points count as symbolic links, so a volume mounted only into a folder needs a drive letter to hold a store. Unnamed stores also require a system temporary-directory path without symbolic-link components.

Parameters:

out_data – Receives the allocated handle. Must not be null; destroy it with ovclash_suite_data_destroy after releasing its cursors and fetch operations.

Returns:

Success when the handle is allocated; failure for a null output or allocation failure.

ovclash_suite_result_t ovclash_suite_data_destroy(
ovclash_suite_data_t *data,
)#

Destroys a Suite data and serialization handle.

Attempts to commit pending writes before it closes and releases the handle. This is not a rollback operation: partial results kept after a failed or abandoned fetch can be saved. Destroy any fetch operations and cursors first. A failed commit requests a rollback and returns failure without freeing the data handle, so the caller can inspect it and clean up or retry.

Parameters:

data – Suite data handle created by either data factory. May be null.

Returns:

Success when the handle is released or data is null. Failure if a dependent operation/cursor is alive, commit/close fails, or cleanup throws. On failure the data handle remains owned by the caller; inspect its error and retry cleanup.

ovclash_suite_string_t ovclash_suite_data_get_last_error(
const ovclash_suite_data_t *data,
)#

Returns the last error message recorded on a data handle.

While an async fetch owner is alive, returns the thread-local access-rejection diagnostic of the caller without reading store state. ovclash_suite_fetch_async_get_last_error returns the diagnostic of the operation. Destroy that owner before querying store state.

Parameters:

data – Data handle to query. May be null. A null handle, or one with no recorded error, falls back to the thread-local last error; the view is empty only when that is empty too.

ovclash_suite_result_t ovclash_suite_data_get_file_path(
const ovclash_suite_data_t *data,
ovclash_suite_string_t *out_file_path,
)#

Returns the stored data path, a SQLite file or a directory root.

The path can stay set after close or a failed open; ovclash_suite_data_is_open reports the state. Unnamed stores return an empty path.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_file_path – Receives a string view owned by the data handle, valid until the stored path changes or the handle is destroyed. Must not be null.

Returns:

Success when out_file_path is initialized. Failure follows the data API catalogue.

ovclash_suite_result_t ovclash_suite_data_get_file_size(
const ovclash_suite_data_t *data,
uint64_t *out_file_size,
)#

Returns the on-disk size of an open, named store.

SQLite reports the size of its database file. Directory stores sum the regular files under the root, including internal files and unrelated exports. Unnamed stores fail.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_file_size – Receives the size in bytes. Must not be null.

Returns:

Success when the size is known. Failure when no named store is open, the filesystem query fails, or the data API catalogue applies.

ovclash_suite_result_t ovclash_suite_data_structures_compatible(
const ovclash_suite_data_t *data,
uint32_t *out_compatible,
)#

Checks whether the opened data structures match the supported schema versions.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_compatible – Receives 1 when the opened structures are compatible, otherwise 0. Must not be null.

Returns:

Success when compatibility state is reported. Failure follows the data API catalogue.

ovclash_suite_result_t ovclash_suite_data_migration_to_latest_possible(
const ovclash_suite_data_t *data,
uint32_t *out_possible,
)#

Checks whether the opened data structures can be migrated to the latest supported schema.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_possible – Receives 1 when migration is possible, otherwise 0. Must not be null.

Returns:

Success when migration-possible state is reported. Failure follows the data API catalogue.

ovclash_suite_result_t ovclash_suite_data_deferred_file_creation_until_first_write_op(
const ovclash_suite_data_t *data,
uint32_t *out_deferred,
)#

Queries whether file creation is deferred until the first write operation.

A new data handle defers creation (1).

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_deferred – Receives 1 when creation is deferred, otherwise 0. Must not be null.

Returns:

Success when the flag is reported. Failure follows the data API catalogue.

ovclash_suite_result_t ovclash_suite_data_set_deferred_file_creation_until_first_write_op(
ovclash_suite_data_t *data,
uint32_t value,
)#

Sets whether file creation is deferred until the first write operation.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • value – Non-zero to defer file creation until first write, otherwise zero.

Returns:

Success when the flag is updated. Failure follows the data API catalogue.

ovclash_suite_result_t ovclash_suite_data_open(
ovclash_suite_data_t *data,
ovclash_suite_string_t file_path,
)#

Opens or creates a suite data store.

A SQLite handle treats a path ending in .clashDetection, or a file with a valid legacy clashDetection header, as a legacy read container. It extracts the embedded SQLite payload to a temporary .ovclashdb file and opens that through the normal SQLite backend. Open and commit leave the original .clashDetection file unchanged. To write the legacy container format, pass a .clashDetection target to ovclash_suite_data_save or ovclash_suite_data_save_as. After a failed open of a .clashDetection path, a write fails rather than create a plain SQLite database under the container name. A directory handle opens a directory of individual JSON records, and suffixes such as .clashDetection have no special meaning for it. Neither backend converts the format of the other.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • file_path – Length-prefixed data file path. ptr may be null only when length is zero.

Returns:

Success when the store is opened or deferred creation is active. Failure when arguments are invalid, the path string span is invalid, non-UTF-8 or contains an embedded NUL character (rejected before the current store is touched), a SQLite handle’s path names a directory, the legacy header is corrupt/unsupported, SQLite cannot be loaded/opened, or the schema is incompatible. Incompatible schema failures leave the handle not-open but preserve compatibility and migration-possible flags for callers that want to migrate explicitly.

ovclash_suite_result_t ovclash_suite_data_is_open(
const ovclash_suite_data_t *data,
uint32_t *out_open,
)#

Checks whether the data handle has an open store.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_open – Receives 1 when the data store is open, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_data_save(
ovclash_suite_data_t *data,
ovclash_suite_string_t file_path,
)#

Saves the current data store.

SQLite handles write normal targets as .ovclashdb stores. A target ending in .clashDetection is written in the legacy container format: a 16-byte clashDetection header followed by the SQLite database bytes. Directory handles keep their JSON directory format for every target path. A named target also persists an unnamed SQLite store, including its pending writes, and becomes its current path. A legacy container target exports a snapshot and keeps the current path.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • file_path – Length-prefixed target file path, or an empty string to use the current path. ptr may be null only when length is zero.

Returns:

Success when the current store is saved. Failure when arguments are invalid, the path string span is invalid, non-UTF-8 or contains an embedded NUL character, or a SQLite/IO operation fails.

ovclash_suite_result_t ovclash_suite_data_save_as(
ovclash_suite_data_t *data,
ovclash_suite_string_t file_path,
)#

Saves the current data store to a new path.

SQLite handles create a normal target through a database backup, including committed WAL rows and pending writes. They adopt the destination only after the backup and the source close succeed. Saving to the current file or to an existing hard-link alias keeps the current store identity. A private database extracted from a legacy container may instead move to an unused destination after closing, provided no source WAL and no destination SQLite sidecars remain. A target ending in .clashDetection is written in the legacy container format: a 16-byte clashDetection header followed by the SQLite database bytes. Directory handles keep their JSON directory format for every target path.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • file_path – Length-prefixed target file path. ptr may be null only when length is zero.

Returns:

Success after adopting a database snapshot, preserving the current store identity, moving/reopening a private extraction, or writing the legacy container. Failure when arguments are invalid, no store is open, file_path is empty, the path string span is invalid, non-UTF-8 or contains an embedded NUL character, or a SQLite/IO operation fails.

ovclash_suite_result_t ovclash_suite_data_close(
ovclash_suite_data_t *data,
)#

Closes the current data store.

Attempts to commit pending writes, including partial results kept after a failed or abandoned fetch. This is not a rollback operation. Destroy fetch operations and cursors first. A failed SQLite commit requests a rollback and returns failure. A commit or close failure keeps the data handle and storage backend for cleanup or retry, and never reports a successful close.

Parameters:

data – Suite data handle created by either data factory. May be null.

ovclash_suite_result_t ovclash_suite_data_commit(
ovclash_suite_data_t *data,
)#

Commits pending data-store changes.

Parameters:

data – Suite data handle created by either data factory. Must not be null.

ovclash_suite_result_t ovclash_suite_data_migrate_to_latest(
ovclash_suite_data_t *data,
ovclash_suite_string_t file_path,
)#

Migrates a data store to the latest supported schema when possible.

Migration of a legacy .clashDetection file is non-destructive. The embedded SQLite payload is extracted to a temporary .ovclashdb file, and that temporary database is migrated and opened. ovclash_suite_data_save_as persists it as a sidecar database or as a rewritten legacy container. Directory handles accept an existing directory with the supported format version. They reject unknown versions without converting or creating the store.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • file_path – Length-prefixed data file path to migrate. ptr may be null only when length is zero.

Returns:

Success when the current or supplied database is compatible or migrated. Failure when the arguments are invalid, the path string span is invalid, not UTF-8 or contains an embedded NUL character, neither a supplied nor a current data path is available, the supplied path does not exist, the legacy header is corrupt or unsupported, no schema migration path exists, the database is locked or not writable, or SQLite or IO fails. Migration never creates a missing target path. For a SQLite handle, some failures are rejected before the current store is disturbed: a call with neither a supplied nor a current path, a supplied path that is not a readable regular file, and a SQLite target that this process cannot write. The store then keeps its connection, pending writes, open state and compatibility flags, so an unnamed store keeps its private database. An extracted legacy payload is not discarded either, so the caller can still migrate in place. A legacy container, recognized by its suffix or header, is only read and need not be writable. Other target failures (a corrupt or unmigratable file, a lock, a read-only directory) are found only after the current store is closed. An invalid file-path string span, invalid UTF-8 or an embedded NUL character keeps the earlier open state. After string and path validation succeed, a SQLite migration failure leaves the handle not open. Directory migration validates the destination manifest before it closes the current store; a rejected manifest keeps the open state and the pending writes. A later close or open failure follows the matching lifecycle contract. The last-error text describes the reason.

ovclash_suite_result_t ovclash_suite_data_insert_query(
ovclash_suite_data_t *data,
const ovclash_suite_query_view_t *query,
uint32_t update_identifier,
int64_t *out_identifier,
)#

Inserts a query and commits, like ovclash_suite_data_insert_query_with_commit with commit 1.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query – Query view to insert. String views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • out_identifier – Receives the inserted query identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_insert_query_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_query_view_t *query,
uint32_t update_identifier,
uint32_t commit,
int64_t *out_identifier,
)#

Inserts a query with explicit commit control.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query – Query view to insert. String views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • commit – Non-zero to commit after the insert. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_identifier – Receives the inserted query identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_update_query(
ovclash_suite_data_t *data,
const ovclash_suite_query_view_t *query,
)#

Updates an existing query and commits, like ovclash_suite_data_update_query_with_commit with commit 1.

Fails, before the write begins, when no query has the view’s identifier.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query – Query view containing the identifier and replacement values.

ovclash_suite_result_t ovclash_suite_data_update_query_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_query_view_t *query,
uint32_t commit,
)#

Updates an existing query with explicit commit control.

Fails, before the write begins, when no query has the view’s identifier.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query – Query view containing the identifier and replacement values.

  • commit – Non-zero to commit after the update. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

ovclash_suite_result_t ovclash_suite_data_find_query(
const ovclash_suite_data_t *data,
int64_t identifier,
ovclash_suite_query_view_t *out_query,
)#

Finds a query by identifier.

Fails with an empty last-error text when no record matches, which tells absence apart from an error.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Query identifier to search for.

  • out_query – Receives the found query view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_query_count(
const ovclash_suite_data_t *data,
uint32_t *out_count,
)#

Counts stored queries.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_count – Receives the number of stored queries. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_query_at(
const ovclash_suite_data_t *data,
uint32_t index,
ovclash_suite_query_view_t *out_query,
)#

Reads a query by zero-based storage index.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • index – Zero-based query index.

  • out_query – Receives the query view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_query(
ovclash_suite_data_t *data,
int64_t identifier,
)#

Removes a query with its overlaps and their frame records, and commits, like ovclash_suite_data_remove_query_with_commit with commit 1.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Query identifier to remove.

Returns:

Success when the query was removed. Failure when no query has the identifier, reported before the write begins so pending writes stay untouched, or as the data API catalogue says.

ovclash_suite_result_t ovclash_suite_data_remove_query_with_commit(
ovclash_suite_data_t *data,
int64_t identifier,
uint32_t commit,
)#

Removes a query with its overlaps and their frame records, with explicit commit control.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Query identifier to remove.

  • commit – Non-zero to commit after removal. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

Returns:

Success when the query was removed. Failure when no query has the identifier, reported before the write begins so pending writes stay untouched, or as the data API catalogue says.

ovclash_suite_result_t ovclash_suite_data_insert_overlap(
ovclash_suite_data_t *data,
const ovclash_suite_clash_info_record_view_t *overlap,
uint32_t update_identifier,
int64_t *out_identifier,
)#

Inserts an overlap record and commits, like ovclash_suite_data_insert_overlap_with_commit with commit 1.

The store also creates overlap->frame_count placeholder frame records, replacing any frame records of a reused identifier. A frame_count above 1000000 fails before the write begins.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap – Overlap record view to insert. String and buffer views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • out_identifier – Receives the inserted overlap identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_insert_overlap_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_clash_info_record_view_t *overlap,
uint32_t update_identifier,
uint32_t commit,
int64_t *out_identifier,
)#

Inserts an overlap record with explicit commit control.

The store also creates overlap->frame_count placeholder frame records, replacing any frame records of a reused identifier. A frame_count above 1000000 fails before the write begins.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap – Overlap record view to insert. String and buffer views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • commit – Non-zero to commit after the insert. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_identifier – Receives the inserted overlap identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_update_overlap(
ovclash_suite_data_t *data,
const ovclash_suite_clash_info_record_view_t *overlap,
)#

Updates an overlap record and commits, like ovclash_suite_data_update_overlap_with_commit with commit 1.

While the overlap has no frame records the store creates overlap->frame_count placeholder frame records; existing frame records are left untouched. Fails, before the write begins, when no overlap has the view’s identifier.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap – Overlap record view containing the identifier and replacement values.

ovclash_suite_result_t ovclash_suite_data_update_overlap_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_clash_info_record_view_t *overlap,
uint32_t commit,
)#

Updates an overlap record with explicit commit control.

While the overlap has no frame records the store creates overlap->frame_count placeholder frame records; existing frame records are left untouched. Fails, before the write begins, when no overlap has the view’s identifier.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap – Overlap record view containing the identifier and replacement values.

  • commit – Non-zero to commit after the update. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

ovclash_suite_result_t ovclash_suite_data_get_overlap_count_by_query(
const ovclash_suite_data_t *data,
int64_t query_id,
uint32_t *out_count,
)#

Counts overlaps belonging to a query.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to filter overlaps.

  • out_count – Receives the overlap count. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_overlap_state_count_by_query(
const ovclash_suite_data_t *data,
int64_t query_id,
uint32_t *out_count,
)#

Counts distinct state buckets for overlaps belonging to a query.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to filter overlaps.

  • out_count – Receives the number of state-count rows. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_overlap_state_count_at(
const ovclash_suite_data_t *data,
int64_t query_id,
uint32_t index,
ovclash_suite_state_count_view_t *out_count,
)#

Reads one state-count bucket for overlaps belonging to a query.

Buckets are ordered by ascending state value.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to filter overlaps.

  • index – Zero-based state-count row index.

  • out_count – Receives the state value and row count. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_overlap_by_query_at(
const ovclash_suite_data_t *data,
int64_t query_id,
uint32_t index,
ovclash_suite_clash_info_record_view_t *out_overlap,
)#

Reads an overlap belonging to a query by zero-based filtered index.

On a SQLite store a call skips index rows. Past the first 1024 indices, a call for the index right after that of the previous call on the same query continues from the previous row instead, unless a cursor is open or the store was written in between. Prefer ovclash_suite_data_get_overlaps_by_query for sequential reads.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to filter overlaps.

  • index – Zero-based overlap index within the query.

  • out_overlap – Receives the overlap record view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_overlaps_by_query(
const ovclash_suite_data_t *data,
int64_t query_id,
int64_t offset,
int64_t limit,
ovclash_suite_overlap_cursor_t **out_cursor,
)#

Opens a forward-only cursor over the overlaps of a query, ordered by overlap_id, then identifier.

The cursor reads overlap headers incrementally, including the frame count of each overlap; it does not load frame payloads. The offset is skipped once for the whole range. Serialize access with other calls on the same data handle. Destroy the cursor before closing, reopening or destroying that handle. The visibility of writes made while a cursor is open follows the backend; the cursor is not an immutable snapshot. SQLite uses one ordered statement. Directory cursors keep the ordered identifiers and load each header when advanced.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to filter overlaps.

  • offset – Initial overlap offset; negative values start at zero.

  • limit – Maximum number of overlaps; zero means all remaining overlaps. Must be nonnegative.

  • out_cursor – Receives an owned cursor, including for an empty range. Must not be null.

ovclash_suite_result_t ovclash_suite_overlap_cursor_next(
ovclash_suite_overlap_cursor_t *cursor,
ovclash_suite_clash_info_record_view_t *out_view,
uint32_t *out_has_value,
)#

Advances an overlap cursor by one record.

Exhaustion succeeds with out_has_value=0 and out_view cleared, also on repeated calls. A returned view borrows cursor-owned memory until the next advance or the destruction of this cursor. Other cursors and data reads do not invalidate it.

Parameters:
  • cursor – Cursor returned by ovclash_suite_data_get_overlaps_by_query. Must not be null.

  • out_view – Receives a borrowed overlap record view. Must not be null.

  • out_has_value – Receives one for a row and zero for exhaustion or error. Must not be null.

ovclash_suite_result_t ovclash_suite_overlap_cursor_destroy(
ovclash_suite_overlap_cursor_t *cursor,
)#

Destroys an overlap cursor.

Passing null succeeds and does nothing.

Parameters:

cursor – Cursor returned by ovclash_suite_data_get_overlaps_by_query.

ovclash_suite_result_t ovclash_suite_data_find_overlap(
const ovclash_suite_data_t *data,
int64_t identifier,
ovclash_suite_clash_info_record_view_t *out_overlap,
)#

Finds an overlap by identifier.

Fails with an empty last-error text when no record matches, which tells absence apart from an error.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Overlap identifier to search for.

  • out_overlap – Receives the found overlap record view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_overlaps_by_query(
ovclash_suite_data_t *data,
int64_t query_id,
uint32_t *out_removed_count,
)#

Removes all overlaps of a query with their frame records, and commits, like ovclash_suite_data_remove_overlaps_by_query_with_commit with commit 1.

Like any write, the removal opens a store’s database or directory on demand, so a store that has none yet removes nothing and reports 0.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to select overlaps for removal.

  • out_removed_count – Receives the number of removed overlaps. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_overlaps_by_query_with_commit(
ovclash_suite_data_t *data,
int64_t query_id,
uint32_t commit,
uint32_t *out_removed_count,
)#

Removes all overlaps of a query with their frame records, with explicit commit control.

Like any write, the removal opens a store’s database or directory on demand, so a store that has none yet removes nothing and reports 0.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • query_id – Query identifier used to select overlaps for removal.

  • commit – Non-zero to commit after removal. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_removed_count – Receives the number of removed overlaps. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_overlap(
ovclash_suite_data_t *data,
int64_t identifier,
)#

Removes an overlap with its frame records, and commits, like ovclash_suite_data_remove_overlap_with_commit with commit 1.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Overlap identifier to remove.

Returns:

Success when the overlap was removed. Failure when no overlap has the identifier, reported before the write begins so pending writes stay untouched, or as the data API catalogue says.

ovclash_suite_result_t ovclash_suite_data_remove_overlap_with_commit(
ovclash_suite_data_t *data,
int64_t identifier,
uint32_t commit,
)#

Removes an overlap with its frame records, with explicit commit control.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Overlap identifier to remove.

  • commit – Non-zero to commit after removal. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

Returns:

Success when the overlap was removed. Failure when no overlap has the identifier, reported before the write begins so pending writes stay untouched, or as the data API catalogue says.

ovclash_suite_result_t ovclash_suite_data_get_frame_count_by_overlap(
const ovclash_suite_data_t *data,
int64_t overlap_identifier,
uint32_t *out_count,
)#

Counts frame records belonging to an overlap.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier used to filter frame records.

  • out_count – Receives the frame count. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_frame_by_overlap_at(
const ovclash_suite_data_t *data,
int64_t overlap_identifier,
uint32_t index,
ovclash_suite_clash_frame_info_record_view_t *out_frame,
)#

Reads a frame record belonging to an overlap by zero-based filtered index.

On a SQLite store each call skips index rows, so reading the frames of an overlap one index at a time is quadratic in the frame count. Use ovclash_suite_data_get_frames_by_overlap for sequential reads.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier used to filter frame records.

  • index – Zero-based frame index within the overlap.

  • out_frame – Receives the frame record view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_frames_by_overlap(
const ovclash_suite_data_t *data,
int64_t overlap_identifier,
int64_t max_frame_count,
int64_t first_frame_offset,
ovclash_suite_frame_cursor_t **out_cursor,
)#

Opens a forward-only cursor over the frame records of an overlap, in the same timecode-then-identifier order ovclash_suite_data_get_frame_by_overlap_at reads.

The cursor skips the requested offset once, unlike repeated indexed reads. SQLite steps one ordered statement. Directory cursors keep the ordered identifiers and load one frame file per advance. Changes made while the cursor is active have no guaranteed visibility; finish the cursor before modifying the queried rows.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier used to filter frame records.

  • max_frame_count – Maximum number of frames to read, or a negative value for all of them; zero reads none.

  • first_frame_offset – Zero-based frame index to start at. Negative values start at zero.

  • out_cursor – Receives the cursor. Must not be null. Destroy it with ovclash_suite_frame_cursor_destroy, before destroying the data handle.

ovclash_suite_result_t ovclash_suite_frame_cursor_next(
ovclash_suite_frame_cursor_t *cursor,
ovclash_suite_clash_frame_info_record_view_t *out_frame,
uint32_t *out_has_frame,
)#

Advances a frame cursor by one record.

Running out of frames is not an error: the call succeeds with *out_has_frame set to zero and out_frame cleared. out_frame borrows cursor-owned memory, which the next ovclash_suite_frame_cursor_next or ovclash_suite_frame_cursor_destroy on the same cursor invalidates. Copy the needed data before advancing.

Parameters:
  • cursor – Cursor returned by ovclash_suite_data_get_frames_by_overlap. Must not be null.

  • out_frame – Receives the frame record view. Must not be null.

  • out_has_frame – Receives non-zero when a frame was read. Must not be null.

ovclash_suite_result_t ovclash_suite_frame_cursor_destroy(
ovclash_suite_frame_cursor_t *cursor,
)#

Destroys a frame cursor.

Passing null succeeds and does nothing.

Parameters:

cursor – Cursor returned by ovclash_suite_data_get_frames_by_overlap.

ovclash_suite_result_t ovclash_suite_data_insert_frame(
ovclash_suite_data_t *data,
const ovclash_suite_clash_frame_info_record_view_t *frame,
uint32_t update_identifier,
int64_t *out_identifier,
)#

Inserts a frame record and commits, like ovclash_suite_data_insert_frame_with_commit with commit 1.

frame->clash_info_id must name an existing overlap.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • frame – Frame record view to insert. String and buffer views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • out_identifier – Receives the inserted frame identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_insert_frame_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_clash_frame_info_record_view_t *frame,
uint32_t update_identifier,
uint32_t commit,
int64_t *out_identifier,
)#

Inserts a frame record with explicit commit control.

frame->clash_info_id must name an existing overlap.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • frame – Frame record view to insert. String and buffer views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • commit – Non-zero to commit after the insert. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_identifier – Receives the inserted frame identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_frames_by_overlap(
ovclash_suite_data_t *data,
int64_t overlap_identifier,
uint32_t *out_removed_count,
)#

Removes all frame records of an overlap and commits, like ovclash_suite_data_remove_frames_by_overlap_with_commit with commit 1.

Like any write, the removal opens a store’s database or directory on demand, so a store that has none yet removes nothing and reports 0.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier used to select frame records for removal.

  • out_removed_count – Receives the number of removed frame records. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_frames_by_overlap_with_commit(
ovclash_suite_data_t *data,
int64_t overlap_identifier,
uint32_t commit,
uint32_t *out_removed_count,
)#

Removes all frame records for an overlap with explicit commit control.

Like any write, the removal opens a store’s database or directory on demand, so a store that has none yet removes nothing and reports 0.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier used to select frame records for removal.

  • commit – Non-zero to commit after removal. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_removed_count – Receives the number of removed frame records. Must not be null.

ovclash_suite_result_t ovclash_suite_data_replace_frames_by_overlap_with_commit(
ovclash_suite_data_t *data,
int64_t overlap_identifier,
const ovclash_suite_clash_frame_info_record_view_t *frames,
size_t frame_count,
uint32_t commit,
uint32_t *out_inserted_count,
)#

Replaces all frame records for an overlap with explicit commit control.

This is the bulk equivalent of removing frames with ovclash_suite_data_remove_frames_by_overlap_with_commit, then inserting each frame with ovclash_suite_data_insert_frame_with_commit. The function validates the counted frame array and each nested counted buffer before it mutates the data store. All input frame views are copied, and no pointer in frames is retained. Each stored frame gets overlap_identifier as its clash_info_id, whatever the view holds.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null and must be writable.

  • overlap_identifier – Existing overlap identifier whose frame rows are replaced.

  • frames – Array of frame record views. May be null only when frame_count is zero.

  • frame_count – Number of frame views in frames. At most 1000000.

  • commit – Non-zero to commit after replacement. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_inserted_count – Receives the number of inserted frame records. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS on success; OVCLASH_SUITE_STATUS_ERROR when data, frames, nested buffers, or overlap_identifier is invalid, or the store write fails. Failure text is available through ovclash_suite_data_get_last_error(data) and ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_data_set_frame_count_for_overlap(
ovclash_suite_data_t *data,
int64_t overlap_identifier,
uint32_t frame_count,
)#

Replaces every frame record of an overlap with placeholder frames and commits, like ovclash_suite_data_set_frame_count_for_overlap_with_commit with commit 1.

Placeholder frames carry identity matrices and no faces, outlines or points. Existing frame data, including timecodes, faces, outlines and matrices, is deleted even when frame_count equals the current count. Use ovclash_suite_data_replace_frames_by_overlap_with_commit to write real frames.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier to update.

  • frame_count – Number of placeholder frame records to create. At most 1000000.

ovclash_suite_result_t ovclash_suite_data_set_frame_count_for_overlap_with_commit(
ovclash_suite_data_t *data,
int64_t overlap_identifier,
uint32_t frame_count,
uint32_t commit,
)#

Replaces every frame record of an overlap with placeholder frames, with explicit commit control.

Placeholder frames carry identity matrices and no faces, outlines or points. Existing frame data, including timecodes, faces, outlines and matrices, is deleted even when frame_count equals the current count. Use ovclash_suite_data_replace_frames_by_overlap_with_commit to write real frames.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • overlap_identifier – Overlap identifier to update.

  • frame_count – Number of placeholder frame records to create. At most 1000000.

  • commit – Non-zero to commit after the update. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

ovclash_suite_result_t ovclash_suite_data_insert_point_cloud_settings(
ovclash_suite_data_t *data,
const ovclash_suite_point_cloud_settings_view_t *settings,
uint32_t update_identifier,
int64_t *out_identifier,
)#

Inserts point-cloud settings and commits, like ovclash_suite_data_insert_point_cloud_settings_with_commit with commit 1.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • settings – Point-cloud settings view to insert. String views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • out_identifier – Receives the inserted settings identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_insert_point_cloud_settings_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_point_cloud_settings_view_t *settings,
uint32_t update_identifier,
uint32_t commit,
int64_t *out_identifier,
)#

Inserts point-cloud settings with explicit commit control.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • settings – Point-cloud settings view to insert. String views are copied by the data store.

  • update_identifier – Non-zero to generate a new identifier. Zero stores the view’s identifier, or generates one when it is negative.

  • commit – Non-zero to commit after the insert. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

  • out_identifier – Receives the inserted settings identifier. Must not be null.

ovclash_suite_result_t ovclash_suite_data_update_point_cloud_settings(
ovclash_suite_data_t *data,
const ovclash_suite_point_cloud_settings_view_t *settings,
)#

Updates point-cloud settings and commits, like ovclash_suite_data_update_point_cloud_settings_with_commit with commit 1.

Fails, before the write begins, when no point-cloud settings record has the view’s identifier.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • settings – Point-cloud settings view containing the identifier and replacement values.

ovclash_suite_result_t ovclash_suite_data_update_point_cloud_settings_with_commit(
ovclash_suite_data_t *data,
const ovclash_suite_point_cloud_settings_view_t *settings,
uint32_t commit,
)#

Updates point-cloud settings with explicit commit control.

Fails, before the write begins, when no point-cloud settings record has the view’s identifier.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • settings – Point-cloud settings view containing the identifier and replacement values.

  • commit – Non-zero to commit after the update. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

ovclash_suite_result_t ovclash_suite_data_find_point_cloud_settings(
const ovclash_suite_data_t *data,
int64_t identifier,
ovclash_suite_point_cloud_settings_view_t *out_settings,
)#

Finds point-cloud settings by identifier.

Fails with an empty last-error text when no record matches, which tells absence apart from an error.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Point-cloud settings identifier to search for.

  • out_settings – Receives the found settings view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_point_cloud_settings_count(
const ovclash_suite_data_t *data,
uint32_t *out_count,
)#

Counts stored point-cloud settings records.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • out_count – Receives the settings record count. Must not be null.

ovclash_suite_result_t ovclash_suite_data_get_point_cloud_settings_at(
const ovclash_suite_data_t *data,
uint32_t index,
ovclash_suite_point_cloud_settings_view_t *out_settings,
)#

Reads point-cloud settings by zero-based storage index.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • index – Zero-based settings record index.

  • out_settings – Receives the settings view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_find_point_cloud_settings_by_prim_path(
const ovclash_suite_data_t *data,
ovclash_suite_string_t point_cloud_prim_path,
ovclash_suite_point_cloud_settings_view_t *out_settings,
)#

Finds point-cloud settings by source point-cloud prim path.

Fails with an empty last-error text when no record matches, which tells absence apart from an error.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • point_cloud_prim_path – Length-prefixed source point-cloud prim path to search for.

  • out_settings – Receives the found settings view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_find_point_cloud_settings_by_destination_path(
const ovclash_suite_data_t *data,
ovclash_suite_string_t destination_path,
ovclash_suite_point_cloud_settings_view_t *out_settings,
)#

Finds point-cloud settings by generated destination path.

Fails with an empty last-error text when no record matches, which tells absence apart from an error.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • destination_path – Length-prefixed destination path to search for.

  • out_settings – Receives the found settings view. Must not be null.

ovclash_suite_result_t ovclash_suite_data_remove_point_cloud_settings(
ovclash_suite_data_t *data,
int64_t identifier,
)#

Removes point-cloud settings and commits, like ovclash_suite_data_remove_point_cloud_settings_with_commit with commit 1.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Point-cloud settings identifier to remove.

Returns:

Success when the settings were removed. Failure when no settings have the identifier, reported before the write begins so pending writes stay untouched, or as the data API catalogue says.

ovclash_suite_result_t ovclash_suite_data_remove_point_cloud_settings_with_commit(
ovclash_suite_data_t *data,
int64_t identifier,
uint32_t commit,
)#

Removes point-cloud settings with explicit commit control.

Parameters:
  • data – Suite data handle created by either data factory. Must not be null.

  • identifier – Point-cloud settings identifier to remove.

  • commit – Non-zero to commit after removal. Zero leaves the write pending; a later write that fails after its storage write began rolls back every pending write (see Data Serialization API).

Returns:

Success when the settings were removed. Failure when no settings have the identifier, reported before the write begins so pending writes stay untouched, or as the data API catalogue says.

Functions

ovclash_suite_result_t ovclash_suite_get_default_run_settings(
ovclash_suite_run_settings_t *out_settings,
)#

Fills a run-settings struct with the suite defaults.

The defaults are the engine defaults of ovclash_reset_settings, expressed as Suite fields. The exceptions: pose_epsilon and area_epsilon hold the exact double 1e-6, bounds_epsilon the exact double 0.01, and the Suite-only depth_epsilon is -1.0.

Parameters:

out_settings – Receives the default run settings. Must not be null.

ovclash_suite_result_t ovclash_suite_run_settings_to_query_settings_json(
const ovclash_suite_run_settings_t *settings,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Serializes run settings into the legacy clash-query settings JSON object.

The native Suite layer owns this serializer, so C and Python callers share the setting names, defaults and numeric formatting of the persisted clash_detect_settings. The keys are the ovclash_suite_setting_id_t names without their OVCLASH_SUITE_ prefix.

Finite doubles are written in printf %.17g form, with up to 17 significant digits and trailing zeros dropped, so they round-trip exactly. This is deliberately not the shortest form: a default epsilon of 1e-6 is written as 9.9999999999999995e-07. The text is persisted verbatim, so its spelling is part of the format. Negative zero is written as -0.0. Formatting uses the classic numeric locale and temporarily selects the default floating-point environment, then restores the complete environment of the caller. Directed rounding or flushed denormals therefore do not change the saved text.

Parameters:
  • settings – Run settings to serialize. Must not be null.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero to query size.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when serialization completed or a size query succeeded. OVCLASH_SUITE_STATUS_ERROR when settings/out_required_size are null, any settings double is non-finite, out_buffer is null with non-zero out_buffer_size, out_buffer is too small, allocation fails, or an exception is caught. The thread-local last-error string contains the concrete reason.

ovclash_suite_result_t ovclash_suite_get_version(
uint32_t *out_major,
uint32_t *out_minor,
uint32_t *out_patch,
)#

Returns the semantic version of the ovclash library, which the Suite shares, as compiled.

Parameters:
  • out_major – Receives the major version number. Must not be null.

  • out_minor – Receives the minor version number. Must not be null.

  • out_patch – Receives the patch version number. Must not be null.

ovclash_suite_result_t ovclash_suite_get_backend_info(
ovclash_suite_backend_info_t *out_info,
)#

Returns capability and load-path information for the active clash backend.

Parameters:

out_info – Receives the backend name and capability flags. Must not be null.

Returns:

SUCCESS, or ERROR when out_info is null or, in ovstage builds, when the call runs inside an owner-operation callback on the same thread (see ovclash_suite_run_ovstage_owner_operation). Nothing is written on error; ovclash_suite_get_thread_last_error gives the reason.

struct ovclash_suite_backend_info_t#
#include <include/ovclash_suite/ovclash_suite.h>

Capability and load-path information for the native clash backend the library was built with.

Every value is a compile-time constant. Field catalogue:

  • backend_name: “openusd” or “ovstage”; borrows a static library-owned string valid for the process lifetime.

  • native_openusd_linked: 1 for the OpenUSD backend, otherwise 0.

  • ovpopulation_runtime_loaded: 1 for the ovstage backend, otherwise 0.

  • ovstage_cuda_enabled: 1 only for an ovstage backend built with CUDA support.

Public Members

ovclash_suite_string_t backend_name#
uint32_t native_openusd_linked#
uint32_t ovpopulation_runtime_loaded#
uint32_t ovstage_cuda_enabled#

Suite model C API#

The ClashQuery, ClashInfo, ClashFrameInfo and PointCloudSettings objects, as owned handles with getters, mutators and JSON serializers. Ownership rules for the Suite models gives their copy-in and borrow-out rules, the size-query rule of the serializers and their numeric rules, which the header states only in a group comment that does not render.

Functions

ovclash_suite_result_t ovclash_suite_query_create(
ovclash_suite_query_t **out_query,
)#

Creates a clash query model with the legacy defaults.

identifier is -1 and settings_json is {}. creation_timestamp and last_modified_timestamp hold the current time (see ovclash_suite_current_timestamp). last_modified_by holds the current user name (see ovclash_suite_current_user_name). Every other string is empty. The Python ClashQuery constructor takes its timestamp and user-name defaults from this function.

Parameters:

out_query – Receives the created query handle. Must not be null. Destroy with ovclash_suite_query_destroy.

ovclash_suite_result_t ovclash_suite_query_create_from_view(
const ovclash_suite_query_view_t *view,
ovclash_suite_query_t **out_query,
)#

Creates a clash query model by copying a public query view.

Parameters:
  • view – Query view to copy. String views are copied by the created handle. Must not be null.

  • out_query – Receives the created query handle. Must not be null. Destroy with ovclash_suite_query_destroy.

ovclash_suite_result_t ovclash_suite_query_destroy(
ovclash_suite_query_t *query,
)#

Destroys a clash query model.

Parameters:

query – Query handle returned by a query create function. May be null.

ovclash_suite_result_t ovclash_suite_query_get_view(
const ovclash_suite_query_t *query,
ovclash_suite_query_view_t *out_view,
)#

Reads a view of a clash query model.

Parameters:
  • query – Query handle to read. Must not be null.

  • out_view – Receives a view backed by query. Must not be null. Valid until query is mutated or destroyed.

ovclash_suite_result_t ovclash_suite_query_serialize_json(
const ovclash_suite_query_t *query,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Serializes a clash query to the legacy Python dictionary JSON shape.

Parameters:
  • query – Query handle to serialize. Must not be null.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_query_reset_identifier(
ovclash_suite_query_t *query,
)#

Resets a clash query identifier to the unsaved value -1.

Preconditions: query must be a valid handle returned by a query create function. Passing null is invalid.

Side effects: mutates only the identifier field; the query remains otherwise unchanged and no persistent data store is touched.

Ownership: query remains owned by the caller and must still be destroyed with ovclash_suite_query_destroy. No borrowed views are returned.

Threading: callers must serialize access to query while mutating it. Independent query handles may be reset concurrently.

Example:

ovclash_suite_query_t* query = 0;
ovclash_suite_query_create(&query);
ovclash_suite_query_reset_identifier(query);
ovclash_suite_query_destroy(query);

Parameters:

query – Query handle to mutate. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when the identifier is reset. OVCLASH_SUITE_STATUS_ERROR when query is null or a C++ exception is caught. Failure detail is available through ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_query_update_last_modified(
ovclash_suite_query_t *query,
)#

Updates the last-modified timestamp and user fields from the Suite clock and user name.

Preconditions: query must be a valid handle returned by a query create function. Passing null is invalid.

Side effects: sets last_modified_timestamp to ovclash_suite_current_timestamp text and last_modified_by to ovclash_suite_current_user_name text, which is empty when no user name is available. No persistent data store is touched until the caller writes the query through a data API.

Ownership: query remains owned by the caller and must still be destroyed with ovclash_suite_query_destroy. Generated string storage is owned by query.

Threading: callers must serialize access to query while mutating it. Independent query handles may update timestamps concurrently.

Example:

ovclash_suite_query_t* query = 0;
ovclash_suite_query_create(&query);
ovclash_suite_query_update_last_modified(query);
ovclash_suite_query_destroy(query);

Parameters:

query – Query handle to mutate. Must not be null.

Returns:

OVCLASH_SUITE_STATUS_SUCCESS when metadata is updated. OVCLASH_SUITE_STATUS_ERROR when query is null, allocation fails, or a C++ exception is caught. Failure detail is available through ovclash_suite_get_thread_last_error.

ovclash_suite_result_t ovclash_suite_query_set_identifier(
ovclash_suite_query_t *query,
int64_t identifier,
)#

Sets the query identifier.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • identifier – Identifier value to store.

ovclash_suite_result_t ovclash_suite_query_set_query_name(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the query name.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed query name to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_query_set_object_a_path(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the first object scope path.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed first object scope path to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_query_set_object_b_path(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the second object scope path.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed second object scope path to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_query_set_settings_json(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the settings JSON text and updates the last-modified metadata.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed settings JSON text to copy. Updates last-modified metadata.

Returns:

Success when value is empty or a syntactically valid JSON value of any kind (object, array, string, number, true, false or null), and was copied. Failure when query is null, value has an invalid span or invalid UTF-8, value is neither valid JSON nor empty, allocation fails, or an exception is caught.

ovclash_suite_result_t ovclash_suite_query_load_settings_json(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Loads the settings JSON text without updating the last-modified metadata.

The Python ClashQuery.load_settings_from_str wraps this function as a bool-return helper. That helper returns False for empty or invalid JSON, although this function accepts empty text.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed settings JSON text to copy without updating last-modified metadata.

Returns:

Success when value is empty or a syntactically valid JSON value of any kind (object, array, string, number, true, false or null), and was copied without touching the last-modified metadata. Failure when query is null, value has an invalid span or invalid UTF-8, value is neither valid JSON nor empty, allocation fails, or an exception is caught.

ovclash_suite_result_t ovclash_suite_query_set_creation_timestamp(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the creation timestamp.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed creation timestamp in Suite storage format.

ovclash_suite_result_t ovclash_suite_query_set_last_modified_timestamp(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the last-modified timestamp.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed last-modified timestamp in Suite storage format.

ovclash_suite_result_t ovclash_suite_query_set_last_modified_by(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the last-modified user name.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed last-modified user name to copy.

ovclash_suite_result_t ovclash_suite_query_set_comment(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the query comment.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed comment text to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_query_set_roi_include_path(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the region-of-interest include path.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed ROI include path to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_query_set_roi_exclude_path(
ovclash_suite_query_t *query,
ovclash_suite_string_t value,
)#

Sets the region-of-interest exclude path.

Parameters:
  • query – Query handle to mutate. Must not be null.

  • value – Length-prefixed ROI exclude path to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_query_equals(
const ovclash_suite_query_t *lhs,
const ovclash_suite_query_t *rhs,
uint32_t *out_equal,
)#

Compares every query field.

The settings JSON compares byte for byte rather than as parsed JSON, so settings that differ only in key order or number spelling (1 against 1.0) are unequal.

Parameters:
  • lhs – First query handle. Must not be null.

  • rhs – Second query handle. Must not be null.

  • out_equal – Receives 1 when equal, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_create(
ovclash_suite_point_cloud_settings_t **out_settings,
)#

Creates point-cloud settings with the legacy defaults.

identifier is -1, both paths are empty, save_to_session_layer and skip_rendering are 1, and max_lod_level is OVCLASH_SUITE_POINT_CLOUD_SETTINGS_MAX_LOD_LEVEL (1000000). These are the defaults of the Python PointCloudSettings constructor.

Parameters:

out_settings – Receives the created settings handle. Must not be null. Destroy with ovclash_suite_point_cloud_settings_destroy.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_create_from_view(
const ovclash_suite_point_cloud_settings_view_t *view,
ovclash_suite_point_cloud_settings_t **out_settings,
)#

Creates point-cloud settings by copying a public settings view.

Parameters:
  • view – Settings view to copy. String views are copied by the created handle. Must not be null.

  • out_settings – Receives the created settings handle. Must not be null. Destroy with ovclash_suite_point_cloud_settings_destroy.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_destroy(
ovclash_suite_point_cloud_settings_t *settings,
)#
Parameters:

settings – Settings handle returned by a point-cloud-settings create function. May be null.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_get_view(
const ovclash_suite_point_cloud_settings_t *settings,
ovclash_suite_point_cloud_settings_view_t *out_view,
)#

Reads a view of point-cloud settings.

Parameters:
  • settings – Settings handle to read. Must not be null.

  • out_view – Receives a view backed by settings. Must not be null. Valid until settings is mutated or destroyed.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_serialize_json(
const ovclash_suite_point_cloud_settings_t *settings,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Serializes point-cloud settings to JSON.

Parameters:
  • settings – Settings handle to serialize. Must not be null.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_reset_identifier(
ovclash_suite_point_cloud_settings_t *settings,
)#
Parameters:

settings – Settings handle to mutate. Must not be null.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_set_identifier(
ovclash_suite_point_cloud_settings_t *settings,
int64_t identifier,
)#

Sets the point-cloud settings identifier.

Parameters:
  • settings – Settings handle to mutate. Must not be null.

  • identifier – Identifier value to store.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_set_point_cloud_prim_path(
ovclash_suite_point_cloud_settings_t *settings,
ovclash_suite_string_t value,
)#

Sets the source point-cloud prim path.

Parameters:
  • settings – Settings handle to mutate. Must not be null.

  • value – Length-prefixed source point-cloud prim path to copy.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_set_destination_path(
ovclash_suite_point_cloud_settings_t *settings,
ovclash_suite_string_t value,
)#

Sets the generated destination path.

Parameters:
  • settings – Settings handle to mutate. Must not be null.

  • value – Length-prefixed generated destination path to copy.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_set_save_to_session_layer(
ovclash_suite_point_cloud_settings_t *settings,
uint32_t value,
)#

Sets whether generated data goes to the session layer.

Parameters:
  • settings – Settings handle to mutate. Must not be null.

  • value – Non-zero to save generated data to the session layer.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_set_skip_rendering(
ovclash_suite_point_cloud_settings_t *settings,
uint32_t value,
)#

Sets whether point-cloud rendering is skipped.

Parameters:
  • settings – Settings handle to mutate. Must not be null.

  • value – Non-zero to skip point-cloud rendering.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_set_max_lod_level(
ovclash_suite_point_cloud_settings_t *settings,
int64_t value,
)#

Sets the maximum level of detail.

Parameters:
  • settings – Settings handle to mutate. Must not be null.

  • value – Maximum level-of-detail value, stored verbatim. No value has a special meaning, -1 included. The default, OVCLASH_SUITE_POINT_CLOUD_SETTINGS_MAX_LOD_LEVEL (1000000, see ovclash_suite_get_named_constant), is effectively unlimited.

ovclash_suite_result_t ovclash_suite_point_cloud_settings_equals(
const ovclash_suite_point_cloud_settings_t *lhs,
const ovclash_suite_point_cloud_settings_t *rhs,
uint32_t *out_equal,
)#

Compares every field, including identifier.

Parameters:
  • lhs – First settings handle. Must not be null.

  • rhs – Second settings handle. Must not be null.

  • out_equal – Receives 1 when equal, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_create(
ovclash_suite_clash_frame_info_t **out_frame,
)#

Creates a clash frame-info model with legacy defaults.

identifier and clash_info_id are -1, both object matrices are identity, max_local_depth and every penetration depth are -1.0, and every other field is zero or empty.

Parameters:

out_frame – Receives the created frame handle. Must not be null. Destroy with ovclash_suite_clash_frame_info_destroy.

ovclash_suite_result_t ovclash_suite_clash_frame_info_create_from_view(
const ovclash_suite_clash_frame_info_record_view_t *view,
ovclash_suite_clash_frame_info_t **out_frame,
)#

Creates a clash frame-info model by copying a public frame view.

Parameters:
  • view – Frame view to copy. Array views are copied by the created handle. Must not be null.

  • out_frame – Receives the created frame handle. Must not be null. Destroy with ovclash_suite_clash_frame_info_destroy.

ovclash_suite_result_t ovclash_suite_clash_frame_info_destroy(
ovclash_suite_clash_frame_info_t *frame,
)#
Parameters:

frame – Frame handle returned by a clash-frame-info create function. May be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_get_view(
const ovclash_suite_clash_frame_info_t *frame,
ovclash_suite_clash_frame_info_record_view_t *out_view,
)#

Reads a view of a clash frame-info model.

Parameters:
  • frame – Frame handle to read. Must not be null.

  • out_view – Receives a view backed by frame. Must not be null. Valid until frame is mutated or destroyed.

ovclash_suite_result_t ovclash_suite_clash_frame_info_serialize_json(
const ovclash_suite_clash_frame_info_t *frame,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Serializes a clash frame info to JSON.

Parameters:
  • frame – Frame handle to serialize. Must not be null.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_check_object_0_matrix_changed(
const ovclash_suite_clash_frame_info_t *frame,
const double *matrix,
uint32_t *out_changed,
)#

Tests whether a matrix differs from the stored object 0 matrix.

Parameters:
  • frame – Frame handle to inspect. Must not be null.

  • matrix – Row-major 4x4 matrix to compare. Must point to 16 doubles.

  • out_changed – Receives 0 when every element differs from the stored matrix by less than the legacy tolerance 1e-6, otherwise 1. A NaN difference counts as changed. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_check_object_1_matrix_changed(
const ovclash_suite_clash_frame_info_t *frame,
const double *matrix,
uint32_t *out_changed,
)#

Tests whether a matrix differs from the stored object 1 matrix.

Parameters:
  • frame – Frame handle to inspect. Must not be null.

  • matrix – Row-major 4x4 matrix to compare. Must point to 16 doubles.

  • out_changed – Receives 0 when every element differs from the stored matrix by less than the legacy tolerance 1e-6, otherwise 1. A NaN difference counts as changed. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_get_overlap_tris(
const ovclash_suite_clash_frame_info_t *frame,
uint32_t *out_count,
)#

Reads the overlapping triangle count of a frame.

Parameters:
  • frame – Frame handle to inspect. Must not be null.

  • out_count – Receives overlap_elements when the frame has no point indices, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_get_overlap_points(
const ovclash_suite_clash_frame_info_t *frame,
uint32_t *out_count,
)#

Reads the overlapping point count of a frame.

Parameters:
  • frame – Frame handle to inspect. Must not be null.

  • out_count – Receives overlap_elements when the frame has point indices, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_frame_info_equals(
const ovclash_suite_clash_frame_info_t *lhs,
const ovclash_suite_clash_frame_info_t *rhs,
uint32_t *out_equal,
)#

Compares every field except identifier and clash_info_id, with exact floating-point equality, so a NaN value never compares equal.

Parameters:
  • lhs – First frame handle to compare. Must not be null.

  • rhs – Second frame handle to compare. Must not be null.

  • out_equal – Receives 1 when equal, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_create(
ovclash_suite_clash_info_t **out_info,
)#

Creates a clash-info model with the legacy defaults.

identifier is -1, query_id is 0, overlap_type is OVCLASH_SUITE_OVERLAP_NORMAL, present is 1 and state is OVCLASH_SUITE_CLASH_STATE_NEW. max_local_depth is 0.0, and depth_epsilon and every penetration depth are -1.0. Both timestamps hold the current time and last_modified_by holds the current user name. Every other field is zero or empty. No frames are set.

Parameters:

out_info – Receives the created clash-info handle. Must not be null. Destroy with ovclash_suite_clash_info_destroy.

ovclash_suite_result_t ovclash_suite_clash_info_create_from_view(
const ovclash_suite_clash_info_record_view_t *view,
ovclash_suite_clash_info_t **out_info,
)#

Creates a clash-info model by copying a public clash-info view.

Parameters:
  • view – Clash-info view to copy. String views are copied by the created handle. Must not be null.

  • out_info – Receives the created clash-info handle. Must not be null. Destroy with ovclash_suite_clash_info_destroy.

ovclash_suite_result_t ovclash_suite_clash_info_destroy(
ovclash_suite_clash_info_t *info,
)#
Parameters:

info – Clash-info handle returned by a clash-info create function. May be null.

ovclash_suite_result_t ovclash_suite_clash_info_get_view(
const ovclash_suite_clash_info_t *info,
ovclash_suite_clash_info_record_view_t *out_view,
)#

Reads a view of a clash-info model.

Parameters:
  • info – Clash-info handle to read. Must not be null.

  • out_view – Receives a view backed by info. Its frame_count is the number of frames set with ovclash_suite_clash_info_set_frame_views (0 before the first call), whatever the creating view held. Must not be null. Valid until info is mutated or destroyed.

ovclash_suite_result_t ovclash_suite_clash_info_set_frame_views(
ovclash_suite_clash_info_t *info,
const ovclash_suite_clash_frame_info_record_view_t *frames,
size_t frame_count,
)#

Replaces the frame list of the handle with copies of frames.

On failure the frame list of the handle is unchanged.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • frames – Array of frame views to copy. May be null when frame_count is zero.

  • frame_count – Number of frame views in frames.

ovclash_suite_result_t ovclash_suite_clash_info_serialize_json(
const ovclash_suite_clash_info_t *info,
char *out_buffer,
size_t out_buffer_size,
size_t *out_required_size,
)#

Serializes a clash info to JSON.

Parameters:
  • info – Clash-info handle to serialize. Must not be null.

  • out_buffer – Destination UTF-8 buffer. May be null when out_buffer_size is zero.

  • out_buffer_size – Size of out_buffer in bytes, including room for the trailing null when supplied.

  • out_required_size – Receives the required byte count excluding the trailing null. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_reset_identifier(
ovclash_suite_clash_info_t *info,
)#
Parameters:

info – Clash-info handle to mutate. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_update_last_modified(
ovclash_suite_clash_info_t *info,
)#
Parameters:

info – Clash-info handle to mutate. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_set_state(
ovclash_suite_clash_info_t *info,
uint32_t value,
)#

Sets the review state.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • value – State value to store. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_clash_info_set_priority(
ovclash_suite_clash_info_t *info,
uint32_t value,
)#

Sets the priority.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • value – Priority value to store. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_clash_info_set_person_in_charge(
ovclash_suite_clash_info_t *info,
ovclash_suite_string_t value,
)#

Sets the person in charge.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • value – Length-prefixed person-in-charge text to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_clash_info_set_comment(
ovclash_suite_clash_info_t *info,
ovclash_suite_string_t value,
)#

Sets the clash comment.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • value – Length-prefixed comment text to copy. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_clash_info_set_max_local_depth(
ovclash_suite_clash_info_t *info,
double value,
)#

Sets the maximum local depth.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • value – Maximum local depth value to store. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_clash_info_set_penetration_depth(
ovclash_suite_clash_info_t *info,
int32_t axis,
double value,
)#

Sets the penetration depth along one signed axis.

Parameters:
  • info – Clash-info handle to mutate. Must not be null.

  • axis – Signed axis selector: +1 px, -1 nx, +2 py, -2 ny, +3 pz, -3 nz. Any other value fails.

  • value – Penetration depth value to store. Updates last-modified metadata.

ovclash_suite_result_t ovclash_suite_clash_info_is_contact(
const ovclash_suite_clash_info_t *info,
uint32_t *out_value,
)#

Tests for a contact: an OVCLASH_SUITE_OVERLAP_NORMAL overlap with min_distance 0 whose max_local_depth is at most depth_epsilon when depth_epsilon is positive, otherwise exactly 0.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_value – Receives 1 when true, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_is_hard_clash(
const ovclash_suite_clash_info_t *info,
uint32_t *out_value,
)#

Tests for a hard clash: an OVCLASH_SUITE_OVERLAP_NORMAL overlap with min_distance 0 that is not a contact (see ovclash_suite_clash_info_is_contact).

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_value – Receives 1 when true, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_is_soft_clash(
const ovclash_suite_clash_info_t *info,
uint32_t *out_value,
)#

Tests for a soft clash: an OVCLASH_SUITE_OVERLAP_NORMAL overlap with a positive min_distance.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_value – Receives 1 when true, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_is_duplicate(
const ovclash_suite_clash_info_t *info,
uint32_t *out_value,
)#

Tests whether overlap_type is OVCLASH_SUITE_OVERLAP_DUPLICATE.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_value – Receives 1 when true, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_is_point_cloud_clash(
const ovclash_suite_clash_info_t *info,
uint32_t *out_value,
)#

Tests whether overlap_type is OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_value – Receives 1 when true, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_get_overlap_tris(
const ovclash_suite_clash_info_t *info,
uint32_t *out_count,
)#

Reads the overlapping triangle count of a clash info.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_count – Receives overlap_elements unless overlap_type is OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_get_overlap_points(
const ovclash_suite_clash_info_t *info,
uint32_t *out_count,
)#

Reads the overlapping point count of a clash info.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_count – Receives overlap_elements when overlap_type is OVCLASH_SUITE_OVERLAP_POINT_CLOUD_MESH, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_get_frame_info(
const ovclash_suite_clash_info_t *info,
uint32_t index,
ovclash_suite_clash_frame_info_record_view_t *out_frame,
uint32_t *out_found,
)#

Reads one frame of a clash info.

A frame is found only after ovclash_suite_clash_info_set_frame_views, in one of two cases. When num_records equals the number of frames set, every index below it finds its frame. When num_records is 1 and the last ovclash_suite_clash_info_set_frame_views call passed no frames, any index finds a frame synthesized from the header: start_time, min_distance, max_local_depth and overlap_elements, with identity matrices. A synthesized view lasts only until the next frame read on info.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • index – Zero-based frame index to query.

  • out_frame – Receives the selected frame view when found. Must not be null.

  • out_found – Receives 1 when a frame was returned, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_get_last_frame_info(
const ovclash_suite_clash_info_t *info,
ovclash_suite_clash_frame_info_record_view_t *out_frame,
uint32_t *out_found,
)#

Reads the frame at index num_records - 1, following the rules of ovclash_suite_clash_info_get_frame_info; nothing is found when num_records is 0.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • out_frame – Receives the selected frame view when found. Must not be null.

  • out_found – Receives 1 when a frame was returned, otherwise 0. Must not be null.

ovclash_suite_result_t ovclash_suite_clash_info_get_frame_info_index_by_timecode(
const ovclash_suite_clash_info_t *info,
double timecode,
uint32_t *out_index,
)#

Finds the index of the set frame closest to a timecode.

Parameters:
  • info – Clash-info handle to inspect. Must not be null.

  • timecode – Timecode to search for.

  • out_index – Receives the index of the set frame whose timecode is closest to timecode, the later one on a tie, or 0 when no frames are set. Frames must be set in ascending timecode order. Must not be null.

Suite fetch serializer C API#

Fetch-and-save writes through a persistence callback table, ovclash_suite_fetch_serializer_t, or through the built-in SQLite and directory stores, which follow the same contract. A custom C or C++ store also passes an ovclash_suite_fetch_saved_data_reader_t, so that a re-detected approved clash can keep its approval. Saving detection results owns the transaction contract, and Clash states the state reconciliation and the approval comparison. The generated declarations of this section document the callback threads, the reader’s close rules and its output lifetimes.

Typedefs

typedef void (*ovclash_suite_visit_identifier_fn)(void *visitor_data, int64_t identifier)#

Engine-owned callback that a visit_existing implementation calls for each stored identifier.

Call it once for each stored overlap identifier of the requested query. Every signed int64 value, including -1, is a valid identifier. Duplicates are allowed; the engine removes them. Pass visitor_data unchanged. Call the visitor synchronously on the thread running visit_existing, and do not retain the function or visitor_data after visit_existing returns. The visitor reports no status and never throws across this ABI.

Param visitor_data:

Engine-owned context supplied to visit_existing; pass it unchanged.

Param identifier:

One stored signed int64 identifier of the requested query.

Enums

enum ovclash_suite_serializer_transaction_t#

Transaction operations that the fetch engine requests through the transaction callback.

An overlap written before all its reports are captured is called streamed. BEGIN_OVERLAP and END_OVERLAP bracket each streamed overlap.

Fetch-and-save is not all-or-nothing:

  • When a serializer or saved-data reader callback reports failure while the fetch advances, the engine requests ROLLBACK. A prepare_frame failure is the exception; it counts as a processing failure. ROLLBACK discards earlier fetch batches and unrelated writes already pending on the destination. Previously committed data is retained.

  • On an extraction, frame preparation or other native processing failure, the engine requests ABORT_OVERLAP, but only while a streamed overlap is incomplete. ABORT_OVERLAP restores that overlap and keeps earlier completed pending writes. A failed ABORT_OVERLAP leads to ROLLBACK. Without an incomplete overlap, these failures leave pending writes unchanged.

  • A failure during begin or initialization leaves pre-existing pending writes unchanged.

  • Destroying an operation aborts an incomplete overlap in the same way, with the same ROLLBACK fallback. Completed writes stay pending. Destroy never commits.

  • Successful finalization requests BEGIN before COMMIT, even when no results were written.

  • Reconciliation may span several calls. mark_absent changes already applied stay pending when the operation is abandoned.

ROLLBACK is requested at most once per operation and need not be idempotent. A custom destination must implement these semantics, because the engine cannot undo writes when the destination’s ROLLBACK fails. Built-in data close and destroy attempt to commit retained pending writes.

Values:

enumerator OVCLASH_SUITE_SERIALIZER_BEGIN#

Starts the pending transaction or reuses the open one; the callback must be idempotent.

enumerator OVCLASH_SUITE_SERIALIZER_COMMIT#

Publishes all pending writes.

Requested only when the fetch completes successfully.

enumerator OVCLASH_SUITE_SERIALIZER_ROLLBACK#

Discards the entire pending transaction, including unrelated pending writes.

enumerator OVCLASH_SUITE_SERIALIZER_BEGIN_OVERLAP#

Sets a restore point before a streamed overlap is replaced.

enumerator OVCLASH_SUITE_SERIALIZER_END_OVERLAP#

Releases the restore point after the final header of the streamed overlap is written.

enumerator OVCLASH_SUITE_SERIALIZER_ABORT_OVERLAP#

Restores the incomplete streamed overlap to its restore point and keeps other pending writes.

struct ovclash_suite_fetch_serializer_t#
#include <include/ovclash_suite/ovclash_suite_serializer.h>

Persistence callback table for native incremental fetch-and-save, usable from C or C++.

The table is copied at synchronous begin or at async launch. user_data must outlive the operation. Inputs are borrowed for the duration of a callback unless a member documents a longer lifetime.

Completion: before each callback the engine sets out_success to 0. A callback writes exactly 1 only after all its work and output construction succeed; any other value means failure. Callbacks return void, so out_success is the only completion signal. No callback may throw across this ABI. The engine ignores the outputs of a failed callback, except that it takes ownership of a nonnull prepare_frame output. Reporting failure cannot undo side effects that a callback already published. A destination whose COMMIT or ROLLBACK fails may need application-level recovery.

Threading: every callback except prepare_frame runs on the driving thread, one call at a time. With the synchronous bounded API, the driving thread is the thread calling ovclash_suite_runtime_fetch_and_save_begin, next or destroy; no callback runs between those calls. With ovclash_suite_runtime_fetch_and_save_async, it is the operation’s background worker. Storage writes follow runtime result order. The order of release_frame calls is unspecified.

Public Members

void *user_data#

Caller-owned context passed unchanged as the first argument of every callback.

May be null when the implementation needs no context. The table is copied, but this pointer and the state it names must stay valid until destroying the operation has drained all callbacks.

void (*visit_existing)(void *user_data, int64_t query_id, ovclash_suite_visit_identifier_fn visitor, void *visitor_data, uint32_t *out_success)#

Required: enumerates the stored identifiers of query_id once, during fetch initialization.

Runs on the driving thread before any fetch write. Include every stored row of the query, including absent and resolved rows and separate rows that share an overlap hash. Frames are not needed. Call visitor(visitor_data, identifier) once per row, in any order. The engine deduplicates and sorts the identifiers for the later stale-row reconciliation. Do not retain visitor or visitor_data. Set out_success to 1 only after the enumeration completes. A failure here does not request ROLLBACK and leaves pre-existing pending writes unchanged.

Param user_data:

Caller-owned context from this callback table.

Param query_id:

Query whose stored overlap identifiers are enumerated.

Param visitor:

Engine-owned callback to call synchronously for each identifier.

Param visitor_data:

Engine-owned context to pass unchanged to visitor.

Param out_success:

Receives exactly 1 after a successful enumeration; initially 0.

void (*find_overlap)(void *user_data, int64_t query_id, ovclash_suite_string_t overlap_id, ovclash_suite_clash_info_record_view_t *out_record, uint32_t *out_found, uint32_t *out_success)#

Required: looks up one stored header by query_id and the borrowed UTF-8 overlap hash overlap_id.

Runs on the driving thread before the first header write of an overlap, and again before the final header of a streamed overlap. The engine zero-initializes out_record and out_found. Set out_success to 1 for a successful lookup, including when no row exists. Set out_found to 0 when the row is absent, or to nonzero when it is found. The engine reads out_record only for a found row whose lookup succeeded. Its strings must be valid UTF-8 spans that stay alive until the next serializer callback; the engine copies them. No frame reads or writes are needed here.

From a found row the engine keeps identifier, state, priority, person_in_charge, creation_timestamp, comment and penetration_depth_px/nx/py/ny/pz/nz, and regenerates every other field. Filling only these fields, with the rest zero-initialized, is enough. state is required: the engine writes it back, and a found APPROVED state enables the approval comparison described below.

With resolve_stale zero, the stored state is kept. Otherwise a re-detected normal or duplicate overlap becomes ACTIVE. The exception is an APPROVED clash whose detected header and complete ordered frame contents match through the optional saved-data reader; it stays APPROVED. Without that reader, a custom fetch makes every re-detected clash ACTIVE. A new header starts NEW and is not promoted during its first fetch. Its final streamed header keeps any state that the serializer applied on insertion.

Param user_data:

Caller-owned context from this callback table.

Param query_id:

Query of the stored header.

Param overlap_id:

Borrowed UTF-8 overlap hash of the stored header.

Param out_record:

Receives the found header; initially zero-initialized.

Param out_found:

Receives 0 when the row is absent, or nonzero when it is found; initially 0.

Param out_success:

Receives exactly 1 when the lookup succeeds, including absence; initially 0.

void (*write_overlap)(void *user_data, const ovclash_suite_clash_info_record_view_t *record, int64_t *out_identifier, uint32_t *out_success)#

Required: inserts or updates the borrowed overlap header record.

Runs on the driving thread after find_overlap. Write only the header. Do not commit, delete existing frames, or create placeholder frames from num_records or frame_count. On success, publish the row’s stable signed int64 identifier through out_identifier and set out_success to 1. Every signed value, including -1, is a valid identifier. The engine sets out_identifier to 0 first and ignores it on failure. Do not retain record or its borrowed strings. A streamed overlap gets an initial header before clear_frames and append_frame, and a final refreshed header after its last captured frame. Frame batches in between reuse the stable identifier.

Param user_data:

Caller-owned context from this callback table.

Param record:

Borrowed overlap header to insert or update, without frame contents.

Param out_identifier:

Receives the stable stored identifier on success; initially 0.

Param out_success:

Receives exactly 1 after the header write succeeds; initially 0.

void (*clear_frames)(void *user_data, int64_t identifier, uint32_t *out_success)#

Required: removes all stored frame records of identifier.

Keep the overlap’s identity and editable annotations, and do not commit. Runs on the driving thread once per written overlap, after its initial write_overlap and before its first append_frame. A streamed overlap is cleared inside its restore point. Set out_success to 1 after the deletion succeeds. Failure requests ROLLBACK.

Param user_data:

Caller-owned context from this callback table.

Param identifier:

Stable identifier returned by write_overlap.

Param out_success:

Receives exactly 1 after the existing frames are removed; initially 0.

void (*append_frame)(void *user_data, int64_t identifier, const ovclash_suite_clash_frame_info_view_t *frame, const void *prepared, uint32_t *out_success)#

Required: appends the borrowed frame view to the overlap named by identifier.

Runs on the driving thread in runtime result order, after clear_frames. Do not commit. prepared is the matching output of a successful prepare_frame. It is null when preparation is not used or produced no payload. prepared stays engine-owned; do not free or retain it. Copy the view and its arrays if storage needs them after this callback. Set out_success to 1 only after the frame is stored. Failure requests ROLLBACK. The order in which preparations complete never changes the append order. release_frame runs only after the payload is used.

Param user_data:

Caller-owned context from this callback table.

Param identifier:

Stable identifier returned by write_overlap.

Param frame:

Borrowed runtime frame view and arrays to append.

Param prepared:

Matching engine-owned encoding from prepare_frame, or null.

Param out_success:

Receives exactly 1 after the frame is stored; initially 0.

void (*mark_absent)(void *user_data, int64_t identifier, uint32_t resolve, uint32_t *out_success)#

Required: marks the stored row identifier absent, and also RESOLVED when resolve is nonzero.

Leave its frame records intact and do not commit. Runs on the driving thread after the result writes, once for each initially enumerated identifier that no completed overlap write matched, in ascending identifier order. Reconciliation may span several next calls; changes already applied stay pending if the operation is abandoned. Set out_success to 1 on success. Failure requests ROLLBACK.

Param user_data:

Caller-owned context from this callback table.

Param identifier:

Initially enumerated stored row that no completed write matched.

Param resolve:

Nonzero requests RESOLVED state as well as absence; zero keeps the state.

Param out_success:

Receives exactly 1 after the absence update succeeds; initially 0.

void (*transaction)(void *user_data, uint32_t operation, uint32_t *out_success)#

Required: applies one ovclash_suite_serializer_transaction_t operation on the driving thread.

BEGIN must be idempotent. It precedes each write batch and each reconciliation batch, so COMMIT always follows a BEGIN, even for an empty fetch. COMMIT is requested only when the fetch completes. It publishes every pending write, including unrelated ones. ROLLBACK is requested at most once per operation, after a persistence failure. It discards the whole pending transaction, including earlier batches and unrelated pending writes. BEGIN_OVERLAP sets a restore point before a streamed overlap is replaced. END_OVERLAP releases it after the final header of that overlap is written. ABORT_OVERLAP restores only the incomplete overlap, after a processing failure or on abandonment, and keeps earlier completed pending writes. A failed ABORT_OVERLAP requests ROLLBACK. An initialization failure leaves existing pending writes unchanged. Destruction never commits. Set out_success to 1 only after the operation succeeds. A failed COMMIT or ROLLBACK cannot undo side effects already published and may need application-level recovery.

Param user_data:

Caller-owned context from this callback table.

Param operation:

One OVCLASH_SUITE_SERIALIZER_* transaction operation.

Param out_success:

Receives exactly 1 after the operation succeeds; initially 0.

void (*prepare_frame)(void *user_data, const ovclash_suite_clash_frame_info_view_t *frame, void **out_prepared, uint32_t *out_success)#

Optional, set together with release_frame: encodes the borrowed frame view for a later append_frame.

Calls may run concurrently on preparation workers, as the runtime threading settings allow, or serially on the driving thread, for example in single-threaded mode. Access only immutable input and the output of this call. Do not use a connection or any other shared mutable state, including serializer diagnostics. Do not retain the pointer to the view struct. A copy of the view may keep its borrowed geometry arrays until the matching release_frame, which runs before the report is released. The engine sets out_prepared to null first. Publish an optional owned encoding there, then set out_success to 1. The engine takes every nonnull published payload, even on failure, and releases it exactly once. A failed preparation is never appended. It gets a generic diagnostic, and last_error is not queried. A successful null payload is allowed.

Param user_data:

Caller-owned context; access only immutable state during preparation.

Param frame:

Borrowed frame view. Do not retain this pointer.

Param out_prepared:

Receives an optional owned encoding; initially null.

Param out_success:

Receives exactly 1 after a successful preparation; initially 0.

void (*release_frame)(void *user_data, void *prepared, uint32_t *out_success)#

Optional, set together with prepare_frame: releases one nonnull prepared payload on the driving thread.

Runs before the runtime report that the payload borrows from is released. It is called exactly once for every published nonnull payload, including failed preparations and work that was abandoned or never appended. Release order is unspecified. Release all ownership even when reporting failure, and set out_success to 1 only after cleanup succeeds. The engine never retries this callback. A failed release gets a generic diagnostic and requests ROLLBACK once the remaining cleanup has drained.

Param user_data:

Caller-owned context from this callback table.

Param prepared:

One nonnull encoding whose ownership is released.

Param out_success:

Receives exactly 1 after cleanup succeeds; initially 0.

void (*last_error)(void *user_data, ovclash_suite_string_t *out_error, uint32_t *out_success)#

Optional: publishes the serializer’s diagnostic through out_error on the driving thread.

The engine sets the view empty and out_success to 0 first. Set out_success to 1 after publishing a valid borrowed UTF-8 view. The engine copies a nonempty message before the next callback. Empty text, a null callback or a failed acknowledgement yields a generic diagnostic, and the engine does not read failed outputs. This callback may follow a failed storage action on the driving thread. It is not queried for prepare_frame or release_frame failures, nor during secondary cleanup that preserves an earlier failure. Cleanup that is itself the first failure may query it. Do not throw across this ABI.

Param user_data:

Caller-owned context from this callback table.

Param out_error:

Receives the borrowed UTF-8 diagnostic view; initially empty.

Param out_success:

Receives exactly 1 when the diagnostic is published; initially 0.

struct ovclash_suite_fetch_saved_data_reader_t#
#include <include/ovclash_suite/ovclash_suite_serializer.h>

Optional saved-data reader for exact comparison of previously approved custom overlaps.

Pass this table to ovclash_suite_runtime_fetch_and_save_begin_with_reader or ovclash_suite_runtime_fetch_and_save_async_with_reader. The table is copied at synchronous begin or at async launch. user_data and the saved destination must outlive the operation. read_overlap and read_frame are required; close is optional. All three run on the driving thread. The read callbacks run before the overlap’s header and frames are replaced. Set out_success to exactly 1 only after building complete outputs, and never throw across this ABI. Calls and borrowed outputs follow the same serialized access rule as the fetch operation.

The query and the ordered pair hash establish result identity. The comparison covers type, tolerance, depth epsilon, paths, mesh checksums, aggregates and the ordered runtime frame contents. It excludes stored overlap and frame row identifiers, review fields, timestamps and user penetration-depth annotations. Floating-point equality uses no epsilon and ignores the caller’s denormal controls. Signed zeros compare equal, and a NaN never proves contents unchanged.

The reader is a separate table so that ovclash_suite_fetch_serializer_t keeps its ABI. Without a reader, a nonzero resolve_stale makes every re-detected approved custom clash ACTIVE, because unchanged detected contents cannot be proven.

Public Members

void *user_data#

Caller-owned context passed unchanged as the first argument of every reader callback.

void (*read_overlap)(void*, int64_t identifier, ovclash_suite_clash_info_record_view_t *out_overlap, uint32_t *out_success)#

Required: reads the stored header of identifier into out_overlap.

identifier is the stable identifier that find_overlap returned. Fill every detected header field and the actual saved frame_count; unlike find_overlap, do not leave detected fields zero. Output strings stay valid until the next reader callback.

void (*read_frame)(void*, int64_t identifier, uint32_t frame_index, ovclash_suite_clash_frame_info_record_view_t *out_frame, uint32_t *out_success)#

Required: reads the complete saved frame at zero-based frame_index of identifier into out_frame.

Frames are indexed in persisted order. identifier is the one that find_overlap returned, not the identifier inside the header from read_overlap. Output strings and arrays stay valid until the next reader callback.

void (*close)(void*, uint32_t *out_success)#

Optional: releases any reader-owned cursor.

Runs on the driving thread after each overlap comparison that read saved data, before the overlap is replaced, and when an unfinished fetch is destroyed. It must succeed when no cursor is open. A failed close is reported and may be retried on the same thread during failure or destruction cleanup; a successful close is not retried. Async fetching closes on its original worker before it publishes its terminal state. Synchronous callers must drive and destroy the operation on a thread compatible with the reader’s resources. A reader whose close keeps failing remains responsible for its resources.