Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Phx::LogicalInputEngine::DigitalAxisDriver Class Reference

A LogicalInputEngine driver that controls a logical axis by binding it to a set of raw buttons. More...

#include <PhxLogicalInputEngine.h>

Inheritance diagram for Phx::LogicalInputEngine::DigitalAxisDriver:

Phx::LogicalInputEngine::AxisDriver Phx::LockedPtrInterface< AxisDriver > List of all members.

Public Types

typedef LogicalInputEngine::AxisState AxisState

Public Member Functions

virtual void increaseButtons (const std::vector< ButtonSpecState > &buttons)=0
 Sets a sequence of buttons which, when pressed in order, will cause the logical axis value to increase.
virtual std::vector< ButtonSpecStateincreaseButtons (void) const =0
 Gets the sequence of buttons that will cause the axis to increase.
virtual void centerButtons (const std::vector< ButtonSpecState > &buttons)=0
 Sets a sequence of buttons which, when pressed in order, will cause the logical axis to return to 0.
virtual std::vector< ButtonSpecStatecenterButtons (void) const =0
 Gets the sequence of buttons that will cause the axis to return to 0.
virtual void decreaseButtons (const std::vector< ButtonSpecState > &buttons)=0
 Sets a sequence of buttons which, when pressed in order, will cause the logical axis value to decrease.
virtual std::vector< ButtonSpecStatedecreaseButtons (void) const =0
 Gets the sequence of buttons that will cause the axis to decrease.
virtual void continuous (bool continuous)=0
 Sets whether the logical axis value changes continuously as the buttons are held.
virtual bool continuous (void) const =0
 Returns whether the logical axis value changes continuously as the buttons are held.
virtual void rate (AxisState rate)=0
 Sets the rate at which the axis value changes when the increase/decrease buttons are pressed.
virtual AxisState rate (void) const =0
 Returns the rate at which the axis value changes.
virtual void max (AxisState max)=0
 Sets an upper limit to the logical axis value.
virtual AxisState max (void) const =0
 Gets the upper limit of the logical axis value.
virtual void min (AxisState min)=0
 Sets an lower limit to the logical axis value.
virtual AxisState min (void) const =0
 Gets the lower limit of the logical axis value.

Detailed Description

A LogicalInputEngine driver that controls a logical axis by binding it to a set of raw buttons.

The axis can be increased or decreased by pressing a sequence of raw buttons in the same was as described for DigitalButtonDriver.


Member Function Documentation

virtual std::vector<ButtonSpecState> Phx::LogicalInputEngine::DigitalAxisDriver::centerButtons void   )  const [pure virtual]
 

Gets the sequence of buttons that will cause the axis to return to 0.

Returns:
A vector containing ButtonSpecState's for the sequence of buttons that must be pressed in order to return the axis to 0.
See also:
DigitalButtonDriver::buttons()

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::centerButtons const std::vector< ButtonSpecState > &  buttons  )  [pure virtual]
 

Sets a sequence of buttons which, when pressed in order, will cause the logical axis to return to 0.

Parameters:
buttons The sequence of raw buttons identified by ButtonSpecState's the must be pressed in order to return the axis to 0.
See also:
DigitalButtonDriver::buttons()

virtual bool Phx::LogicalInputEngine::DigitalAxisDriver::continuous void   )  const [pure virtual]
 

Returns whether the logical axis value changes continuously as the buttons are held.

Returns:
True if the axis value will change continuously when buttons are held down. False if the axis will change only in discrete increments each time the button is pressed.

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::continuous bool  continuous  )  [pure virtual]
 

Sets whether the logical axis value changes continuously as the buttons are held.

If continuous() is false, the axis changes only in discrete increments each time the buttons are pressed.

Parameters:
continuous If true, the axis value will change continuously when buttons are held down. Otherwise, the axis will change only in discrete increments each time the button is pressed.

virtual std::vector<ButtonSpecState> Phx::LogicalInputEngine::DigitalAxisDriver::decreaseButtons void   )  const [pure virtual]
 

Gets the sequence of buttons that will cause the axis to decrease.

Returns:
A vector containing ButtonSpecState's for the sequence of buttons that must be pressed in order to decrease the value of the logical axis.
See also:
DigitalButtonDriver::buttons()

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::decreaseButtons const std::vector< ButtonSpecState > &  buttons  )  [pure virtual]
 

Sets a sequence of buttons which, when pressed in order, will cause the logical axis value to decrease.

Parameters:
buttons The sequence of raw buttons identified by ButtonSpecState's the must be pressed in order to decrease the axis value.
See also:
DigitalButtonDriver::buttons()

virtual std::vector<ButtonSpecState> Phx::LogicalInputEngine::DigitalAxisDriver::increaseButtons void   )  const [pure virtual]
 

Gets the sequence of buttons that will cause the axis to increase.

Returns:
A vector containing ButtonSpecState's for the sequence of buttons that must be pressed in order to increase the value of the logical axis.
See also:
DigitalButtonDriver::buttons()

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::increaseButtons const std::vector< ButtonSpecState > &  buttons  )  [pure virtual]
 

Sets a sequence of buttons which, when pressed in order, will cause the logical axis value to increase.

Parameters:
buttons The sequence of raw buttons identified by ButtonSpecState's the must be pressed in order to increase the axis value.
See also:
DigitalButtonDriver::buttons()

virtual AxisState Phx::LogicalInputEngine::DigitalAxisDriver::max void   )  const [pure virtual]
 

Gets the upper limit of the logical axis value.

Returns:
The upper limit set via max(AxisState), which may be > +1.

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::max AxisState  max  )  [pure virtual]
 

Sets an upper limit to the logical axis value.

The logical output is always clamped to +1, even if max > 1.

Parameters:
max The upper limit to which the logical axis value will be restricted.

virtual AxisState Phx::LogicalInputEngine::DigitalAxisDriver::min void   )  const [pure virtual]
 

Gets the lower limit of the logical axis value.

Returns:
The lower limit set via min(AxisState), which may be < -1.

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::min AxisState  min  )  [pure virtual]
 

Sets an lower limit to the logical axis value.

The logical output is always clamped to -1, even if min < -1.

Parameters:
min The lower limit to which the logical axis value will be restricted.

virtual AxisState Phx::LogicalInputEngine::DigitalAxisDriver::rate void   )  const [pure virtual]
 

Returns the rate at which the axis value changes.

Returns:
The amount by which the axis changes each second when the increase/decrease keys are pressed if continuous() is true, or the amount by which the axis changes each time the keys are pressed when continuous() is false.

virtual void Phx::LogicalInputEngine::DigitalAxisDriver::rate AxisState  rate  )  [pure virtual]
 

Sets the rate at which the axis value changes when the increase/decrease buttons are pressed.

If continuous() is true, the axis will in/decrease continuously at rate units per second for as long as the buttons are held. Otherwise, the axis will increase by rate units each time the buttons are pressed.

The logical output of the axis is always clamped to [-1, +1].

Parameters:
rate The rate at which the logical axis changes when the increase/decrease buttons are pressed.


The documentation for this class was generated from the following file:
Generated on Wed Dec 21 22:05:38 2005 for Phoenix OSFS by  doxygen 1.4.2