|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jme.input.InputHandler net.cscott.sdr.anim.SdrFirstPersonHandler
public abstract class SdrFirstPersonHandler
FirsPersonController
defines an InputHandler that sets
input to be controlled similar to First Person Shooting games. By default the
commands are, WSAD moves the camera forward, backward and strafes. The
arrow keys rotate and tilt the camera and the mouse also rotates and tilts
the camera.
This is a handler that is composed from KeyboardLookHandler
and MouseLookHandler
.
Field Summary |
---|
Fields inherited from class com.jme.input.InputHandler |
---|
AXIS_ALL, AXIS_NONE, BUTTON_ALL, BUTTON_NONE, DEVICE_ALL, DEVICE_KEYBOARD, DEVICE_MOUSE, event, mouse |
Constructor Summary | |
---|---|
SdrFirstPersonHandler(com.jme.renderer.Camera cam,
float moveSpeed,
float turnSpeed)
Creates a first person handler. |
Method Summary | |
---|---|
abstract void |
onAction()
This method is called whenever an appropriate keyboard or mouse action is performed (that is, whenever this handler changes the camera position or angle. |
Methods inherited from class com.jme.input.InputHandler |
---|
addAction, addAction, addAction, addAction, addAction, addAction, addDevice, addToAttachedHandlers, clearActions, getBooleanProp, getDevices, getFloatProp, getFromAttachedHandlers, getIntProp, getObjectProp, getParent, isEnabled, processTriggers, removeAction, removeAction, removeAllActions, removeAllFromAttachedHandlers, removeFromAttachedHandlers, setActionSpeed, setActionSpeed, setEnabled, setEnabledOfAttachedHandlers, setParent, sizeOfAttachedHandlers, update, updateAttachedHandlers |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SdrFirstPersonHandler(com.jme.renderer.Camera cam, float moveSpeed, float turnSpeed)
cam
- The camera to move by this handler.moveSpeed
- action speed for move actionsturnSpeed
- action speed for rotating actionsMethod Detail |
---|
public abstract void onAction()
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |