cgv
Loading...
Searching...
No Matches
gamepad::gamepad_state Struct Reference

see https://upload.wikimedia.org/wikipedia/commons/2/2c/360_controller.svg for an explanation of the positions in the state More...

#include <gamepad.h>

Public Member Functions

 gamepad_state ()
 initialize state
 

Public Attributes

unsigned time_stamp
 time stamp can be used whether a change has happened between two states
 
unsigned button_flags
 combination of flags in GamepadButtonStateFlags combined with the OR operation
 
float left_stick_position [2]
 x and y position of left thumb in the range [-1,1]
 
float right_stick_position [2]
 x and y position of left thumb in the range [-1,1]
 
float trigger_position [2]
 values of left and right triggers in the range [0,1]
 

Detailed Description

see https://upload.wikimedia.org/wikipedia/commons/2/2c/360_controller.svg for an explanation of the positions in the state

Definition at line 151 of file gamepad.h.

Constructor & Destructor Documentation

◆ gamepad_state()

gamepad::gamepad_state::gamepad_state ( )

initialize state

Definition at line 101 of file gamepad.cxx.

References button_flags, left_stick_position, right_stick_position, time_stamp, and trigger_position.

Member Data Documentation

◆ button_flags

unsigned gamepad::gamepad_state::button_flags

combination of flags in GamepadButtonStateFlags combined with the OR operation

Definition at line 156 of file gamepad.h.

Referenced by cgv::gui::gamepad_server::check_and_emit_events(), and gamepad_state().

◆ left_stick_position

float gamepad::gamepad_state::left_stick_position[2]

x and y position of left thumb in the range [-1,1]

Definition at line 158 of file gamepad.h.

Referenced by cgv::gui::gamepad_server::check_and_emit_events(), and gamepad_state().

◆ right_stick_position

float gamepad::gamepad_state::right_stick_position[2]

x and y position of left thumb in the range [-1,1]

Definition at line 160 of file gamepad.h.

Referenced by cgv::gui::gamepad_server::check_and_emit_events(), and gamepad_state().

◆ time_stamp

unsigned gamepad::gamepad_state::time_stamp

time stamp can be used whether a change has happened between two states

Definition at line 154 of file gamepad.h.

Referenced by cgv::gui::gamepad_server::check_and_emit_events(), and gamepad_state().

◆ trigger_position

float gamepad::gamepad_state::trigger_position[2]

values of left and right triggers in the range [0,1]

Definition at line 162 of file gamepad.h.

Referenced by cgv::gui::gamepad_server::check_and_emit_events(), and gamepad_state().


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