Target Vibration API module

Contents

This set of functions controls the vibration of a tracker target. Currently only the zSpace stylus supports this capability. The vibration consists of alternating on and off periods. You can specify the length of the on and off periods, as well as how many times the vibration repeats. Alternatively, you can use predefined vibration patterns.

Functions

auto zcSetTargetVibrationEnabled(ZCHandle targetHandle, ZSBool isVibrationEnabled) -> ZCError
auto zcIsTargetVibrationEnabled(ZCHandle targetHandle, ZSBool* isVibrationEnabled) -> ZCError
auto zcIsTargetVibrating(ZCHandle targetHandle, ZSBool* isVibrating) -> ZCError
auto zcStartTargetVibration(ZCHandle targetHandle, ZSFloat onPeriod, ZSFloat offPeriod, ZSInt32 numTimes, ZSFloat intensity) -> ZCError
auto zcStopTargetVibration(ZCHandle targetHandle) -> ZCError

Function documentation

ZCError zcSetTargetVibrationEnabled(ZCHandle targetHandle, ZSBool isVibrationEnabled)

Parameters
targetHandle in A handle to the tracker target.
isVibrationEnabled in True to enable the vibration, false otherwise.

Sets whether a tracker target's vibration is enabled.

ZCError zcIsTargetVibrationEnabled(ZCHandle targetHandle, ZSBool* isVibrationEnabled)

Parameters
targetHandle in A handle to the tracker target.
isVibrationEnabled out True if enabled, false otherwise.

Checks whether a tracker target's vibration is enabled.

ZCError zcIsTargetVibrating(ZCHandle targetHandle, ZSBool* isVibrating)

Parameters
targetHandle in A handle to the tracker target.
isVibrating out True if vibrating, false otherwise.

Checks whether a tracker target is currently vibrating.

ZCError zcStartTargetVibration(ZCHandle targetHandle, ZSFloat onPeriod, ZSFloat offPeriod, ZSInt32 numTimes, ZSFloat intensity)

Parameters
targetHandle in A handle to the tracker target.
onPeriod in The duration in seconds of the vibration.
offPeriod in The duration in seconds between vibrations.
numTimes in The number of times the vibration occurs:
-1 -> Vibrate until zcStopTargetVibration() is called
0 -> Do nothing
N -> Vibrate N times
intensity in The intensity of the vibration from 0.0 to 1.0. Currently
intensities at 0.1 intervals are supported (i.e. 0.1, 0.2,
..., 0.9, 1.0). Intensity values not specified at a valid
interval will be rounded down to the nearest valid interval.

Starts the vibration for the specified on period, off period, number of times, and intensity.

ZCError zcStopTargetVibration(ZCHandle targetHandle)

Parameters
targetHandle in A handle to the tracker target.

Interrupts the tracker target's vibration. This is meant to be called while a tracker target is in mid-vibration.