org.xith3d.input.modules.fpih
Class FPIHMovementConstraints

java.lang.Object
  extended by org.xith3d.input.modules.fpih.FPIHMovementConstraints

public class FPIHMovementConstraints
extends java.lang.Object

FPIHMovementConstraints defines movement constraints for a FirstPersonInputHandler. This includes constraints for the movement as well as constraints for the mouse rotation or zooming.


Constructor Summary
FPIHMovementConstraints()
           
 
Method Summary
 void applyMovementConstraints(org.openmali.vecmath2.Tuple3f viewPosition, org.openmali.spatial.AxisIndicator upAxis)
           
 void applyMovementDeltaConstraints(org.openmali.vecmath2.Vector3f viewDeltaPosition, org.openmali.spatial.AxisIndicator upAxis)
           
 void applyRotationalConstraints(org.openmali.vecmath2.Tuple3f viewEuler, org.openmali.spatial.AxisIndicator upAxis)
          Applies the rotational constraints to the euler-angles.
 boolean getFixedPlaneEnabled()
          If enabled, the Player will always move on the current y-plane.
 float getMaxAngleDown()
           
 float getMaxAngleUp()
           
 void setFixedPlaneEnabled(boolean enabled)
          If enabled, the Player will always move on the current y-plane.
 void setMaxAngleDown(float angle)
          Sets the maximum down-angle (in radians), that the view can be rotated.
 void setMaxAngleUp(float angle)
          Sets the maximum up-angle (in radians), that the view can be rotated.
 void setMaxAngleUpDown(float angle)
          Just calls setMaxAngleUp(float) and setMaxAngleDown(float).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FPIHMovementConstraints

public FPIHMovementConstraints()
Method Detail

setMaxAngleUp

public void setMaxAngleUp(float angle)
Sets the maximum up-angle (in radians), that the view can be rotated.

Parameters:
angle -

getMaxAngleUp

public final float getMaxAngleUp()
Returns:
the maximum up-angle (in radians), that the view can be rotated.

setMaxAngleDown

public void setMaxAngleDown(float angle)
Sets the maximum down-angle (in radians), that the view can be rotated.

Parameters:
angle -

getMaxAngleDown

public final float getMaxAngleDown()
Returns:
the maximum down-angle (in radians), that the view can be rotated.

setMaxAngleUpDown

public final void setMaxAngleUpDown(float angle)
Just calls setMaxAngleUp(float) and setMaxAngleDown(float).

Parameters:
angle -

setFixedPlaneEnabled

public void setFixedPlaneEnabled(boolean enabled)
If enabled, the Player will always move on the current y-plane.

Parameters:
enabled - enabled/disabled

getFixedPlaneEnabled

public final boolean getFixedPlaneEnabled()
If enabled, the Player will always move on the current y-plane.


applyRotationalConstraints

public void applyRotationalConstraints(org.openmali.vecmath2.Tuple3f viewEuler,
                                       org.openmali.spatial.AxisIndicator upAxis)
Applies the rotational constraints to the euler-angles.

Parameters:
viewEuler -
upAxis -

applyMovementDeltaConstraints

public void applyMovementDeltaConstraints(org.openmali.vecmath2.Vector3f viewDeltaPosition,
                                          org.openmali.spatial.AxisIndicator upAxis)

applyMovementConstraints

public void applyMovementConstraints(org.openmali.vecmath2.Tuple3f viewPosition,
                                     org.openmali.spatial.AxisIndicator upAxis)
Parameters:
viewPosition -
upAxis -