public abstract class BasicCameraController extends java.lang.Object implements ICameraController
Constructor and Description |
---|
BasicCameraController(javafx.scene.Camera camera,
javafx.scene.Scene scene,
javafx.embed.swt.FXCanvas canvas)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
handleKeyPressed(javafx.scene.input.KeyEvent event)
This function defines the camera's behavior when a keyboard button is
pressed.
|
abstract void |
handleMouseDragged(javafx.scene.input.MouseEvent event)
This function defines the camera's behavior when the mouse is dragged.
|
abstract void |
handleMousePressed(javafx.scene.input.MouseEvent event)
This function defines the camera's behavior when a mouse button is
pressed.
|
abstract void |
handleMouseReleased(javafx.scene.input.MouseEvent event)
This function defines the camera's behavior when a mouse button is
released.
|
abstract void |
handleMouseScroll(javafx.scene.input.ScrollEvent event)
This function defines the camera's behavior when the mouse wheel is
scrolled.
|
abstract void |
pitchCamera(double radians)
Change the camera's pitch, its rotation about the axis perpendicular to
its heading to the right, controlling how it is pointed in an up/down
direction.
|
abstract void |
raiseCamera(double distance)
Move the camera to the up or down, orthogonal to the direction it is
pointing.
|
abstract void |
reset()
Resets the camera to its default position.
|
abstract void |
rollCamera(double radians)
Change the camera's roll, it's rotation about the axis it is pointing.
|
void |
setDefaultAngle(double x,
double y,
double z)
Set the default angle for the camera.
|
abstract void |
strafeCamera(double distance)
Move the camera to the left or right, orthogonal to the direction it is
pointing.
|
abstract void |
thrustCamera(double distance)
Move the camera forward or backwards in the direction it is pointing.
|
abstract void |
yawCamera(double radians)
Change the camera's yaw, its rotation about the axis perpendicular to its
heading in to the above, controlling how it is pointed in a left/right
direction.
|
public BasicCameraController(javafx.scene.Camera camera, javafx.scene.Scene scene, javafx.embed.swt.FXCanvas canvas)
camera
- The camera this controller will manage.scene
- The scene the camera is viewing.canvas
- The FXCanvas containing the scene.public abstract void handleKeyPressed(javafx.scene.input.KeyEvent event)
event
- An event sent to the scene.public abstract void handleMouseDragged(javafx.scene.input.MouseEvent event)
event
- An event sent to the scene.public abstract void handleMousePressed(javafx.scene.input.MouseEvent event)
event
- An event sent to the scene.public abstract void handleMouseReleased(javafx.scene.input.MouseEvent event)
event
- An event sent to the scene.public abstract void handleMouseScroll(javafx.scene.input.ScrollEvent event)
event
- An event sent to the scene.public abstract void reset()
ICameraController
reset
in interface ICameraController
public abstract void pitchCamera(double radians)
ICameraController
pitchCamera
in interface ICameraController
radians
- The number of radians by which to rotate the camera.public abstract void rollCamera(double radians)
ICameraController
rollCamera
in interface ICameraController
radians
- The number of radians by which to rotate the camera.public abstract void raiseCamera(double distance)
ICameraController
raiseCamera
in interface ICameraController
distance
- The amount of space to move the camera. Positive distances
move the camera up, negative distances move it down.public abstract void strafeCamera(double distance)
ICameraController
strafeCamera
in interface ICameraController
distance
- The amount of space to move the camera. Positive distances
move the camera right, negative distances move it left.public abstract void thrustCamera(double distance)
ICameraController
thrustCamera
in interface ICameraController
distance
- The amount of space to move the camera. Positive distances
move the camera forward, negative distances move it backwards.public abstract void yawCamera(double radians)
ICameraController
yawCamera
in interface ICameraController
radians
- The number of radians by which to rotate the camera.public void setDefaultAngle(double x, double y, double z)
ICameraController
setDefaultAngle
in interface ICameraController
x
- The number of degrees of X axis rotation.y
- The number of degrees of Y axis rotation.z
- The number of degrees of Z axis rotation.