org.xith3d.input.modules.fpih
Class FPIHInputStatesManager

java.lang.Object
  extended by org.jagatoo.input.managers.InputStatesManager
      extended by org.xith3d.input.modules.fpih.FPIHInputStatesManager

public class FPIHInputStatesManager
extends org.jagatoo.input.managers.InputStatesManager

This is a special key-states manager for the FirstPersonInputHandler.


Field Summary
 
Fields inherited from class org.jagatoo.input.managers.InputStatesManager
CONTROLLERS_SUSPENDED, KEYBOARD_SUSPENDED, MOUSE_AXES_SUSPENDED, MOUSE_BUTTONS_SUSPENDED, MOUSE_WHEEL_SUSPENDED
 
Constructor Summary
FPIHInputStatesManager(FirstPersonInputHandler fpih, java.util.ArrayList<MovementListener> movementListeners)
           
 
Method Summary
 boolean isAimingDown()
           
 boolean isAimingUp()
           
 boolean isCrouching()
           
 boolean isJumping()
           
 boolean isMoving()
           
 boolean isMovingBackward()
           
 boolean isMovingForward()
           
 boolean isMovingLeft()
           
 boolean isMovingRight()
           
 boolean isTurning()
           
 boolean isTurningLeft()
           
 boolean isTurningRight()
           
 boolean isZooming()
           
 boolean isZoomingIn()
           
 boolean isZoomingOut()
           
protected  void startCrouch()
          Makes the player crouch.
protected  boolean startJump()
          Called, when the player jumped.
protected  void startMovement(FPIHInputAction action)
          Called when the player starts to move into any direction.
protected  void stopCrouch()
          Makes the player stand up from crouch.
protected  void stopMovement(FPIHInputAction action)
          Called when the player stopps to move into any direction.
 void update(long nanoTime)
           
 
Methods inherited from class org.jagatoo.input.managers.InputStatesManager
getActionsByState, getActionsByState, getActionsByState, getActionsByState, getInputState, getInputStatesManipulator, getKeyStatesManipulator, getNumStates, getSimpleInputState, getSuspendMask, hasInputStateChanged, setSuspendMask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FPIHInputStatesManager

public FPIHInputStatesManager(FirstPersonInputHandler fpih,
                              java.util.ArrayList<MovementListener> movementListeners)
Method Detail

startMovement

protected void startMovement(FPIHInputAction action)
Called when the player starts to move into any direction. This method will never contain any code and can easily been overridden.

Parameters:
action - the KeyCommand, that invoked this event

stopMovement

protected void stopMovement(FPIHInputAction action)
Called when the player stopps to move into any direction. This method will never contain any code and can easily been overridden.

Parameters:
action - the KeyCommand, that invoked this event

startJump

protected boolean startJump()
Called, when the player jumped. This method will never contain any code and can easily been overridden.


startCrouch

protected void startCrouch()
Makes the player crouch.


stopCrouch

protected void stopCrouch()
Makes the player stand up from crouch.


isMovingForward

public final boolean isMovingForward()

isMovingBackward

public final boolean isMovingBackward()

isMovingLeft

public final boolean isMovingLeft()

isMovingRight

public final boolean isMovingRight()

isMoving

public final boolean isMoving()
Returns:
true, if the player is currently moving into any direction

isTurningLeft

public final boolean isTurningLeft()

isTurningRight

public final boolean isTurningRight()

isTurning

public final boolean isTurning()
Returns:
true, if the player is currently moving into any direction

isAimingUp

public final boolean isAimingUp()

isAimingDown

public final boolean isAimingDown()

isJumping

public final boolean isJumping()

isCrouching

public final boolean isCrouching()

isZoomingIn

public final boolean isZoomingIn()

isZoomingOut

public final boolean isZoomingOut()

isZooming

public final boolean isZooming()
Returns:
true, if view is currently zooming

update

public void update(long nanoTime)
Overrides:
update in class org.jagatoo.input.managers.InputStatesManager