public class CustomChaseCamera
extends com.jme3.input.ChaseCamera
ChaseCamera
to provide additional
functionality:ICameraListener
s when the zoom changes.Constructor and Description |
---|
CustomChaseCamera(com.jme3.renderer.Camera cam,
com.jme3.scene.Spatial target,
com.jme3.input.InputManager inputManager)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addCameraListener(ICameraListener listener)
Registers the specified listener with the camera so that it will be
notified of camera events.
|
boolean |
removeCameraListener(ICameraListener listener)
Unregisters the specified listener from the camera so that it will no
longer be notified of camera events.
|
void |
resetZoom()
Resets the camera's distance from the target to the default value.
|
void |
setDefaultDistance(float defaultDistance)
Overrides the default behavior to restrict the default distance between
the min and max distances and to store the current default distance.
|
void |
setDragToRotate(boolean dragToRotate) |
void |
unregisterInput()
Unregisters the camera from the application's
InputManager . |
cloneForSpatial, getChasingSensitivity, getDistanceToTarget, getDownRotateOnCloseViewOnly, getHorizontalRotation, getLookAtOffset, getMaxDistance, getMaxVerticalRotation, getMinDistance, getMinVerticalRotation, getRotationSensitivity, getRotationSpeed, getTrailingRotationInertia, getTrailingSensitivity, getUpVector, getVerticalRotation, getZoomSensitivity, isDragToRotate, isEnabled, isHideCursorOnRotate, isSmoothMotion, isTrailingEnabled, onAction, onAnalog, read, registerWithInput, render, setChasingSensitivity, setDefaultHorizontalRotation, setDefaultVerticalRotation, setDownRotateOnCloseViewOnly, setEnabled, setHideCursorOnRotate, setInvertHorizontalAxis, setInvertVerticalAxis, setLookAtOffset, setMaxDistance, setMaxVerticalRotation, setMinDistance, setMinVerticalRotation, setRotationSensitivity, setRotationSpeed, setSmoothMotion, setSpatial, setToggleRotationTrigger, setTrailingEnabled, setTrailingRotationInertia, setTrailingSensitivity, setUpVector, setZoomInTrigger, setZoomOutTrigger, setZoomSensitivity, update, write
public CustomChaseCamera(com.jme3.renderer.Camera cam, com.jme3.scene.Spatial target, com.jme3.input.InputManager inputManager)
cam
- The jME3 application's Camera
.target
- The Spatial
that the camera should target or face.inputManager
- The jME3 application's InputManager
.public void setDragToRotate(boolean dragToRotate)
setDragToRotate
in class com.jme3.input.ChaseCamera
public boolean addCameraListener(ICameraListener listener)
listener
- The ICameraListener
to add.public boolean removeCameraListener(ICameraListener listener)
listener
- The ICameraListener
to remove.public void setDefaultDistance(float defaultDistance)
setDefaultDistance
in class com.jme3.input.ChaseCamera
public void resetZoom()
public void unregisterInput()
InputManager
.