dtCore::Axis Class Reference

Axes are features with double-valued state. More...

#include <inputdevice.h>

Inheritance diagram for dtCore::Axis:

dtCore::InputDeviceFeature dtCore::LogicalAxis

List of all members.

Public Types

typedef std::list< AxisListener * > AxisListenerList

Public Member Functions

 Axis (InputDevice *owner, const std::string &description)
 Constructor.
bool SetState (double state, double delta=0.0)
 Sets the state of this axis.
double GetState () const
 Returns the current state of this axis.
void AddAxisListener (AxisListener *axisListener)
 Adds an axis listener.
void RemoveAxisListener (AxisListener *axisListener)
 Removes an axis listener.
const AxisListenerListGetListeners () const
void InsertAxisListener (const AxisListenerList::value_type &pos, AxisListener *al)
 Inserts the listener into the list at a position BEFORE pos.

Protected Member Functions

virtual ~Axis ()


Detailed Description

Axes are features with double-valued state.

Member Typedef Documentation

typedef std::list<AxisListener*> dtCore::Axis::AxisListenerList


Constructor & Destructor Documentation

dtCore::Axis::Axis ( InputDevice owner,
const std::string &  description 
)

Constructor.

Parameters:
owner the owner of this axis
description a description of this axis

virtual dtCore::Axis::~Axis (  )  [inline, protected, virtual]


Member Function Documentation

bool dtCore::Axis::SetState ( double  state,
double  delta = 0.0 
)

Sets the state of this axis.

The delta value is used to indicate stateless motion, such as mouse scrolling.

Parameters:
state the new state
delta the optional delta value

double dtCore::Axis::GetState (  )  const

Returns the current state of this axis.

Returns:
the current state of this axis

void dtCore::Axis::AddAxisListener ( AxisListener axisListener  ) 

Adds an axis listener.

Parameters:
axisListener a pointer to the listener to add

void dtCore::Axis::RemoveAxisListener ( AxisListener axisListener  ) 

Removes an axis listener.

Parameters:
axisListener a pointer to the listener to remove

const AxisListenerList& dtCore::Axis::GetListeners (  )  const [inline]

void dtCore::Axis::InsertAxisListener ( const AxisListenerList::value_type &  pos,
AxisListener al 
)

Inserts the listener into the list at a position BEFORE pos.


http://www.delta3d.org
2.0.0 generated 14 Feb 2008