Class FlyControl

java.lang.Object
com.ardorcraft.control.FlyControl

public class FlyControl extends Object
  • Constructor Details

  • Method Details

    • getUpAxis

      public ReadOnlyVector3 getUpAxis()
    • setUpAxis

      public void setUpAxis(ReadOnlyVector3 upAxis)
    • getMouseRotateSpeed

      public double getMouseRotateSpeed()
    • setMouseRotateSpeed

      public void setMouseRotateSpeed(double speed)
    • getMoveSpeed

      public double getMoveSpeed()
    • setMoveSpeed

      public void setMoveSpeed(double speed)
    • getKeyRotateSpeed

      public double getKeyRotateSpeed()
    • setKeyRotateSpeed

      public void setKeyRotateSpeed(double speed)
    • move

      protected void move(TwoInputStates state, double tpf)
    • rotate

      protected void rotate(double dx, double dy)
    • setupTriggers

      public static FlyControl setupTriggers(PlayerBase player, LogicalLayer layer, ReadOnlyVector3 upAxis, boolean dragOnly)
      Parameters:
      player - the player
      layer - the logical layer to register with
      upAxis - the up axis of the camera
      dragOnly - if true, mouse input will only rotate the camera if one of the mouse buttons (left, center or right) is down.
      Returns:
      a new FlyControl object
    • removeTriggers

      public static void removeTriggers(LogicalLayer layer, FlyControl control)
      Deregister the triggers of the given FlyControl from the given LogicalLayer.
      Parameters:
      layer - the logical layer to deregister
      control - the FlyControl
    • setupMouseTriggers

      public void setupMouseTriggers(LogicalLayer layer, boolean dragOnly)
    • setupKeyboardTriggers

      public Predicate<TwoInputStates> setupKeyboardTriggers(LogicalLayer layer)
    • getKeyTrigger

      public InputTrigger getKeyTrigger()
    • getMouseTrigger

      public InputTrigger getMouseTrigger()
    • enable

      public void enable()
    • disable

      public void disable()