Class camera#

Class Documentation#

class camera#

Abstract class to control a camera in a window.

A class to control a camera in a window. When modifying the Position/FocalPoint/ViewUp API or the camera movements API, the view up is automatically orthogonalized. All angles are in degrees.

Parameters

virtual camera &setPosition(const point3_t &pos) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual point3_t getPosition() = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual void getPosition(point3_t &pos) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual camera &setFocalPoint(const point3_t &foc) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual point3_t getFocalPoint() = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual void getFocalPoint(point3_t &foc) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual camera &setViewUp(const vector3_t &up) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual vector3_t getViewUp() = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual void getViewUp(vector3_t &up) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual camera &setViewAngle(const angle_deg_t &angle) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual angle_deg_t getViewAngle() = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual void getViewAngle(angle_deg_t &angle) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual camera &setState(const camera_state_t &state) = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual camera_state_t getState() = 0#

Set/Get the camera parameters. Angles are in degrees.

virtual void getState(camera_state_t &state) = 0#

Set/Get the camera parameters. Angles are in degrees.

Manipulation

Standard camera manipulation methods. Angles are in degrees.

virtual camera &dolly(double val) = 0#

Divide the camera’s distance from the focal point by the given value.

virtual camera &pan(double right, double up, double forward = 0) = 0#

Move the camera along its horizontal, vertical, and forward axes

virtual camera &zoom(double factor) = 0#

Decrease the view angle (or the parallel scale in parallel mode) by the specified factor.

virtual camera &roll(angle_deg_t angle) = 0#

Rotate the camera about its forward axis.

virtual camera &azimuth(angle_deg_t angle) = 0#

Rotate the camera about its vertical axis, centered at the focal point.

virtual camera &yaw(angle_deg_t angle) = 0#

Rotate the camera about its vertical axis, centered the camera’s position.

virtual camera &elevation(angle_deg_t angle) = 0#

Rotate the camera about its horizontal axis, centered at the focal point.

virtual camera &pitch(angle_deg_t angle) = 0#

Rotate the camera about its horizontal axis, centered the camera’s position.

Public Functions

virtual camera &setCurrentAsDefault() = 0#

Store the current camera configuration as default.

virtual camera &resetToDefault() = 0#

Reset the camera to the stored default camera configuration.

virtual camera &resetToBounds(double zoomFactor = 0.9) = 0#

Reset the camera using the bounds of actors in the scene. Provided zoomFactor will be used to position the camera. A value of 1 correspond to the bounds roughly aligned to the edges of the window.