LuciadCPillar 2023.1.04
luciad::Camera::Look2D Struct Reference

Structure describing the position of the camera for an orthographic top-down view. More...

#include <luciad/cameras/Camera.h>

Public Member Functions

 Look2D (Coordinate mapOrigin, Coordinate viewOrigin, double scaleX, double scaleY, Azimuth rotation)
 Constructs the Look2D. More...
 

Public Attributes

Coordinate mapOrigin
 The origin, defined in the map reference. More...
 
Azimuth rotation = 0.0
 The rotation of the camera. More...
 
double scaleX
 The scale on the horizontal axis in device independent pixels per map unit. More...
 
double scaleY
 The scale on the vertical axis in device independent pixels per map unit. More...
 
Coordinate viewOrigin
 The view origin, defined in view coordinates (device independent pixels, (0, 0) at the bottom left of the screen). More...
 

Detailed Description

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
Camera Look2D

Constructor & Destructor Documentation

◆ Look2D()

luciad::Camera::Look2D::Look2D ( Coordinate  mapOrigin,
Coordinate  viewOrigin,
double  scaleX,
double  scaleY,
Azimuth  rotation 
)
inline

Constructs the Look2D.

Parameters
mapOriginThe origin, defined in the map reference.
viewOriginThe view origin, defined in view coordinates (device independent pixels, (0, 0) at the bottom left of the screen).
scaleXThe scale on the horizontal axis in device independent pixels per map unit.
scaleYThe scale on the vertical axis in device independent pixels per map unit.
rotationThe rotation of the camera.

Member Data Documentation

◆ mapOrigin

Coordinate luciad::Camera::Look2D::mapOrigin

The origin, defined in the map reference.

The origin is mapped to viewOrigin.

◆ rotation

Azimuth luciad::Camera::Look2D::rotation = 0.0

The rotation of the camera.

See Azimuth to see how the rotation is defined.

◆ scaleX

double luciad::Camera::Look2D::scaleX

The scale on the horizontal axis in device independent pixels per map unit.

◆ scaleY

double luciad::Camera::Look2D::scaleY

The scale on the vertical axis in device independent pixels per map unit.

◆ viewOrigin

Coordinate luciad::Camera::Look2D::viewOrigin

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.