com.jme.input.action
Class KeyRotateRightAction

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

public class KeyRotateRightAction
extends KeyInputAction

KeyRotateRightAction performs the action of rotating a camera a certain angle. This angle is determined by the speed at which the camera can turn and the time between frames.

Version:
$Id: KeyRotateRightAction.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
KeyRotateRightAction(Camera camera, float speed)
          Constructor instantiates a new KeyRotateLeftAction object.
 
Method Summary
 void performAction(InputActionEvent evt)
          performAction rotates the camera a certain angle.
 void setLockAxis(Vector3f lockAxis)
          setLockAxis allows a certain axis to be locked, meaning the camera will always be within the plane of the locked axis.
 
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

KeyRotateRightAction

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

Parameters:
camera - the camera to rotate.
speed - the speed at which to rotate.
Method Detail

setLockAxis

public void setLockAxis(Vector3f lockAxis)
setLockAxis allows a certain axis to be locked, meaning the camera will always be within the plane of the locked axis. For example, if the camera is a first person camera, the user might lock the camera's up vector. This will keep the camera vertical of the ground.

Parameters:
lockAxis - the axis to lock - should be unit length (normalized).

performAction

public void performAction(InputActionEvent evt)
performAction rotates the camera a certain angle.

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