initialize#
Fully qualified name: isaacsim::physics::manager::initialize
- InitializeResult isaacsim::physics::manager::initialize(
- void *ovstage,
- const char *usdIdentifier,
Initializes all active physics backends from a stage.
Each backend consumes the stage representation it supports. The caller retains ownership of
ovstage, and this function does not extend its lifetime. A nullovstagetogether with a null or emptyusdIdentifieris valid input that requests initialization of an empty scene. The manager does not detach an existing stage before dispatching initialization; each backend controls replacement of any stage it already holds.The caller must keep a non-null
ovstagealive until every backend that accepted it has detached. A successful call toclose()normally establishes this when all participating backends expose correct cleanup callbacks. A failure result alone does not prove detachment when a backend omits cleanup or attachment-status callbacks.If a backend fails, successfully initialized backends that expose a close callback are closed in reverse order. The function returns
InitializeResult::eFailedDirtywhen a close callback fails or throws, or when the failed backend’s attachment-status callback reports an attached stage or throws. Otherwise, it returnsInitializeResult::eFailed. These results describe manager-observed cleanup; they cannot guarantee absolute attachment state when callbacks are absent or report inaccurate state.Note
The OV PhysX backend reads
ovstageat ordinal 1. Populate that ordinal when using this backend.Note
Exceptions raised by backend initialization or rollback callbacks are converted to a failure result.
- Parameters:
ovstage – [in] Opaque pointer to a caller-owned
ovstage_instance_t, ornullptrwhen unavailable.usdIdentifier – [in] Numeric USD stage-cache identifier, such as
"123", ornullptror an empty string when unavailable. The value is interpreted as an identifier, not as a file path.
- Returns:
InitializeResult::eOkwhen every participating initialization callback succeeds,InitializeResult::eFailedwhen initialization fails without an observed cleanup problem, orInitializeResult::eFailedDirtywhen cleanup fails or its status cannot be determined.