General API module
The functions in the general API support basic initialization, updates, and cleanup upon shutdown. Your application must call zcInitialize() before calling any other functions in the zSpace Core SDK.
Classes
- union ZCBoundingBox
- Union representing an axis-aligned bounding box (AABB).
Enums
- enum ZCError { ZC_ERROR_OK = 0, ZC_ERROR_NOT_IMPLEMENTED = 1, ZC_ERROR_NOT_INITIALIZED = 2, ZC_ERROR_ALREADY_INITIALIZED = 3, ZC_ERROR_INVALID_PARAMETER = 4, ZC_ERROR_INVALID_CONTEXT = 5, ZC_ERROR_INVALID_HANDLE = 6, ZC_ERROR_RUNTIME_INCOMPATIBLE = 7, ZC_ERROR_RUNTIME_NOT_FOUND = 8, ZC_ERROR_SYMBOL_NOT_FOUND = 9, ZC_ERROR_DISPLAY_NOT_FOUND = 10, ZC_ERROR_DEVICE_NOT_FOUND = 11, ZC_ERROR_TARGET_NOT_FOUND = 12, ZC_ERROR_CAPABILITY_NOT_FOUND = 13, ZC_ERROR_BUFFER_TOO_SMALL = 14, ZC_ERROR_SYNC_FAILED = 15, ZC_ERROR_OPERATION_FAILED = 16, ZC_ERROR_INVALID_ATTRIBUTE = 17 }
Typedefs
- using ZCError = enum ZCError
- using ZCBoundingBox = union ZCBoundingBox
- Union representing an axis-aligned bounding box (AABB).
Functions
- auto zcInitialize(ZCContext* context) -> ZCError
- auto zcUpdate(ZCContext context) -> ZCError
- auto zcShutDown(ZCContext context) -> ZCError
- auto zcGetContext(ZCHandle handle, ZCContext* context) -> ZCError
- auto zcSetTrackingEnabled(ZCContext context, ZSBool isEnabled) -> ZCError
- auto zcIsTrackingEnabled(ZCContext context, ZSBool* isEnabled) -> ZCError
- auto zcGetRuntimeVersion(ZCContext context, ZSInt32* major, ZSInt32* minor, ZSInt32* patch) -> ZCError
- auto zcGetErrorString(ZCError error, char* buffer, ZSInt32 bufferSize) -> ZCError
Enum documentation
enum ZCError
Defines the error codes returned by all Core SDK functions.
Typedef documentation
Function documentation
ZCError zcInitialize(ZCContext* context)
Parameters | |
---|---|
context out | A handle to the internal state of the zSpace SDK. |
Loads the zSpace SDK runtime library and detects connected peripherals. For the detected peripherals, zcInitialize() creates instances of all underlying Displays, TrackerDevices, and TrackerTargets.
ZCError zcUpdate(ZCContext context)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
Updates the underlying state of the SDK. This includes polling and caching tracker target pose information. Additionally, any stereo frustums will receive the latest pose information from the default head target. Call this once per frame.
ZCError zcShutDown(ZCContext context)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
Frees allocated memory and unloads plugins. Call this on application shutdown.
ZCError zcGetContext(ZCHandle handle, ZCContext* context)
Parameters | |
---|---|
handle in | An arbitrary object handle. |
context out | A handle to the internal state of the zSpace SDK. |
Gets the handle's associated context.
ZCError zcSetTrackingEnabled(ZCContext context, ZSBool isEnabled)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
isEnabled in | True to enable tracking, false to disable it. |
Sets whether or not tracking for all devices is enabled.
ZCError zcIsTrackingEnabled(ZCContext context, ZSBool* isEnabled)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
isEnabled out | True if enabled, false otherwise. |
Checks whether tracking for all devices is enabled.
ZCError zcGetRuntimeVersion(ZCContext context, ZSInt32* major, ZSInt32* minor, ZSInt32* patch)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
major out | The major component of the revision number. |
minor out | The minor component of the revision number. |
patch out | The patch component of the revision number. |
Gets the version of the runtime that has been loaded by zcInitialize(). The version is in the following format: major.minor.patch
ZCError zcGetErrorString(ZCError error, char* buffer, ZSInt32 bufferSize)
Parameters | |
---|---|
error in | The error code. |
buffer out | The user allocated character buffer to store the error string. |
bufferSize in | The size of the user allocated character buffer. |
Gets the string literal for a specified error code.