Detailed Description
You can create as many stereo viewports as you need. In other words, your application has a 1-to-many relationship with stereo viewports. Each viewport has its own frustum, which the SDK creates for you.
Function Descriptions
ZSError zsCreateViewport |
( |
ZSContext |
context, |
|
|
ZSHandle* |
viewportHandle |
|
) |
|
|
Creates a stereo viewport.
- Parameters:
-
[in] |
context |
A handle to the internal state of the zSpace SDK. |
[out] |
viewportHandle |
A handle to the viewport. |
ZSError zsDestroyViewport |
( |
ZSHandle |
viewportHandle
|
) |
|
Destroys a stereo viewport.
- Note:
- Calling zsShutdown() will free any viewports that have not been explicitly destroyed by calling zsDestroyViewport().
- Parameters:
-
[in] |
viewportHandle |
A handle to the viewport. |
ZSError zsGetViewportPosition |
( |
ZSHandle |
viewportHandle, |
|
|
ZSInt32* |
x, |
|
|
ZSInt32* |
y |
|
) |
|
|
Gets the viewport's absolute virtual desktop coordinates (top-left corner).
- Parameters:
-
[in] |
viewportHandle |
A handle to the viewport. |
[out] |
x |
The x coordinate for the upper left corner of the viewport. |
[out] |
y |
The y coordinate for the upper left corner of the viewport. |
ZSError zsGetViewportSize |
( |
ZSHandle |
viewportHandle, |
|
|
ZSInt32* |
width, |
|
|
ZSInt32* |
height |
|
) |
|
|
Gets the viewport's size in pixels.
- Parameters:
-
[in] |
viewportHandle |
A handle to the viewport. |
[out] |
width |
The width of the viewport in pixels. |
[out] |
height |
The height of the viewport in pixels. |
ZSError zsSetViewportPosition |
( |
ZSHandle |
viewportHandle, |
|
|
ZSInt32 |
x, |
|
|
ZSInt32 |
y |
|
) |
|
|
Sets the viewport's absolute virtual desktop coordinates (top-left corner).
- Parameters:
-
[in] |
viewportHandle |
A handle to the viewport. |
[in] |
x |
The x coordinate for the upper left corner of the viewport. |
[in] |
y |
The y coordinate for the upper left corner of the viewport. |
ZSError zsSetViewportSize |
( |
ZSHandle |
viewportHandle, |
|
|
ZSInt32 |
width, |
|
|
ZSInt32 |
height |
|
) |
|
|
Sets the viewport's size in pixels.
- Parameters:
-
[in] |
viewportHandle |
A handle to the viewport. |
[in] |
width |
The width of the viewport in pixels. |
[in] |
height |
The height of the viewport in pixels. |