P-E-R-R-Y
Utilitaires, contrats et vendors du moteur, en une seule doc
Loading...
Searching...
No Matches
RayGamepad Class Reference

#include <RayGamepad.hpp>

Inheritance diagram for RayGamepad:
Collaboration diagram for RayGamepad:

Public Member Functions

 RayGamepad (int index=0)
 ~RayGamepad () override=default
bool isAvailable () const override
 notice if a gamepad is actually plugged in
bool isButtonPressed (Button button) const override
 notice if the button is pressed
bool isButtonDown (Button button) const override
 notice if the button is down
bool isButtonReleased (Button button) const override
 notice if the button is released
bool isButtonUp (Button button) const override
 notice if the button is up
float getAxisMovement (Axis axis) const override
 the movement of an axis, in [-1, 1]
Public Member Functions inherited from graphic::IGamepad
virtual ~IGamepad ()=default
 Destroy the IGamepad object.

Additional Inherited Members

Public Types inherited from graphic::IGamepad
enum  Button {
  BUTTON_UNKNOWN = -1 , BUTTON_A , BUTTON_B , BUTTON_X ,
  BUTTON_Y , BUTTON_LEFT_BUMPER , BUTTON_RIGHT_BUMPER , BUTTON_BACK ,
  BUTTON_START , BUTTON_LEFT_THUMB , BUTTON_RIGHT_THUMB , BUTTON_DPAD_UP ,
  BUTTON_DPAD_RIGHT , BUTTON_DPAD_DOWN , BUTTON_DPAD_LEFT , BUTTON_LENGTH
}
enum  Axis {
  AXIS_LEFT_X , AXIS_LEFT_Y , AXIS_RIGHT_X , AXIS_RIGHT_Y ,
  AXIS_LEFT_TRIGGER , AXIS_RIGHT_TRIGGER , AXIS_LENGTH
}

Constructor & Destructor Documentation

◆ RayGamepad()

RayGamepad::RayGamepad ( int index = 0)
inline

◆ ~RayGamepad()

RayGamepad::~RayGamepad ( )
overridedefault

Member Function Documentation

◆ getAxisMovement()

float RayGamepad::getAxisMovement ( Axis axis) const
inlineoverridevirtual

the movement of an axis, in [-1, 1]

Parameters
axis
Returns
float

Implements graphic::IGamepad.

◆ isAvailable()

bool RayGamepad::isAvailable ( ) const
inlineoverridevirtual

notice if a gamepad is actually plugged in

Returns
bool

Implements graphic::IGamepad.

◆ isButtonDown()

bool RayGamepad::isButtonDown ( Button button) const
inlineoverridevirtual

notice if the button is down

Parameters
button
Returns
bool

Implements graphic::IGamepad.

◆ isButtonPressed()

bool RayGamepad::isButtonPressed ( Button button) const
inlineoverridevirtual

notice if the button is pressed

Parameters
button
Returns
bool

Implements graphic::IGamepad.

◆ isButtonReleased()

bool RayGamepad::isButtonReleased ( Button button) const
inlineoverridevirtual

notice if the button is released

Parameters
button
Returns
bool

Implements graphic::IGamepad.

◆ isButtonUp()

bool RayGamepad::isButtonUp ( Button button) const
inlineoverridevirtual

notice if the button is up

Parameters
button
Returns
bool

Implements graphic::IGamepad.


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