|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.input.action.InputAction
com.jme.input.action.MouseInputAction
com.jme.input.action.NodeMouseLook
public class NodeMouseLook
NodeMouseLook defines a mouse action that detects mouse
movement and converts it into node rotations and node tilts.
| Field Summary |
|---|
| Fields inherited from class com.jme.input.action.MouseInputAction |
|---|
mouse |
| Fields inherited from class com.jme.input.action.InputAction |
|---|
speed |
| Constructor Summary | |
|---|---|
NodeMouseLook(Mouse mouse,
Spatial node,
float speed)
Constructor creates a new NodeMouseLook object. |
|
| Method Summary | |
|---|---|
Vector3f |
getLockAxis()
Returns the axis that is currently locked. |
void |
performAction(InputActionEvent evt)
performAction checks for any movement of the mouse, and
calls the appropriate method to alter the node's orientation when
applicable. |
void |
setButtonPressRequired(boolean buttonPressRequired)
Sets the option for requiring the user to click the mouse button specified by mouseButtonForRequired in
order to rotate the node. |
void |
setLockAxis(Vector3f lockAxis)
setLockAxis sets the axis that should be locked down. |
void |
setMouseButtonForRequired(int mouseButtonForRequired)
Sets which mouse button needs to be pressed in order to rotate the node (that is, assuming buttonPressRequired is
set to true). |
void |
setSpeed(float speed)
setSpeed sets the speed of the mouse look. |
| Methods inherited from class com.jme.input.action.MouseInputAction |
|---|
setMouse |
| Methods inherited from class com.jme.input.action.InputAction |
|---|
getSpeed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeMouseLook(Mouse mouse,
Spatial node,
float speed)
NodeMouseLook object. It takes
the mouse, node and speed of the looking.
mouse - the mouse to calculate view changes.node - the node to move.speed - the speed at which to alter the camera.| Method Detail |
|---|
public void setLockAxis(Vector3f lockAxis)
setLockAxis sets the axis that should be locked down. This
prevents "rolling" about a particular axis. Typically, this is set to the
mouse's up vector.
lockAxis - the axis that should be locked down to prevent rolling.public Vector3f getLockAxis()
setLockAxis(com.jme.math.Vector3f)public void setSpeed(float speed)
setSpeed sets the speed of the mouse look.
setSpeed in class InputActionspeed - the speed of the mouse look.public void setButtonPressRequired(boolean buttonPressRequired)
mouseButtonForRequired in
order to rotate the node.
buttonPressRequired - the buttonPressRequired to setpublic void setMouseButtonForRequired(int mouseButtonForRequired)
buttonPressRequired is
set to true).
mouseButtonForRequired - the mouseButtonForRequired to setpublic void performAction(InputActionEvent evt)
performAction checks for any movement of the mouse, and
calls the appropriate method to alter the node's orientation when
applicable.
evt - the event that triggered the perform action method.InputActionInterface.performAction(InputActionEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||