class Sp_Joy: public Sp_Control, public Stk_PassiveSender

The class Sp_Joy is used to read joystick information This class allows joystick to send Messages too

Inheritance:


Public Methods

[more] Sp_Joy(char *, Stk_Looper *)
constructor: Warning if you choose to have default joystick give a null pointer
[more]virtual ~Sp_Joy()
destructor
[more]int IsPresent() const
Is the joy present ?
[more]void ReadState()
Read the state of joystick
[more]void Print() const
Print information about this joystick
[more]float getPositionAxeX() const
Get the position af axe X
[more]float getPositionAxeY() const
Get the position of axe Y
[more]float getButton1() const
Get State of button 1
[more]float getButton2() const
Get State of button 2
[more]float getButton3() const
Get State of button 3
[more]float getButton4() const
Get State of button 4
[more]int Loop()
loop: functions wich generates events


Inherited from Sp_Control:

Public Methods

ofloat getPositionAxeZ() const


Inherited from Stk_PassiveSender:

Public Methods

ovoid PostMessage(Stk_Message *)


Documentation

The class Sp_Joy is used to read joystick information This class allows joystick to send Messages too. message button has two fields:
- button : axe or buttons
- pressed: active or not
Let explain the protocol:
UP 100
DOWN 101
RIGHT 102
LEFT 103
B1 110
B2 111
B3 112
B4 113
o Sp_Joy(char *, Stk_Looper *)
constructor: Warning if you choose to have default joystick give a null pointer

ovirtual ~Sp_Joy()
destructor

oint IsPresent() const
Is the joy present ?

ovoid ReadState()
Read the state of joystick

ovoid Print() const
Print information about this joystick

ofloat getPositionAxeX() const
Get the position af axe X

ofloat getPositionAxeY() const
Get the position of axe Y

ofloat getButton1() const
Get State of button 1

ofloat getButton2() const
Get State of button 2

ofloat getButton3() const
Get State of button 3

ofloat getButton4() const
Get State of button 4

oint Loop()
loop: functions wich generates events


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.