Package shapes
Class CameraContainer
java.lang.Object
shapes.CameraContainer
A class to handle the camera movement more easily.
It contains a PerspectiveCamera and a 3D Vector for its position
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.PerspectiveCamera
void
Moves the position vector by adding a new one to it and updates the position of the cameravoid
Sets the new position of the vector and updates the position of the cameravoid
update()
Updates the position of the camera to the position of the vector
-
Constructor Details
-
CameraContainer
public CameraContainer(boolean fixedAtZero)
-
-
Method Details
-
setPos
Sets the new position of the vector and updates the position of the camera- Parameters:
newPos
- the new position of the vector
-
move
Moves the position vector by adding a new one to it and updates the position of the camera- Parameters:
moveVec
- the vector to be added to the current position vector
-
update
public void update()Updates the position of the camera to the position of the vector -
getPerspectiveCamera
public javafx.scene.PerspectiveCamera getPerspectiveCamera()
-