dtCore::AxesToAxis Class Reference

Maps any number of source axes to a single target axis. More...

#include <logicalinputdevice.h>

Inheritance diagram for dtCore::AxesToAxis:

dtCore::AxisMapping dtCore::AxisListener

List of all members.

Public Member Functions

 AxesToAxis (Axis *firstSourceAxis=NULL, Axis *secondSourceAxis=NULL)
 Constructor.
void AddSourceAxis (Axis *sourceAxis)
 Adds a source axis.
void RemoveSourceAxis (Axis *sourceAxis)
 Removes a source axis.
int GetNumSourceAxes ()
 Returns the number of source axes.
AxisGetSourceAxis (int index)
 Returns the source axis at the specified index.
virtual void SetTargetAxis (LogicalAxis *targetAxis)
 Sets the target axis.
virtual LogicalAxisGetTargetAxis ()
 Gets the target axis.
virtual bool AxisStateChanged (const Axis *axis, double oldState, double newState, double delta)
 Called when an axis' state has changed.

Protected Member Functions

virtual ~AxesToAxis ()
 Destructor.


Detailed Description

Maps any number of source axes to a single target axis.

The value of the target axis will correspond to the value of the last source axis updated.


Constructor & Destructor Documentation

dtCore::AxesToAxis::AxesToAxis ( Axis firstSourceAxis = NULL,
Axis secondSourceAxis = NULL 
)

Constructor.

Parameters:
firstSourceAxis the first source axis, or NULL for none
secondSourceAxis the second source axis, or NULL for none

dtCore::AxesToAxis::~AxesToAxis (  )  [protected, virtual]

Destructor.


Member Function Documentation

void dtCore::AxesToAxis::AddSourceAxis ( Axis sourceAxis  ) 

Adds a source axis.

Parameters:
sourceAxis the source axis to add

void dtCore::AxesToAxis::RemoveSourceAxis ( Axis sourceAxis  ) 

Removes a source axis.

Parameters:
sourceAxis the source axis to remove

int dtCore::AxesToAxis::GetNumSourceAxes (  ) 

Returns the number of source axes.

Returns:
the number of source axes

Axis * dtCore::AxesToAxis::GetSourceAxis ( int  index  ) 

Returns the source axis at the specified index.

Parameters:
index the index of the axis to retrieve
Returns:
the axis at the specified index

void dtCore::AxesToAxis::SetTargetAxis ( LogicalAxis targetAxis  )  [virtual]

Sets the target axis.

Parameters:
targetAxis the new target axis

Implements dtCore::AxisMapping.

LogicalAxis * dtCore::AxesToAxis::GetTargetAxis (  )  [virtual]

Gets the target axis.

Returns:
the current target axis

Implements dtCore::AxisMapping.

bool dtCore::AxesToAxis::AxisStateChanged ( const Axis axis,
double  oldState,
double  newState,
double  delta 
) [virtual]

Called when an axis' state has changed.

Parameters:
axis the changed axis
oldState the old state of the axis
newState the new state of the axis
delta a delta value indicating stateless motion

Implements dtCore::AxisListener.


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