dtCore::FlyMotionModel Class Reference

A motion model that simulates the action of flying. More...

#include <flymotionmodel.h>

Inheritance diagram for dtCore::FlyMotionModel:

dtCore::MotionModel dtCore::Base

List of all members.

Public Member Functions

 FlyMotionModel (Keyboard *keyboard=NULL, Mouse *mouse=NULL, bool useSimTimeForSpeed=true, bool requireMouseDown=true, bool resetMouseCursor=false)
 Constructor.
void SetDefaultMappings (Keyboard *keyboard, Mouse *mouse)
 Sets the input axes to a set of default mappings for mouse and keyboard.
void SetFlyForwardBackwardAxis (Axis *flyForwardBackwardAxis)
 Sets the axis that moves the target forwards (for positive values) or backwards (for negative values).
AxisGetFlyForwardBackwardAxis ()
 Returns the axis that moves the target forwards (for positive values) or backwards (for negative values).
void SetFlyLeftRightAxis (Axis *flyLeftRightAxis)
 Sets the axis that moves the target left (for positive values) or right (for negative values).
AxisGetFlyLeftRightAxis ()
 Returns the axis that moves the target left (for positive values) or right (for negative values).
void SetFlyUpDownAxis (Axis *flyUpDownAxis)
 Sets the axis that moves the target target-relative up (for positive values) or target-relative down (for negative values).
AxisGetFlyUpDownAxis ()
 Returns the axis that moves the target target-relative up (for positive values) or target-relative down (for negative values).
void SetTurnLeftRightAxis (Axis *turnLeftRightAxis)
 Sets the axis that turns the target left (for negative values) or right (for positive values).
AxisGetTurnLeftRightAxis ()
 Returns the axis that turns the target left (for negative values) or right (for positive values).
void SetTurnUpDownAxis (Axis *turnUpDownAxis)
 Sets the axis that turns the target up (for positive values) or down (for negative values).
AxisGetTurnUpDownAxis ()
 Returns the axis that turns the target up (for positive values) or down (for negative values).
void SetMaximumFlySpeed (float maximumFlySpeed)
 Sets the maximum fly speed (meters per second).
float GetMaximumFlySpeed ()
 Returns the maximum fly speed (meters per second).
void SetMaximumTurnSpeed (float maximumTurnSpeed)
 Sets the maximum turn speed (degrees per second).
float GetMaximumTurnSpeed ()
 Returns the maximum turn speed (degrees per second).
bool GetUseSimTimeForSpeed ()
 Gets whether we are using sim time or not (aka real time) for the speed of movement and rotation.
void SetUseSimTimeForSpeed (bool useSimTimeForSpeed)
 Sets whether we use sim time or not (aka real time) for the speed of movement and rotation.
virtual void OnMessage (MessageData *data)
 Message handler callback.

Protected Member Functions

virtual ~FlyMotionModel ()
 Destructor.


Detailed Description

A motion model that simulates the action of flying.

Constructor & Destructor Documentation

FlyMotionModel::FlyMotionModel ( Keyboard keyboard = NULL,
Mouse mouse = NULL,
bool  useSimTimeForSpeed = true,
bool  requireMouseDown = true,
bool  resetMouseCursor = false 
)

Constructor.

Parameters:
keyboard the keyboard instance, or NULL to avoid creating default input mappings
mouse the mouse instance, or NULL to avoid creating default input mappings
useSimTimeForSpeed true if the motion model should use the simulation time, which can be scaled, for motion or false if it should use the real time.
requireMouseDown true if the mouse button must be held down for mouse motions to control the camera. (Default is true.)
resetMouseCursor true if the mouse cursor should reset to the center of the scene each frame. (Default is false.)
keyboard the keyboard instance, or 0 to avoid creating default input mappings
mouse the mouse instance, or 0 to avoid creating default input mappings
useSimTimeForSpeed true if the motion model should use the simulation time, which can be scaled, for motion or false if it should use the real time.
requireMouseDown true if the mouse button must be held down for mouse motions to control the camera. (Default is true.)
resetMouseCursor true if the mouse cursor should reset to the center of the scene each frame. (Default is false.)

