Target Vibration

Detailed Description

Use these functions to control 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.

List of Functions

void  ZSCore::SetTrackerTargetVibrationEnabled (TrackerTargetType trackerTargetType, bool isVibrationEnabled)
  Set whether the tracker target's vibration is enabled.
bool  ZSCore::IsTrackerTargetVibrationEnabled (TrackerTargetType trackerTargetType)
  Check whether the tracker target's vibration is enabled.
bool  ZSCore::IsTrackerTargetVibrating (TrackerTargetType trackerTargetType)
  Check whether the tracker target is currently vibrating.
void  ZSCore::StartTrackerTargetVibration (TrackerTargetType trackerTargetType, float onPeriod, float offPeriod, int numTimes)
  Start vibrating the tracker target based on a specified on period, off period, and number of times.
void  ZSCore::StopTrackerTargetVibration (TrackerTargetType trackerTargetType)
  Stop vibrating the tracker target if it is currently vibrating.

Function Descriptions

bool ZSCore:: IsTrackerTargetVibrating ( TrackerTargetType  trackerTargetType ) [inline]

Check whether the tracker target is currently vibrating.

Parameters:
trackerTargetType The type of tracker target.
Returns:
True if vibrating. False if not.
bool ZSCore:: IsTrackerTargetVibrationEnabled ( TrackerTargetType  trackerTargetType ) [inline]

Check whether the tracker target's vibration is enabled.

Parameters:
trackerTargetType The type of tracker target.
Returns:
True if vibration is enabled. False if not.
void ZSCore:: SetTrackerTargetVibrationEnabled ( TrackerTargetType  trackerTargetType,
bool  isVibrationEnabled 
) [inline]

Set whether the tracker target's vibration is enabled.

This only determines whether the appropriate command is sent to the hardware if StartTrackerTargetVibration() is called. If the tracker target is already vibrating, call StopTrackerTargetVibration() to stop the current vibration.

Parameters:
trackerTargetType The type of tracker target.
isVibrationEnabled True to enable vibration. False if not.
void ZSCore:: StartTrackerTargetVibration ( TrackerTargetType  trackerTargetType,
float  onPeriod,
float  offPeriod,
int  numTimes 
) [inline]

Start vibrating the tracker target based on a specified on period, off period, and number of times.

Parameters:
trackerTargetType The type of tracker target.
onPeriod The duration in seconds of the vibration.
offPeriod The duration in seconds between vibrations.
numTimes The number of times the vibration occurs:
-1 -> Vibrate infinitely
0 -> Do nothing
N -> Vibrate N times
void ZSCore:: StopTrackerTargetVibration ( TrackerTargetType  trackerTargetType ) [inline]

Stop vibrating the tracker target if it is currently vibrating.

If StartTrackerTargetVibration() is called again, the tracker target will start vibrating the full sequence of "on" and "off" cycles.