|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.input.action.InputAction
apps.mt3dmaps.orbittest.CameraFocusInputAction
public class CameraFocusInputAction
Uses the mouse to select a scene object, and smoothly move the camera towards the selected object focusing at its center. This is used with the OrbitAction.
| Nested Class Summary | |
|---|---|
class |
CameraFocusInputAction.CameraController
Controller used in conjuction with the Orbit handler to smoothly move the camera towards a scene object. |
| Constructor Summary | |
|---|---|
CameraFocusInputAction(com.jme.renderer.Camera camera,
OrbitAction orbit)
Constructor. |
|
| Method Summary | |
|---|---|
CameraFocusInputAction.CameraController |
getController()
Returns the camera controller that is used to focus the camera on a specific object in the scene. |
boolean |
isEnabled()
Returns true if this input action is enabled. |
void |
moveCameraToSpatial(com.jme.scene.Spatial spatial)
Calculates the distance from the object the camera will move to, and initializes and starts the camera controller to move towards the given spatial. |
void |
performAction(com.jme.input.action.InputActionEvent evt)
Perform action. |
com.jme.scene.Geometry |
pickGeometry(com.jme.math.Vector2f screenPos)
Performs a mouse pick in the scene with supplied screen coordinates of the mouse. |
void |
setEnabled(boolean enabled)
Enable or disable this input action. |
void |
setNode(com.jme.scene.Node node)
Set the node that is used when picking in the scene. |
| Methods inherited from class com.jme.input.action.InputAction |
|---|
getSpeed, setSpeed |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CameraFocusInputAction(com.jme.renderer.Camera camera,
OrbitAction orbit)
camera - the cameraorbit - the orbit| Method Detail |
|---|
public CameraFocusInputAction.CameraController getController()
public boolean isEnabled()
public void moveCameraToSpatial(com.jme.scene.Spatial spatial)
spatial - the spatialpublic void performAction(com.jme.input.action.InputActionEvent evt)
evt - the evtInputActionInterface.performAction(com.jme.input.action.InputActionEvent)public com.jme.scene.Geometry pickGeometry(com.jme.math.Vector2f screenPos)
screenPos - Screen coordinate of the mouse cursor
public void setEnabled(boolean enabled)
enabled - the new enabledpublic void setNode(com.jme.scene.Node node)
node - the new node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||