VTK  9.3.0
zSpaceCoreCompatibilityTypes.h
Go to the documentation of this file.
1 //
3 // Copyright (C) 2022 zSpace, Inc. All Rights Reserved.
4 //
6 
7 #ifndef __ZSPACE_CORE_COMPATIBILITY_TYPES_H__
8 #define __ZSPACE_CORE_COMPATIBILITY_TYPES_H__
9 
10 #include "zSpaceTypes.h"
11 
12 
13 #if defined(__cplusplus)
14 extern "C" {
15 #endif
16 
18 // Handle Types
20 
21 struct ZCCompatContextOpaque;
22 typedef struct ZCCompatContextOpaque* ZCCompatContext;
23 
24 struct ZCCompatDisplayOpaque;
25 typedef struct ZCCompatDisplayOpaque* ZCCompatDisplay;
26 
27 struct ZCCompatViewportOpaque;
28 typedef struct ZCCompatViewportOpaque* ZCCompatViewport;
29 
30 struct ZCCompatFrustumOpaque;
31 typedef struct ZCCompatFrustumOpaque* ZCCompatFrustum;
32 
33 struct ZCCompatTargetOpaque;
34 typedef struct ZCCompatTargetOpaque* ZCCompatTarget;
35 
36 
38 // Enums
40 
41 // Defines the error codes returned by all Core SDK functions.
42 typedef enum ZCCompatError
43 {
63 
64 
65 // Defines the log level values passed to logging functions.
66 typedef enum ZCCompatLogLevel
67 {
73 
74 
75 // Defines the types of displays for the Display APIs.
76 typedef enum ZCCompatDisplayType
77 {
82 
83 
84 // Defines the attributes that you can query for the display using
85 // zccompatGetDisplayAttributeStr().
87 {
88  // The graphics adapter name.
90  // The graphics adapter context string.
92  // The entire ID string of the graphics adapter.
94  // The vendor ID of the graphics adapter.
96  // The device ID of the graphics adapter.
98  // Reserved.
100  // The monitor name.
102  // The monitor context string.
104  // The entire ID string of the monitor.
106  // The vendor ID of the monitor.
108  // The device ID of the monitor.
110  // Reserved.
112  // The display's manufacturer name.
114  // The display's product code.
116  // The display's serial number.
118  // The display's video interface.
120  // The display's hardware model (currently only supported for zSpace
121  // displays).
124 
125 
126 // Defines the eyes for the Stereo Frustum API. This enum is also used by the
127 // Stereo Buffer API.
128 typedef enum ZCCompatEye
129 {
134 
135 
136 // Defines the coordinate spaces used by the zSpace Core SDK. This enum is used
137 // by both the Coordinate Space API and the Stereo Frustum API.
139 {
145 
146 
147 // Defines the attributes that you can set and query for the StereoFrustum.
148 // These attributes are important for comfortable viewing of stereoscopic 3D.
150 {
151  // Float Attributes
152 
153  // The physical separation, or inter-pupillary distance, between the eyes
154  // in meters.
155  //
156  // An IPD of 0 will effectively disable stereo since the eyes are assumed
157  // to be at the same location. (Default: 0.060)
159 
160  // Viewer scale adjusts the display and head tracking for larger and
161  // smaller scenes. (Default: 1)
162  //
163  // Use larger values for scenes with large models and smaller values for
164  // smaller models.
166 
167  // Uniform scale factor applied to the frustum's incoming head pose.
168  // (Default: 1)
170 
171  // Near clipping plane for the frustum in meters. (Default: 0.1)
173 
174  // Far clipping plane for the frustum in meters. (Default: 1000)
176 
177  // Distance between the bridge of the glasses and the bridge of the nose in
178  // meters. (Default: 0.01)
180 
181  // Maximum pixel disparity for crossed images (negative parallax) in the
182  // coupled zone. (Default: -100)
183  //
184  // The coupled zone refers to the area where our eyes can both comfortably
185  // converge and focus on an object.
187 
188  // Maximum pixel disparity for uncrossed images (positive parallax) in the
189  // coupled zone. (Default: 100)
191 
192  // Maximum pixel disparity for crossed images (negative parallax) in the
193  // uncoupled zone. (Default: -200)
195 
196  // Maximum pixel disparity for uncrossed images (positive parallax) in the
197  // uncoupled zone. (Default: 250)
199 
200  // Maximum depth in meters for negative parallax in the coupled zone.
201  // (Default: 0.13)
203 
204  // Maximum depth in meters for positive parallax in the coupled zone.
205  // (Default: -0.30)
207 
208  // Display angle in degrees about the X axis. (Default: 30.0)
209  //
210  // Is only used when ZC_PORTAL_MODE_ANGLE is not enabled on the frustum.
212 
213  // Display angle in degrees about the Y axis. (Default: 0.0)
214  //
215  // Is only used when ZC_PORTAL_MODE_ANGLE is not enabled on the frustum.
217 
218  // Display angle in degrees about the Z axis. (Default: 0.0)
219  //
220  // Is only used when ZC_PORTAL_MODE_ANGLE is not enabled on the frustum.
222 
223  // The delay in seconds before the automatic transition from stereo to
224  // mono begins. (Default: 5.0)
226 
227  // The duration in seconds of the automatic transition from stereo to
228  // mono. (Default: 1.0)
230 
231 
232  // Boolean Attributes
233 
234  // Flag controlling whether the automatic transition from stereo to mono
235  // is enabled. (Default: true)
237 
239 
240 
241 // Defines the types of tracker targets.
242 typedef enum ZCCompatTargetType
243 {
244  // The tracker target corresponding to the user's head.
246  // The tracker target corresponding to the user's primary hand.
248  // The tracker target corresponding to the user's secondary hand.
249  // (Reserved for future use.)
251 
252  // The tracker target corresponding to the user's left eye.
254  // The tracker target corresponding to the user's right eye.
256  // The tracker target that is halfway between the user's left and righ
257  // eyes.
260 
261 
262 // Defines mouse buttons to be used when mapping a tracker target's buttons to
263 // a mouse.
265 {
271 
272 
273 // Determines how the stylus and mouse control the cursor when both are used.
275 {
276  // The stylus uses absolute positions. In this mode, the mouse and stylus
277  // can fight for control of the cursor if both are in use.
278  //
279  // This is the default mode.
281 
282  // The stylus applies delta positions to the mouse cursor's current
283  // position.
284  //
285  // Movements by the mouse and stylus are compounded without fighting.
288 
289 
290 // Defines the possible modes for display stereo content.
292 {
296 
297 
299 // Function Pointer Types
301 
303  void* userData,
305  const char* file,
306  ZSInt32 line,
307  const char* function,
308  const char* message);
309 
310 
312 // Compound Types
314 
315 // Ensure 8 byte packing.
316 #pragma pack(push, 8)
317 
318 // Struct representing display intersection information.
320 {
321  // Whether or not the display was intersected.
323  // The x pixel coordinate on the virtual desktop.
325  // The y pixel coordinate on the virtual desktop.
327  // The normalized absolute x pixel coordinate on the virtual desktop.
329  // The normalized absolute y pixel coordinate on the virtual desktop.
331  // The distance from origin of the raycast to the point of intersection on
332  // the display in meters.
335 
336 
337 // Union representing frustum bounds.
339 {
340  ZSFloat f[6];
341  struct
342  {
349  };
351 
352 
353 // Struct representing tracker pose information.
354 //
355 // This structure is used by the Tracker Target, Display, and Stereo Frustum
356 // APIs.
357 typedef struct ZCCompatTrackerPose
358 {
359  // The time that the pose was captured (represented in seconds since last
360  // system reboot).
362  // The tracker-space position and orientation in 4x4 matrix format.
365 
366 #pragma pack(pop)
367 
368 #if defined(__cplusplus)
369 } /* extern "C" */
370 #endif
371 
372 #endif // __ZSPACE_CORE_COMPATIBILITY_TYPES_H__
float ZSFloat
Definition: zSpaceTypes.h:52
ZSInt8 ZSBool
Definition: zSpaceTypes.h:51
double ZSDouble
Definition: zSpaceTypes.h:53
int ZSInt32
Definition: zSpaceTypes.h:41
@ level
Definition: vtkX3D.h:395
Union representing 4x4 matrix (right-handed OpenGL column-major format). / This structure is used by ...
Definition: zSpaceTypes.h:80
struct ZCCompatTargetOpaque * ZCCompatTarget
@ ZC_COMPAT_MOUSE_BUTTON_UNKNOWN
@ ZC_COMPAT_MOUSE_BUTTON_RIGHT
@ ZC_COMPAT_MOUSE_BUTTON_LEFT
@ ZC_COMPAT_MOUSE_BUTTON_CENTER
@ ZC_COMPAT_STEREO_DISPLAY_MODE_STEREO_DISPLAY_API
@ ZC_COMPAT_STEREO_DISPLAY_MODE_QUAD_BUFFER_STEREO
struct ZCCompatTrackerPose ZCCompatTrackerPose
@ ZC_COMPAT_LOG_LEVEL_ERROR
@ ZC_COMPAT_LOG_LEVEL_DEBUG
@ ZC_COMPAT_LOG_LEVEL_WARNING
@ ZC_COMPAT_LOG_LEVEL_INFO
@ ZC_COMPAT_COORDINATE_SPACE_VIEWPORT
@ ZC_COMPAT_COORDINATE_SPACE_CAMERA
@ ZC_COMPAT_COORDINATE_SPACE_DISPLAY
@ ZC_COMPAT_COORDINATE_SPACE_TRACKER
@ ZC_COMPAT_TARGET_TYPE_EYE_CENTER
@ ZC_COMPAT_TARGET_TYPE_HEAD
@ ZC_COMPAT_TARGET_TYPE_SECONDARY
@ ZC_COMPAT_TARGET_TYPE_EYE_LEFT
@ ZC_COMPAT_TARGET_TYPE_PRIMARY
@ ZC_COMPAT_TARGET_TYPE_EYE_RIGHT
struct ZCCompatDisplayOpaque * ZCCompatDisplay
union ZCCompatFrustumBounds ZCCompatFrustumBounds
struct ZCCompatViewportOpaque * ZCCompatViewport
void(* ZCCompatLogFuncFuncPtrType)(void *userData, ZCCompatLogLevel level, const char *file, ZSInt32 line, const char *function, const char *message)
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_DISPLAY_ANGLE_Y
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_IPD
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_AUTO_STEREO_DURATION
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_NEAR_CLIP
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_VIEWER_SCALE
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_DISPLAY_ANGLE_X
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_UC_LIMIT
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_UC_DEPTH
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_CU_LIMIT
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_UU_LIMIT
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_DISPLAY_ANGLE_Z
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_AUTO_STEREO_ENABLED
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_CC_LIMIT
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_FAR_CLIP
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_AUTO_STEREO_DELAY
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_GLASSES_OFFSET
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_CC_DEPTH
@ ZC_COMPAT_FRUSTUM_ATTRIBUTE_HEAD_SCALE
struct ZCCompatContextOpaque * ZCCompatContext
struct ZCCompatFrustumOpaque * ZCCompatFrustum
@ ZC_COMPAT_MOUSE_MOVEMENT_MODE_RELATIVE
@ ZC_COMPAT_MOUSE_MOVEMENT_MODE_ABSOLUTE
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MODEL
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_PRODUCT_CODE
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MONITOR_NAME
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_ADAPTER_VENDOR_ID
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MONITOR_KEY
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MONITOR_VENDOR_ID
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_SERIAL_NUMBER
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_VIDEO_INTERFACE
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_ADAPTER_ID
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_ADAPTER_STRING
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_ADAPTER_KEY
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MANUFACTURER_NAME
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_ADAPTER_DEVICE_ID
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MONITOR_DEVICE_ID
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MONITOR_STRING
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_ADAPTER_NAME
@ ZC_COMPAT_DISPLAY_ATTRIBUTE_MONITOR_ID
@ ZC_COMPAT_DISPLAY_TYPE_GENERIC
@ ZC_COMPAT_DISPLAY_TYPE_ZSPACE
@ ZC_COMPAT_DISPLAY_TYPE_UNKNOWN
struct ZCCompatDisplayIntersectionInfo ZCCompatDisplayIntersectionInfo
@ ZC_COMPAT_ERROR_RUNTIME_INCOMPATIBLE
@ ZC_COMPAT_ERROR_INVALID_HANDLE
@ ZC_COMPAT_ERROR_OPERATION_FAILED
@ ZC_COMPAT_ERROR_SYNC_FAILED
@ ZC_COMPAT_ERROR_SYMBOL_NOT_FOUND
@ ZC_COMPAT_ERROR_NOT_IMPLEMENTED
@ ZC_COMPAT_ERROR_NOT_INITIALIZED
@ ZC_COMPAT_ERROR_INVALID_PARAMETER
@ ZC_COMPAT_ERROR_ALREADY_INITIALIZED
@ ZC_COMPAT_ERROR_RUNTIME_NOT_FOUND
@ ZC_COMPAT_ERROR_INVALID_CONTEXT
@ ZC_COMPAT_ERROR_TARGET_NOT_FOUND
@ ZC_COMPAT_ERROR_CAPABILITY_NOT_FOUND
@ ZC_COMPAT_ERROR_INVALID_ATTRIBUTE
@ ZC_COMPAT_ERROR_DISPLAY_NOT_FOUND
@ ZC_COMPAT_ERROR_BUFFER_TOO_SMALL
@ ZC_COMPAT_ERROR_DEVICE_NOT_FOUND