com.jme3.input
クラス Joystick

java.lang.Object
  上位を拡張 com.jme3.input.Joystick

public final class Joystick
extends java.lang.Object

A joystick represents a single joystick that is installed in the system.


コンストラクタの概要
Joystick(InputManager inputManager, JoyInput joyInput, int joyId, java.lang.String name, int buttonCount, int axisCount, int xAxis, int yAxis)
          Creates a new joystick instance.
 
メソッドの概要
 void assignAxis(java.lang.String positiveMapping, java.lang.String negativeMapping, int axisId)
          Assign the mappings to receive events from the given joystick axis.
 void assignButton(java.lang.String mappingName, int buttonId)
          Assign the mapping name to receive events from the given button index on the joystick.
 int getAxisCount()
          Returns the number of axes on this joystick.
 int getButtonCount()
          Returns the number of buttons on this joystick.
 java.lang.String getName()
          Returns the name of this joystick.
 int getXAxisIndex()
          Gets the index number for the X axis on the joystick.
 int getYAxisIndex()
          Gets the index number for the Y axis on the joystick.
 void rumble(float amount)
          Rumbles the joystick for the given amount/magnitude.
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Joystick

public Joystick(InputManager inputManager,
                JoyInput joyInput,
                int joyId,
                java.lang.String name,
                int buttonCount,
                int axisCount,
                int xAxis,
                int yAxis)
Creates a new joystick instance. Only used internally.

メソッドの詳細

rumble

public void rumble(float amount)
Rumbles the joystick for the given amount/magnitude.

パラメータ:
amount - The amount to rumble. Should be between 0 and 1.

assignButton

public void assignButton(java.lang.String mappingName,
                         int buttonId)
Assign the mapping name to receive events from the given button index on the joystick.

パラメータ:
mappingName - The mapping to receive joystick button events.
buttonId - The button index.
関連項目:
getButtonCount()

assignAxis

public void assignAxis(java.lang.String positiveMapping,
                       java.lang.String negativeMapping,
                       int axisId)
Assign the mappings to receive events from the given joystick axis.

パラメータ:
positiveMapping - The mapping to receive events when the axis is negative
negativeMapping - The mapping to receive events when the axis is positive
axisId - The axis index.
関連項目:
getAxisCount()

getXAxisIndex

public int getXAxisIndex()
Gets the index number for the X axis on the joystick.

E.g. for most gamepads, the left control stick X axis will be returned.

戻り値:
The axis index for the X axis for this joystick.
関連項目:
assignAxis(java.lang.String, java.lang.String, int)

getYAxisIndex

public int getYAxisIndex()
Gets the index number for the Y axis on the joystick.

E.g. for most gamepads, the left control stick Y axis will be returned.

戻り値:
The axis index for the Y axis for this joystick.
関連項目:
assignAxis(java.lang.String, java.lang.String, int)

getAxisCount

public int getAxisCount()
Returns the number of axes on this joystick.

戻り値:
the number of axes on this joystick.

getButtonCount

public int getButtonCount()
Returns the number of buttons on this joystick.

戻り値:
the number of buttons on this joystick.

getName

public java.lang.String getName()
Returns the name of this joystick.

戻り値:
the name of this joystick.

toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString