Package rosequartz.gfx
Class OrthographicCamera
- All Implemented Interfaces:
Serializable,Cloneable,CameraConfiguration.CameraConfigurationHolder
Represents a camera with orthographic projection, primarily used in 2D games.
All points of an object appear to be the same distance from the camera.
- See Also:
- Serialized Form
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOrthographicCamera(CameraConfiguration configuration)Creates a new OrthographicCamera from a CameraConfiguration. -
Method Summary
Methods inherited from class rosequartz.gfx.Camera
getConfiguration, getProjectionViewMatrix, getViewMatrix, setClipPlanes, setConfiguration
-
Field Details
-
left
public float left -
right
public float right -
top
public float top -
bottom
public float bottom
-
-
Constructor Details
-
OrthographicCamera
Creates a new OrthographicCamera from a CameraConfiguration.- Parameters:
configuration- configuration of the camera
-
-
Method Details
-
setBounds
Sets the bounds of the camera. The default bounds are left=-1, right=1, top=1, bottom=-1.- Parameters:
left- coordinate of the left edge of the cameraright- coordinate of the right edge of the cameratop- coordinate of the top edge of the camerabottom- coordinate of the bottom edge of the camera- Returns:
- this
-
getProjectionMatrix
Description copied from class:CameraCalculates the projection matrix for the current values of the camera.- Specified by:
getProjectionMatrixin classCamera<OrthographicCamera>- Returns:
- projection matrix
-
clone
- Specified by:
clonein classCamera<OrthographicCamera>
-
toString
-