Joystick.GenericController Class Reference


Detailed Description

This generic controller assumes 2 joysticks, a point of view direction pad and an assortment of buttons.

#include <class_joystick_1_1_generic_controller.h>

Inheritance diagram for Joystick.GenericController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  __init__ ()
  getName ()
  handleEvent ()
  swapSticks ()
  swapDollyAndTrackUpDown ()
  swapLookUpAndDown ()
  setOrbitMode ()
  isOrbitMode ()
  getLeftJoystickThreshold ()
  Distance from 0 the joystick has to move before something happens.
  getRightJoystickThreshold ()
  Distance from 0 the joystick has to move before something happens.
  getState ()
  setCoiTargetMode ()
  inCoiTargetMode ()
  setRollMode ()
  inRollMode ()
  getSpeed ()
  Apply a speed function to the given position.
  getLeftJoystickPosition ()
  Joystick position is an x, y value where both x and y range from -1.0 to 1.0.
  getRightJoystickPosition ()
  Joystick position is an x, y value where both x and y range from -1.0 to 1.0.
  handleLeftJoystick ()
  handleRightJoystick ()
  dispatchButtonEvent ()
  handleButtons ()
  handlePov ()
  doButton ()
  Override this method if you want a different mapping for a game controller's buttons.
  doPov ()
  Override this method if you want a different mapping for a game controller's point of view direction pad.
  doLeftStickBegin ()
  doLeftStickMove ()
  doLeftStickEnd ()
  doLeftStick ()
  doRightStickBegin ()
  doRightStickMove ()
  doRightStickEnd ()
  doRightStick ()
  doTrackBegin ()
  doTrackMove ()
  doTrackEnd ()
  doTrack ()
  doOrbitBegin ()
  doOrbitMove ()
  doOrbitEnd ()
  doOrbit ()
  doCoiTargetBegin ()
  doCoiTargetMove ()
  doCoiTargetEnd ()
  doCoiTarget ()
  doRollBegin ()
  doRollMove ()
  doRollEnd ()
  doRoll ()

Public Attributes

int  kLeftStick = 1
int  kRightStick = 1
int  kCoiTargetMode = 1
int  kRollMode = 1
  buttonState
  pov
  leftStick
  rightStick

Member Function Documentation

Joystick.GenericController.__init__ ( )
Joystick.GenericController.getName ( )
Joystick.GenericController.handleEvent ( )
Joystick.GenericController.swapSticks ( )
Joystick.GenericController.swapDollyAndTrackUpDown ( )
Joystick.GenericController.swapLookUpAndDown ( )
Joystick.GenericController.setOrbitMode ( )
Joystick.GenericController.isOrbitMode ( )
Joystick.GenericController.getLeftJoystickThreshold ( )

Distance from 0 the joystick has to move before something happens.

Reimplemented in Joystick.LogitechWingManRumblePad.

Joystick.GenericController.getRightJoystickThreshold ( )

Distance from 0 the joystick has to move before something happens.

Reimplemented in Joystick.LogitechWingManRumblePad.

Joystick.GenericController.getState ( )
Joystick.GenericController.setCoiTargetMode ( )
Joystick.GenericController.inCoiTargetMode ( )
Joystick.GenericController.setRollMode ( )
Joystick.GenericController.inRollMode ( )
Joystick.GenericController.getSpeed ( )

Apply a speed function to the given position.

If a position value is less than the threshold then the speed is 0.

For all position values greater than the threshold apply a speed function.

The returned values range from 0.0 to 1.0.

Joystick.GenericController.getLeftJoystickPosition ( )

Joystick position is an x, y value where both x and y range from -1.0 to 1.0.

A value of 0 indicates the joystick is not moving in the corresponding direction.

Up and left yields negative values, while down and right yields positive values.

Joystick.GenericController.getRightJoystickPosition ( )

Joystick position is an x, y value where both x and y range from -1.0 to 1.0.

A value of 0 indicates the joystick is not moving in the corresponding direction.

Up and left yields negative values, while down and right yields positive values.

Reimplemented in Joystick.LogitechWingManRumblePad.

Joystick.GenericController.handleLeftJoystick ( )
Joystick.GenericController.handleRightJoystick ( )
Joystick.GenericController.dispatchButtonEvent ( )
Joystick.GenericController.handleButtons ( )
Joystick.GenericController.handlePov ( )
Joystick.GenericController.doButton ( )

Override this method if you want a different mapping for a game controller's buttons.

Reimplemented in Joystick.LogitechWingManRumblePad.

Joystick.GenericController.doPov ( )

Override this method if you want a different mapping for a game controller's point of view direction pad.

Joystick.GenericController.doLeftStickBegin ( )
Joystick.GenericController.doLeftStickMove ( )
Joystick.GenericController.doLeftStickEnd ( )
Joystick.GenericController.doLeftStick ( )
Joystick.GenericController.doRightStickBegin ( )
Joystick.GenericController.doRightStickMove ( )
Joystick.GenericController.doRightStickEnd ( )
Joystick.GenericController.doRightStick ( )
Joystick.GenericController.doTrackBegin ( )
Joystick.GenericController.doTrackMove ( )
Joystick.GenericController.doTrackEnd ( )
Joystick.GenericController.doTrack ( )
Joystick.GenericController.doOrbitBegin ( )
Joystick.GenericController.doOrbitMove ( )
Joystick.GenericController.doOrbitEnd ( )
Joystick.GenericController.doOrbit ( )
Joystick.GenericController.doCoiTargetBegin ( )
Joystick.GenericController.doCoiTargetMove ( )
Joystick.GenericController.doCoiTargetEnd ( )
Joystick.GenericController.doCoiTarget ( )
Joystick.GenericController.doRollBegin ( )
Joystick.GenericController.doRollMove ( )
Joystick.GenericController.doRollEnd ( )
Joystick.GenericController.doRoll ( )

Member Data Documentation


Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController
Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController Joystick.GenericController