Class MouseAxisTrigger

java.lang.Object
com.jme3.input.controls.MouseAxisTrigger
All Implemented Interfaces:
Trigger

public class MouseAxisTrigger extends Object implements Trigger
A MouseAxisTrigger is used as a mapping to mouse axis, a mouse axis is movement along the X axis (left/right), Y axis (up/down) and the mouse wheel (scroll up/down).
  • Constructor Details

    • MouseAxisTrigger

      public MouseAxisTrigger(int mouseAxis, boolean negative)
      Create a new MouseAxisTrigger.

      Parameters:
      mouseAxis - Mouse axis. See AXIS_*** constants in MouseInput
      negative - True if listen to negative axis events, false if listen to positive axis events.
  • Method Details

    • getMouseAxis

      public int getMouseAxis()
    • isNegative

      public boolean isNegative()
    • getName

      public String getName()
      Specified by:
      getName in interface Trigger
      Returns:
      A user friendly name for the trigger.
    • mouseAxisHash

      public static int mouseAxisHash(int mouseAxis, boolean negative)
    • triggerHashCode

      public int triggerHashCode()
      Description copied from interface: Trigger
      Returns the hash code for the trigger.
      Specified by:
      triggerHashCode in interface Trigger
      Returns:
      the hash code for the trigger.