Annwvyn::AnnControllerAxis Class Reference

A joystick axis. More...

#include <AnnEvents.hpp>

Public Member Functions

 AnnControllerAxis ()
 This constructor will produce an invalid stick axis object. More...
 
ControllerAxisID getAxisId () const
 Get the ID if this axis. More...
 
float getRelValue () const
 Compute a float number between -1 and 1. if relative value isn't supported by the input, will return INVALID (42) More...
 
float getAbsValue () const
 Compute a float number between -1 and 1. More...
 

Private Member Functions

void setAxis (ControllerAxisID ax)
 Set the ID of the axis. More...
 
void setRelValue (int rel)
 Set a relative value. More...
 
void setAbsValue (int abs)
 Set an absolute value. More...
 
 AnnControllerAxis (ControllerAxisID ax, int rel, int abs)
 Real constructor. More...
 

Private Attributes

int a
 Raw values. More...
 
int r
 
ControllerAxisID id
 
bool noRel
 True if the there's no "relative" value. More...
 

Friends

class AnnEventManager
 
class AnnControllerEvent
 

Detailed Description

A joystick axis.

Definition at line 163 of file AnnEvents.hpp.

Constructor & Destructor Documentation

◆ AnnControllerAxis() [1/2]

AnnControllerAxis::AnnControllerAxis ( )

This constructor will produce an invalid stick axis object.

Definition at line 152 of file AnnEvents.cpp.

Here is the call graph for this function:

◆ AnnControllerAxis() [2/2]

AnnControllerAxis::AnnControllerAxis ( ControllerAxisID  ax,
int  rel,
int  abs 
)
private

Real constructor.

Definition at line 165 of file AnnEvents.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getAbsValue()

float AnnControllerAxis::getAbsValue ( ) const

Compute a float number between -1 and 1.

Definition at line 194 of file AnnEvents.cpp.

◆ getAxisId()

ControllerAxisID AnnControllerAxis::getAxisId ( ) const

Get the ID if this axis.

Definition at line 160 of file AnnEvents.cpp.

◆ getRelValue()

float AnnControllerAxis::getRelValue ( ) const

Compute a float number between -1 and 1. if relative value isn't supported by the input, will return INVALID (42)

Definition at line 188 of file AnnEvents.cpp.

◆ setAbsValue()

void AnnControllerAxis::setAbsValue ( int  abs)
private

Set an absolute value.

Definition at line 178 of file AnnEvents.cpp.

Here is the caller graph for this function:

◆ setAxis()

void AnnControllerAxis::setAxis ( ControllerAxisID  ax)
private

Set the ID of the axis.

Definition at line 183 of file AnnEvents.cpp.

Here is the caller graph for this function:

◆ setRelValue()

void AnnControllerAxis::setRelValue ( int  rel)
private

Set a relative value.

Definition at line 172 of file AnnEvents.cpp.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ AnnControllerEvent

friend class AnnControllerEvent
friend

Definition at line 177 of file AnnEvents.hpp.

◆ AnnEventManager

friend class AnnEventManager
friend

Definition at line 176 of file AnnEvents.hpp.

Member Data Documentation

◆ a

int Annwvyn::AnnControllerAxis::a
private

Raw values.

Definition at line 180 of file AnnEvents.hpp.

◆ id

ControllerAxisID Annwvyn::AnnControllerAxis::id
private

Definition at line 181 of file AnnEvents.hpp.

◆ noRel

bool Annwvyn::AnnControllerAxis::noRel
private

True if the there's no "relative" value.

Definition at line 191 of file AnnEvents.hpp.

◆ r

int Annwvyn::AnnControllerAxis::r
private

Definition at line 180 of file AnnEvents.hpp.


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