PixelLightAPI  .
Public Member Functions
PLInput::Joystick Class Reference

Joystick input device. More...

#include <Joystick.h>

Inheritance diagram for PLInput::Joystick:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLINPUT_API Joystick (const PLCore::String &sName, DeviceImpl *pImpl)
 Constructor.
virtual PLINPUT_API ~Joystick ()
 Destructor.
PLINPUT_API int GetThreshold () const
 Get threshold.
PLINPUT_API void SetThreshold (int nThreshold=12000)
 Set threshold.
virtual PLINPUT_API void Update () override
 Update device once per frame.
virtual PLINPUT_API void UpdateOutputControl (Control *pControl) override
 Update output controls (LEDs, effects etc.)

Detailed Description

Joystick input device.

Remarks:
This class supports the following device backend types:
  • UpdateDevice
  • HIDDevice

Constructor & Destructor Documentation

PLINPUT_API PLInput::Joystick::Joystick ( const PLCore::String sName,
DeviceImpl *  pImpl 
)

Constructor.

Parameters:
[in]sNameDevice name
[in]pImplSystem specific device implementation, can, but shouldn't be a null pointer
virtual PLINPUT_API PLInput::Joystick::~Joystick ( ) [virtual]

Destructor.


Member Function Documentation

PLINPUT_API int PLInput::Joystick::GetThreshold ( ) const

Get threshold.

Returns:
Threshold
PLINPUT_API void PLInput::Joystick::SetThreshold ( int  nThreshold = 12000)

Set threshold.

Parameters:
[in]nThresholdThreshold
virtual PLINPUT_API void PLInput::Joystick::Update ( ) [override, virtual]

Update device once per frame.

Remarks:
This function can be used e.g. to reset any data of a device once per frame. Usually this is not needed, but some devices (e.g. RawInput mice etc.) need to reset their data once per frame.
Note:
  • The default implementation is empty

Reimplemented from PLInput::Controller.

virtual PLINPUT_API void PLInput::Joystick::UpdateOutputControl ( Control pControl) [override, virtual]

Update output controls (LEDs, effects etc.)

Parameters:
[in]pControlOutput control that has been changed, must be valid!
Remarks:
This function is called whenever an output control such as LED or Effect has been changed. A device should use this function to update the specific control state on the device (or update all output controls at the same time)
Note:
  • The default implementation is empty

Reimplemented from PLInput::Controller.


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:34
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported