CybSDK C++  4.3
Public Member Functions
CybSDK::VirtDevice Class Referenceabstract

Main interface all Virtualizer Devices have to implement. More...

#include <CVirtDevice.h>

Public Member Functions

virtual bool Open ()=0
 Opens the connection to the Virtualizer device. More...
 
virtual bool IsOpen () const =0
 Checks if the connection was opened before.
 
virtual bool Close ()=0
 Closes the connection to the Virtualizer device.
 
virtual const VirtDeviceInfoGetDeviceInfo () const =0
 Returns the USB infos of this device.
 
virtual float GetPlayerHeight () const =0
 Returns the current player height relative to the default height. More...
 
virtual void ResetPlayerHeight ()=0
 Assigns the current height to the default height. More...
 
virtual float GetPlayerOrientation () const =0
 Returns the orientation of the player as an absolute value. More...
 
virtual void ResetPlayerOrientation ()=0
 Assigns the current orientation to the default vector. More...
 
virtual float GetMovementSpeed () const =0
 Returns the current movement speed in meters per second. More...
 
virtual float GetMovementDirection () const =0
 Returns the movement direction relative to the current player orientation. More...
 
virtual bool HasHaptic () const =0
 Checks if the Virtualizer device supports haptic feedback.
 
virtual void HapticPlay ()=0
 Play a signal on the haptic unit.
 
virtual void HapticStop ()=0
 Stop the haptic unit.
 
virtual void HapticSetGain (int gain)=0
 Set the gain (dB) level of the haptic unit. More...
 
virtual void HapticSetFrequency (int frequency)=0
 Set the frequency (Hz) of a sine wave on the haptic unit. More...
 
virtual void HapticSetVolume (int volume)=0
 Sets the haptic feedback (change of amplitude) in the baseplate. More...
 

Detailed Description

Main interface all Virtualizer Devices have to implement.

Member Function Documentation

◆ Open()

virtual bool CybSDK::VirtDevice::Open ( )
pure virtual

Opens the connection to the Virtualizer device.

Remarks
No other application can open this device at the same time.
Returns
true if the connection was successfully opened, otherwise false.

◆ GetPlayerHeight()

virtual float CybSDK::VirtDevice::GetPlayerHeight ( ) const
pure virtual

Returns the current player height relative to the default height.

Remarks
The default height is set by the ResetPlayerHeight method.
height < -threshold: crouching
height > threshold: jumping
Returns
1.00f = 1cm.

◆ ResetPlayerHeight()

virtual void CybSDK::VirtDevice::ResetPlayerHeight ( )
pure virtual

Assigns the current height to the default height.

Remarks
This method should be called while the player is asked to stand upright.

◆ GetPlayerOrientation()

virtual float CybSDK::VirtDevice::GetPlayerOrientation ( ) const
pure virtual

Returns the orientation of the player as an absolute value.

Remarks
The origin is set by the ResetPlayerOrientation method and increases clockwise.
Returns
logical: 0.00f to 1.00f (= physical: 0° to 360°).

◆ ResetPlayerOrientation()

virtual void CybSDK::VirtDevice::ResetPlayerOrientation ( )
pure virtual

Assigns the current orientation to the default vector.

Remarks
This method should be called while the player is asked to look forward.
This orientation should be used to calibrate the HMD.
Deprecated:
Unused as new Virtualizers orient themselves automatically.

◆ GetMovementSpeed()

virtual float CybSDK::VirtDevice::GetMovementSpeed ( ) const
pure virtual

Returns the current movement speed in meters per second.

Returns
1.00f = 1m/s

◆ GetMovementDirection()

virtual float CybSDK::VirtDevice::GetMovementDirection ( ) const
pure virtual

Returns the movement direction relative to the current player orientation.

Remarks
The origin is the GetPlayerOrientation method and increases clockwise.
Returns
logical: -1.00f to 1.00f (= physical: -180° to 180°).

◆ HapticSetGain()

virtual void CybSDK::VirtDevice::HapticSetGain ( int  gain)
pure virtual

Set the gain (dB) level of the haptic unit.

Parameters
gainThe value can be 0, 1, 2 or 3.

◆ HapticSetFrequency()

virtual void CybSDK::VirtDevice::HapticSetFrequency ( int  frequency)
pure virtual

Set the frequency (Hz) of a sine wave on the haptic unit.

Parameters
frequencyThe value is valid between 10Hz and 80Hz.

◆ HapticSetVolume()

virtual void CybSDK::VirtDevice::HapticSetVolume ( int  volume)
pure virtual

Sets the haptic feedback (change of amplitude) in the baseplate.

Parameters
volumeThe value is valid between 0 (no feedback) and 100 (full feedback).

The documentation for this class was generated from the following file: