Display API module
The display manager tracks all connected displays. You can use displays of different types, as well as multiple displays of the same type. For example, you could have two zSpace displays.
Classes
- struct ZCDisplayIntersectionInfo
- Struct representing display intersection information.
Enums
- enum ZCDisplayType { ZC_DISPLAY_TYPE_UNKNOWN = -1, ZC_DISPLAY_TYPE_GENERIC = 0, ZC_DISPLAY_TYPE_ZSPACE = 1 }
- enum ZCDisplayAttribute { ZC_DISPLAY_ATTRIBUTE_ADAPTER_NAME = 0, ZC_DISPLAY_ATTRIBUTE_ADAPTER_STRING = 1, ZC_DISPLAY_ATTRIBUTE_ADAPTER_ID = 2, ZC_DISPLAY_ATTRIBUTE_ADAPTER_VENDOR_ID = 3, ZC_DISPLAY_ATTRIBUTE_ADAPTER_DEVICE_ID = 4, ZC_DISPLAY_ATTRIBUTE_ADAPTER_KEY = 5, ZC_DISPLAY_ATTRIBUTE_MONITOR_NAME = 6, ZC_DISPLAY_ATTRIBUTE_MONITOR_STRING = 7, ZC_DISPLAY_ATTRIBUTE_MONITOR_ID = 8, ZC_DISPLAY_ATTRIBUTE_MONITOR_VENDOR_ID = 9, ZC_DISPLAY_ATTRIBUTE_MONITOR_DEVICE_ID = 10, ZC_DISPLAY_ATTRIBUTE_MONITOR_KEY = 11, ZC_DISPLAY_ATTRIBUTE_MANUFACTURER_NAME = 12, ZC_DISPLAY_ATTRIBUTE_PRODUCT_CODE = 13, ZC_DISPLAY_ATTRIBUTE_SERIAL_NUMBER = 14, ZC_DISPLAY_ATTRIBUTE_VIDEO_INTERFACE = 15, ZC_DISPLAY_ATTRIBUTE_MODEL = 16 }
Typedefs
- using ZCDisplayType = enum ZCDisplayType
- using ZCDisplayAttribute = enum ZCDisplayAttribute
- using ZCDisplayIntersectionInfo = struct ZCDisplayIntersectionInfo
- Struct representing display intersection information.
Functions
- auto zcRefreshDisplays(ZCContext context) -> ZCError
- auto zcGetNumDisplays(ZCContext context, ZSInt32* numDisplays) -> ZCError
- auto zcGetNumDisplaysByType(ZCContext context, ZCDisplayType displayType, ZSInt32* numDisplays) -> ZCError
- auto zcGetDisplay(ZCContext context, ZSInt32 x, ZSInt32 y, ZCHandle* displayHandle) -> ZCError
- auto zcGetDisplayByIndex(ZCContext context, ZSInt32 index, ZCHandle* displayHandle) -> ZCError
- auto zcGetDisplayByType(ZCContext context, ZCDisplayType displayType, ZSInt32 index, ZCHandle* displayHandle) -> ZCError
- auto zcGetDisplayType(ZCHandle displayHandle, ZCDisplayType* displayType) -> ZCError
- auto zcGetDisplayNumber(ZCHandle displayHandle, ZSInt32* number) -> ZCError
- auto zcGetDisplayAdapterIndex(ZCHandle displayHandle, ZSInt32* adapterIndex) -> ZCError
- auto zcGetDisplayMonitorIndex(ZCHandle displayHandle, ZSInt32* monitorIndex) -> ZCError
- auto zcGetDisplayAttributeStr(ZCHandle displayHandle, ZCDisplayAttribute attribute, char* buffer, ZSInt32 bufferSize) -> ZCError
- auto zcGetDisplayAttributeStrSize(ZCHandle displayHandle, ZCDisplayAttribute attribute, ZSInt32* size) -> ZCError
- auto zcGetDisplaySize(ZCHandle displayHandle, ZSFloat* width, ZSFloat* height) -> ZCError
- auto zcGetDisplayPosition(ZCHandle displayHandle, ZSInt32* x, ZSInt32* y) -> ZCError
- auto zcGetDisplayNativeResolution(ZCHandle displayHandle, ZSInt32* x, ZSInt32* y) -> ZCError
- auto zcGetDisplayAngle(ZCHandle displayHandle, ZSFloat* x, ZSFloat* y, ZSFloat* z) -> ZCError
- auto zcGetDisplayVerticalRefreshRate(ZCHandle displayHandle, ZSFloat* refreshRate) -> ZCError
- auto zcIsDisplayHardwarePresent(ZCHandle displayHandle, ZSBool* isHardwarePresent) -> ZCError
- auto zcIntersectDisplay(ZCHandle displayHandle, const ZCTrackerPose* pose, ZCDisplayIntersectionInfo* intersectionInfo) -> ZCError
Enum documentation
enum ZCDisplayType
Defines the types of displays for the Display APIs.
Enumerators | |
---|---|
ZC_DISPLAY_TYPE_UNKNOWN | |
ZC_DISPLAY_TYPE_GENERIC | |
ZC_DISPLAY_TYPE_ZSPACE |
enum ZCDisplayAttribute
Defines the attributes that you can query for the display. See zcGetDisplayAttributeStr().
Typedef documentation
typedef enum ZCDisplayType ZCDisplayType
Defines the types of displays for the Display APIs.
typedef enum ZCDisplayAttribute ZCDisplayAttribute
Defines the attributes that you can query for the display. See zcGetDisplayAttributeStr().
Function documentation
ZCError zcRefreshDisplays(ZCContext context)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
Refreshes all of the underlying display information.
ZCError zcGetNumDisplays(ZCContext context, ZSInt32* numDisplays)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
numDisplays out | The number of connected displays. |
Gets the number of connected displays.
ZCError zcGetNumDisplaysByType(ZCContext context, ZCDisplayType displayType, ZSInt32* numDisplays)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
displayType in | The type of display to query. |
numDisplays out | The number of displays of the specified type. |
Gets the number of connected displays based on a specified type.
ZCError zcGetDisplay(ZCContext context, ZSInt32 x, ZSInt32 y, ZCHandle* displayHandle)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
x in | The x pixel coordinate on the virtual desktop. |
y in | The y pixel coordinate on the virtual desktop. |
displayHandle out | The handle for the display at the specified pixel location. |
Gets the display handle based on the specified (x, y) pixel coordinates on the virtual desktop.
ZCError zcGetDisplayByIndex(ZCContext context, ZSInt32 index, ZCHandle* displayHandle)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
index in | The index of the display to query. |
displayHandle out | The handle for the display at the specified index. |
Gets the display handle at a specified index.
ZCError zcGetDisplayByType(ZCContext context, ZCDisplayType displayType, ZSInt32 index, ZCHandle* displayHandle)
Parameters | |
---|---|
context in | A handle to the internal state of the zSpace SDK. |
displayType in | The display type to query. |
index in | The index for the specified device of this type. |
displayHandle out | The handle for the display of the specified type. |
Gets the display handle for a specified type. Note that in this case, the index is per type. Thus if you have only one device of a given type, the index is 0.
ZCError zcGetDisplayType(ZCHandle displayHandle, ZCDisplayType* displayType)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
displayType out | The display's type. |
Gets the display's type.
ZCError zcGetDisplayNumber(ZCHandle displayHandle, ZSInt32* number)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
number out | The display's number. |
Gets the display's number. The display number refers to the number shown for the display when you set screen resolution in the Windows Control Panel.
ZCError zcGetDisplayAdapterIndex(ZCHandle displayHandle, ZSInt32* adapterIndex)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
adapterIndex out | The index of the display's GPU. |
Gets the index of the GPU that is connected to the specified display. For example, if your system contains the following GPU configuration, the adapter indexes would be:
- NVidia Quadro 3700 GPU (adapter index: 0)
- NVidia Quadro 4000 GPU (adapter index: 1)
ZCError zcGetDisplayMonitorIndex(ZCHandle displayHandle, ZSInt32* monitorIndex)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
monitorIndex out | The index for the attached monitor. |
Gets the index of the monitor attached to the display's GPU. For example, if your system contains the following GPU and display configuration, the adapter and monitor indexes would be:
- NVidia Quadro 3700 GPU (adapter index: 0)
- Generic Monitor 1 (monitor index: 0)
- Generic Monitor 2 (monitor index: 1)
- NVidia Quadro 4000 GPU (adapter index: 1)
- zStation (monitor index: 0)
ZCError zcGetDisplayAttributeStr(ZCHandle displayHandle, ZCDisplayAttribute attribute, char* buffer, ZSInt32 bufferSize)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
attribute in | The attribute to query. |
buffer out | The user allocated character buffer to hold the attribute's string value. |
bufferSize in | The size of the user allocated buffer. |
Gets the string value of the specified attribute for the display. See ZCDisplayAttribute for a list of the available attributes.
ZCError zcGetDisplayAttributeStrSize(ZCHandle displayHandle, ZCDisplayAttribute attribute, ZSInt32* size)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
attribute in | The attribute to query. |
size out | The size of the attribute's value in bytes. |
Gets the size of the specified attribute's value in bytes.
ZCError zcGetDisplaySize(ZCHandle displayHandle, ZSFloat* width, ZSFloat* height)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
width out | The display's width in meters. |
height out | The display's height in meters. |
Gets the display's size in meters.
ZCError zcGetDisplayPosition(ZCHandle displayHandle, ZSInt32* x, ZSInt32* y)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
x out | The x pixel location. |
y out | The y pixel location. |
Gets the (x, y) pixel location of the specified display on the virtual desktop (top-left corner).
ZCError zcGetDisplayNativeResolution(ZCHandle displayHandle, ZSInt32* x, ZSInt32* y)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
x out | The width in pixels. |
y out | The height in pixels. |
Gets the display's preferred native resolution in pixels.
ZCError zcGetDisplayAngle(ZCHandle displayHandle, ZSFloat* x, ZSFloat* y, ZSFloat* z)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
x out | The angle of the display about the x axis. |
y out | The angle of the display about the y axis. |
z out | The angle of the display about the z axis. |
Gets the display's angles about each axis in degrees.
ZCError zcGetDisplayVerticalRefreshRate(ZCHandle displayHandle, ZSFloat* refreshRate)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
refreshRate out | The vertical refresh rate. |
Gets the display's vertical refresh rate.
ZCError zcIsDisplayHardwarePresent(ZCHandle displayHandle, ZSBool* isHardwarePresent)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
isHardwarePresent out | True if connected, false otherwise. |
Checks if the specified display is connected via the USB port. Currently this only applies to zSpace displays.
ZCError zcIntersectDisplay(ZCHandle displayHandle, const ZCTrackerPose* pose, ZCDisplayIntersectionInfo* intersectionInfo)
Parameters | |
---|---|
displayHandle in | A handle to the display. |
pose in | A ZCTrackerPose in tracker space. |
intersectionInfo out | Struct containing information about the intersection (i.e. hit, screen position, etc.) |
Performs a raycast against the display. The incoming pose is assumed to transform the direction of the negative Z vector, which is then used for the intersection test.