com.jme.input.action
Class KeyBackwardAction

java.lang.Object
  extended by com.jme.input.action.InputAction
      extended by com.jme.input.action.KeyInputAction
          extended by com.jme.input.action.KeyBackwardAction
All Implemented Interfaces:
InputActionInterface

public class KeyBackwardAction
extends KeyInputAction

KeyBackwardAction defines an action for moving a camera along it's negative direction. How fast the camera moves in a single frame is defined by the speed of the camera times the time between frames. The speed of the camera can be thought of as how many units per second the camera can travel.

Version:
$Id: KeyBackwardAction.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Mark Powell

Field Summary
 
Fields inherited from class com.jme.input.action.InputAction
speed
 
Constructor Summary
KeyBackwardAction(Camera camera, float speed)
          Constructor instantiates a new KeyBackwardAction object.
 
Method Summary
 void performAction(InputActionEvent evt)
          performAction moves the camera along it's negative direction vector at a speed of movement speed * time.
 
Methods inherited from class com.jme.input.action.InputAction
getSpeed, setSpeed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyBackwardAction

public KeyBackwardAction(Camera camera,
                         float speed)
Constructor instantiates a new KeyBackwardAction object.

Parameters:
camera - the camera that will be affected by this action.
speed - the speed at which the camera can move.
Method Detail

performAction

public void performAction(InputActionEvent evt)
performAction moves the camera along it's negative direction vector at a speed of movement speed * time. Where time is the time between frames and 1 corresponds to 1 second.

Parameters:
evt - the event that triggered the perform action method.
See Also:
InputActionInterface.performAction(InputActionEvent)