cgv
Loading...
Searching...
No Matches
vr::controller_input_config Struct Reference

configuration of a controller input axis More...

#include <vr_kit.h>

Public Member Functions

 controller_input_config ()
 initialize to defaults (dead_zone=precision=0;threshold=0.5)
 

Public Attributes

float dead_zone
 all input values below dead_zone are clamped to 0.
 
float precision
 if precision is larger than zero, values are rounded to multiples of precision.
 
float threshold
 if value gets larger than threshold a key press event is triggered if this is enabled.
 

Detailed Description

configuration of a controller input axis

Definition at line 19 of file vr_kit.h.

Constructor & Destructor Documentation

◆ controller_input_config()

vr::controller_input_config::controller_input_config ( )

initialize to defaults (dead_zone=precision=0;threshold=0.5)

Definition at line 7 of file vr_kit.cxx.

References dead_zone, precision, and threshold.

Member Data Documentation

◆ dead_zone

float vr::controller_input_config::dead_zone

all input values below dead_zone are clamped to 0.

For pad and stick inputs the length of the vector valued position is compared to dead_zone and the zero vector is compared inside of dead zone.

Definition at line 24 of file vr_kit.h.

Referenced by controller_input_config().

◆ precision

float vr::controller_input_config::precision

if precision is larger than zero, values are rounded to multiples of precision.

If precision is 0.02 then the value 0.031 would be rounded to 0.04.

Definition at line 27 of file vr_kit.h.

Referenced by controller_input_config().

◆ threshold

float vr::controller_input_config::threshold

if value gets larger than threshold a key press event is triggered if this is enabled.

In case input is pad or stick, a direction pad is emulated and the two thresholds are used to determine direction.

Definition at line 30 of file vr_kit.h.

Referenced by controller_input_config(), and cgv::gui::vr_server::emit_events_and_update_state().


The documentation for this struct was generated from the following files: