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

Phx::LogicalInputEngine::AnalogButtonDriver Class Reference

A LogicalInputEngine driver that triggers its logical button whenever an analog axis exceeds a threshold value. More...

#include <PhxLogicalInputEngine.h>

Inheritance diagram for Phx::LogicalInputEngine::AnalogButtonDriver:

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

Public Member Functions

virtual void axis (const AxisSpec &axis)=0
 Specifies which RawInputEngine axis this driver is bound to.
virtual AxisSpec axis (void) const =0
 Gets the current AxisSpec to which this driver is bound.
virtual void threshold (RawInputEngine::AxisState threshold)=0
 Sets the threshold at which the logical button will be triggered by the raw axis.
virtual RawInputEngine::AxisState threshold (void) const =0
 Gets the threshold at which the logical button will be triggered by the raw axis.
virtual void inverted (bool invert)=0
 Sets whether the logical button is pressed when the raw axis is greather or less than threshold().
virtual bool inverted (void) const =0
 Returns whether the logical button is pressed when the raw axis greather or less than threshold().

Detailed Description

A LogicalInputEngine driver that triggers its logical button whenever an analog axis exceeds a threshold value.

Whenever the raw axis (specified in the axis() attribute) is strictly greater than the value of the threshold() attribute (or less, if inverted() is true), the logical button is in the PRESSED state. It is in the RELEASED otherwise.

Note:
The RawInputEngine returns 0 for the current state of any axis which does not have a driver -- including the "invalid" axis of any device. As a result, if an invalid value is set for axis() (the default value is invalid), then the button will report a PRESSED state when threshold() > 0, and inverted() is true. By default, threshold() is 0, and inverted() is false -- thus an invalid axis will not trigger the logical button for this default setting.


Member Function Documentation

virtual AxisSpec Phx::LogicalInputEngine::AnalogButtonDriver::axis void   )  const [pure virtual]
 

Gets the current AxisSpec to which this driver is bound.

Returns:
The AxisSpec specifying which raw axis this driver is bound to.

virtual void Phx::LogicalInputEngine::AnalogButtonDriver::axis const AxisSpec axis  )  [pure virtual]
 

Specifies which RawInputEngine axis this driver is bound to.

Parameters:
axis An AxisSpec specifying the driver and identifier of the raw input axis.

virtual bool Phx::LogicalInputEngine::AnalogButtonDriver::inverted void   )  const [pure virtual]
 

Returns whether the logical button is pressed when the raw axis greather or less than threshold().

inverted() is initially false by default.

Returns:
true if the logical button is pressed when the value of the raw axis is less than threshold(), or false if it is pressed when the raw axis is greater than threshold().

virtual void Phx::LogicalInputEngine::AnalogButtonDriver::inverted bool  invert  )  [pure virtual]
 

Sets whether the logical button is pressed when the raw axis is greather or less than threshold().

Parameters:
invert If true, the logical button will be pressed when the raw axis value is less than threshold(). Otherwise, it is pressed when the raw axis is greater than threshold().

virtual RawInputEngine::AxisState Phx::LogicalInputEngine::AnalogButtonDriver::threshold void   )  const [pure virtual]
 

Gets the threshold at which the logical button will be triggered by the raw axis.

threshold() is initially 0 by default.

Returns:
The value at which the raw axis will trigger the logical button.

virtual void Phx::LogicalInputEngine::AnalogButtonDriver::threshold RawInputEngine::AxisState  threshold  )  [pure virtual]
 

Sets the threshold at which the logical button will be triggered by the raw axis.

If inverted() is false, the button will be PRESSED when the raw axis value is greater than threshold. If inverted() is true, the button will be PRESSED when the raw axis value is less than threshold.

Parameters:
threshold The raw axis value at which the logical button is triggered.


The documentation for this class was generated from the following file:
Generated on Mon Jul 10 19:45:29 2006 for Phoenix OSFS by  doxygen 1.4.2