com.jme.input.action
Class KeyRotateRightAction

java.lang.Object
  extended bycom.jme.input.action.KeyInputAction
      extended bycom.jme.input.action.KeyRotateRightAction
All Implemented Interfaces:
InputAction

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,v 1.12 2004/10/14 01:23:02 mojomonkey Exp $
Author:
Mark Powell

Field Summary
 
Fields inherited from class com.jme.input.action.KeyInputAction
allowsRepeats, key, keyChar, 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.KeyInputAction
allowsRepeats, getKey, getKeyChar, getSpeed, setAllowsRepeats, setKey, setKeyChar, 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.

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:
InputAction.performAction(InputActionEvent)