Package com.luciad.cameras
Class Camera.Look2D
java.lang.Object
com.luciad.cameras.Camera.Look2D
- Enclosing class:
Camera
Structure describing the position of the camera for an orthographic top-down view.
This following picture shows:
- the relation between the map and view origins
- how scaleX and scaleY map the map units (meters) onto pixels
-
Constructor Summary
ConstructorDescriptionLook2D
(Coordinate mapOrigin, Coordinate viewOrigin, double scaleX, double scaleY, Azimuth rotation) Constructs the Look2D. -
Method Summary
Modifier and TypeMethodDescriptionThe origin, defined in themap reference
.The rotation of the camera.double
The scale on the horizontal axis in device independent pixels per map unit.double
The scale on the vertical axis in device independent pixels per map unit.The view origin, defined in view coordinates (device independent pixels, (0, 0) at the bottom left of the screen).
-
Constructor Details
-
Look2D
public Look2D(@NotNull Coordinate mapOrigin, @NotNull Coordinate viewOrigin, double scaleX, double scaleY, @NotNull Azimuth rotation) Constructs the Look2D.- Parameters:
mapOrigin
- The origin, defined in themap reference
.viewOrigin
- The view origin, defined in view coordinates (device independent pixels, (0, 0) at the bottom left of the screen).scaleX
- The scale on the horizontal axis in device independent pixels per map unit.scaleY
- The scale on the vertical axis in device independent pixels per map unit.rotation
- The rotation of the camera.
-
-
Method Details
-
getMapOrigin
The origin, defined in themap reference
.The origin is mapped to
viewOrigin
. -
getViewOrigin
The view origin, defined in view coordinates (device independent pixels, (0, 0) at the bottom left of the screen).The view origin is mapped to
mapOrigin
. It is usually the center of the host component. A typical use case for changing the viewOrigin is to zoom in on a specific point, e.g. at the current mouse position. -
getScaleX
public double getScaleX()The scale on the horizontal axis in device independent pixels per map unit. -
getScaleY
public double getScaleY()The scale on the vertical axis in device independent pixels per map unit. -
getRotation
The rotation of the camera.See
Azimuth
to see how the rotation is defined.
-