FlyMotionModel::~FlyMotionModel (  )  [protected, virtual]

Destructor.


Member Function Documentation

void FlyMotionModel::SetDefaultMappings ( Keyboard keyboard,
Mouse mouse 
)

Sets the input axes to a set of default mappings for mouse and keyboard.

Parameters:
keyboard the keyboard instance
mouse the mouse instance

void FlyMotionModel::SetFlyForwardBackwardAxis ( Axis flyForwardBackwardAxis  ) 

Sets the axis that moves the target forwards (for positive values) or backwards (for negative values).

Parameters:
flyForwardBackwardAxis the new forward/backward axis

Axis * FlyMotionModel::GetFlyForwardBackwardAxis (  ) 

Returns the axis that moves the target forwards (for positive values) or backwards (for negative values).

Returns:
the current forward/backward axis

void FlyMotionModel::SetFlyLeftRightAxis ( Axis flyLeftRightAxis  ) 

Sets the axis that moves the target left (for positive values) or right (for negative values).

Parameters:
flyLeftRightAxis the new left/right axis

Axis * FlyMotionModel::GetFlyLeftRightAxis (  ) 

Returns the axis that moves the target left (for positive values) or right (for negative values).

Returns:
the current left/right axis

void FlyMotionModel::SetFlyUpDownAxis ( Axis flyUpDownAxis  ) 

Sets the axis that moves the target target-relative up (for positive values) or target-relative down (for negative values).

Parameters:
flyUpDownAxis the new up/down axis

Axis * FlyMotionModel::GetFlyUpDownAxis (  ) 

Returns the axis that moves the target target-relative up (for positive values) or target-relative down (for negative values).

Returns:
the current up/down axis

void FlyMotionModel::SetTurnLeftRightAxis ( Axis turnLeftRightAxis  ) 

Sets the axis that turns the target left (for negative values) or right (for positive values).

Parameters:
turnLeftRightAxis the new turn left/right axis

Axis * FlyMotionModel::GetTurnLeftRightAxis (  ) 

Returns the axis that turns the target left (for negative values) or right (for positive values).

Returns:
the current turn left/right axis

void FlyMotionModel::SetTurnUpDownAxis ( Axis turnUpDownAxis  ) 

Sets the axis that turns the target up (for positive values) or down (for negative values).

Parameters:
turnUpDownAxis the new turn up/down axis

Axis * FlyMotionModel::GetTurnUpDownAxis (  ) 

Returns the axis that turns the target up (for positive values) or down (for negative values).

Returns:
the current turn up/down axis

void FlyMotionModel::SetMaximumFlySpeed ( float  maximumFlySpeed  ) 

Sets the maximum fly speed (meters per second).

Parameters:
maximumFlySpeed the new maximum fly speed

float FlyMotionModel::GetMaximumFlySpeed (  ) 

Returns the maximum fly speed (meters per second).

Returns:
the current maximum fly speed

void FlyMotionModel::SetMaximumTurnSpeed ( float  maximumTurnSpeed  ) 

Sets the maximum turn speed (degrees per second).

Parameters:
maximumTurnSpeed the new maximum turn speed

float FlyMotionModel::GetMaximumTurnSpeed (  ) 

Returns the maximum turn speed (degrees per second).

Returns:
the current maximum turn speed

bool dtCore::FlyMotionModel::GetUseSimTimeForSpeed (  )  [inline]

Gets whether we are using sim time or not (aka real time) for the speed of movement and rotation.

void dtCore::FlyMotionModel::SetUseSimTimeForSpeed ( bool  useSimTimeForSpeed  )  [inline]

Sets whether we use sim time or not (aka real time) for the speed of movement and rotation.

void FlyMotionModel::OnMessage ( MessageData data  )  [virtual]

Message handler callback.

Parameters:
data the message data

Reimplemented from dtCore::Base.


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