com.jme3.input
クラス FlyByCamera

java.lang.Object
  上位を拡張 com.jme3.input.FlyByCamera
すべての実装されたインタフェース:
ActionListener, AnalogListener, InputListener

public class FlyByCamera
extends java.lang.Object
implements AnalogListener, ActionListener

A first person view camera controller. After creation, you must register the camera controller with the dispatcher using #registerWithDispatcher(). Controls: - Move the mouse to rotate the camera - Mouse wheel for zooming in or out - WASD keys for moving forward/backward and strafing - QZ keys raise or lower the camera


コンストラクタの概要
FlyByCamera(Camera cam)
          Creates a new FlyByCamera to control the given Camera object.
 
メソッドの概要
 boolean isDragToRotate()
           
 boolean isEnabled()
           
 void onAction(java.lang.String name, boolean value, float tpf)
          Called when an input to which this listener is registered to is invoked.
 void onAnalog(java.lang.String name, float value, float tpf)
          Called to notify the implementation that an analog event has occurred.
 void registerWithInput(InputManager inputManager)
          Registers the FlyByCamera to receive input events from the provided Dispatcher.
 void setDragToRotate(boolean dragToRotate)
          Set if drag to rotate mode is enabled.
 void setEnabled(boolean enable)
           
 void setMotionAllowedListener(MotionAllowedListener listener)
           
 void setMoveSpeed(float moveSpeed)
          Sets the move speed.
 void setRotationSpeed(float rotationSpeed)
          Sets the rotation speed.
 void setUpVector(Vector3f upVec)
          Sets the up vector that should be used for the camera.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

FlyByCamera

public FlyByCamera(Camera cam)
Creates a new FlyByCamera to control the given Camera object.

パラメータ:
cam -
メソッドの詳細

setUpVector

public void setUpVector(Vector3f upVec)
Sets the up vector that should be used for the camera.

パラメータ:
upVec -

setMotionAllowedListener

public void setMotionAllowedListener(MotionAllowedListener listener)

setMoveSpeed

public void setMoveSpeed(float moveSpeed)
Sets the move speed. The speed is given in world units per second.

パラメータ:
moveSpeed -

setRotationSpeed

public void setRotationSpeed(float rotationSpeed)
Sets the rotation speed.

パラメータ:
rotationSpeed -

setEnabled

public void setEnabled(boolean enable)
パラメータ:
enable - If false, the camera will ignore input.

isEnabled

public boolean isEnabled()
戻り値:
If enabled
関連項目:
setEnabled(boolean)

isDragToRotate

public boolean isDragToRotate()
戻り値:
If drag to rotate feature is enabled.
関連項目:
setDragToRotate(boolean)

setDragToRotate

public void setDragToRotate(boolean dragToRotate)
Set if drag to rotate mode is enabled. When true, the user must hold the mouse button and drag over the screen to rotate the camera, and the cursor is visible until dragged. Otherwise, the cursor is invisible at all times and holding the mouse button is not needed to rotate the camera. This feature is disabled by default.

パラメータ:
dragToRotate - True if drag to rotate mode is enabled.

registerWithInput

public void registerWithInput(InputManager inputManager)
Registers the FlyByCamera to receive input events from the provided Dispatcher.

パラメータ:
dispacher -

onAnalog

public void onAnalog(java.lang.String name,
                     float value,
                     float tpf)
インタフェース AnalogListener の記述:
Called to notify the implementation that an analog event has occurred. The results of KeyTrigger and MouseButtonTrigger events will have tpf == value.

定義:
インタフェース AnalogListener 内の onAnalog
パラメータ:
name - The name of the mapping that was invoked
value - Value of the axis, from 0 to 1.
tpf - The time per frame value.

onAction

public void onAction(java.lang.String name,
                     boolean value,
                     float tpf)
インタフェース ActionListener の記述:
Called when an input to which this listener is registered to is invoked.

定義:
インタフェース ActionListener 内の onAction
パラメータ:
name - The name of the mapping that was invoked
value - True if the action is "pressed", false otherwise
tpf - The time per frame value.