com.jme.input
Class NodeHandler

java.lang.Object
  extended by com.jme.input.InputHandler
      extended by com.jme.input.NodeHandler

public class NodeHandler
extends InputHandler

NodeHandler defines an InputHandler that sets a node that can be controlled via keyboard and mouse inputs. By default the commands are, WSAD moves the node forward, backward and strafes. The arrow keys rotate and tilt the node and the mouse also rotates and tilts the node.

Version:
$Id: NodeHandler.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Mark Powell

Field Summary
 
Fields inherited from class com.jme.input.InputHandler
activeTriggers, allTriggers, AXIS_ALL, AXIS_NONE, BUTTON_ALL, BUTTON_NONE, DEVICE_ALL, DEVICE_KEYBOARD, DEVICE_MOUSE, event, mouse
 
Constructor Summary
NodeHandler(Spatial node, float keySpeed, float mouseSpeed)
          Constructor instantiates a new NodeHandler object.
NodeHandler(Spatial node, java.lang.String api)
          Constructor instantiates a new NodeHandler object.
 
Method Summary
 
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

NodeHandler

public NodeHandler(Spatial node,
                   java.lang.String api)
Constructor instantiates a new NodeHandler object. The application is set for the use of the exit action. The node is set to control, while the api defines which input api is to be used.

Parameters:
node - the node to control.
api - not used

NodeHandler

public NodeHandler(Spatial node,
                   float keySpeed,
                   float mouseSpeed)
Constructor instantiates a new NodeHandler object. The application is set for the use of the exit action. The node is set to control, while the api defines which input api is to be used.

Parameters:
node - the node to control.
keySpeed - action speed for key actions (move)
mouseSpeed - action speed for mouse actions (rotate)