Manages camera positioning, orbit rotations, panning, zooming, and view-projection matrices.
More...
#include <Camera3D.hpp>
Manages camera positioning, orbit rotations, panning, zooming, and view-projection matrices.
◆ Camera3D()
| correlation::render3d::Camera3D::Camera3D |
( |
| ) |
|
|
defaultnoexcept |
Constructs camera with default orbital parameters.
◆ aspectRatio()
| float correlation::render3d::Camera3D::aspectRatio |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ azimuth()
| float correlation::render3d::Camera3D::azimuth |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ distance()
| float correlation::render3d::Camera3D::distance |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ elevation()
| float correlation::render3d::Camera3D::elevation |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ eyePosition()
| math::Vector3< float > correlation::render3d::Camera3D::eyePosition |
( |
| ) |
const |
|
nodiscardnoexcept |
Computes eye position in world space.
- Returns
- Eye coordinate.
◆ fitToBox()
Automatically frames the camera around a 3D bounding box.
- Parameters
-
| min_pt | Minimum bounding box corner. |
| max_pt | Maximum bounding box corner. |
◆ fov()
| float correlation::render3d::Camera3D::fov |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ isOrthographic()
| bool correlation::render3d::Camera3D::isOrthographic |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ orbit()
| void correlation::render3d::Camera3D::orbit |
( |
float | delta_azimuth_deg, |
|
|
float | delta_elevation_deg ) |
|
noexcept |
Orbits the camera around the current target.
- Parameters
-
| delta_azimuth_deg | Horizontal angle change in degrees. |
| delta_elevation_deg | Vertical angle change in degrees. |
◆ pan()
| void correlation::render3d::Camera3D::pan |
( |
float | delta_x, |
|
|
float | delta_y ) |
|
noexcept |
Pans the camera target along the view-aligned screen plane.
- Parameters
-
| delta_x | Horizontal translation delta. |
| delta_y | Vertical translation delta. |
◆ projectionMatrix()
| Matrix4< float > correlation::render3d::Camera3D::projectionMatrix |
( |
| ) |
const |
|
nodiscard |
Generates perspective projection matrix.
- Returns
- 4x4 Projection matrix.
◆ projectionMode()
| ProjectionMode correlation::render3d::Camera3D::projectionMode |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ setClipPlanes()
| void correlation::render3d::Camera3D::setClipPlanes |
( |
float | z_near, |
|
|
float | z_far ) |
|
noexcept |
Sets near and far clipping planes.
- Parameters
-
| z_near | Near clip distance (> 0). |
| z_far | Far clip distance (> z_near). |
◆ setDistance()
| void correlation::render3d::Camera3D::setDistance |
( |
float | distance | ) |
|
|
noexcept |
Sets orbital camera distance directly (clamped to valid range).
- Parameters
-
| distance | Orbital distance from target in Angstroms. |
◆ setFov()
| void correlation::render3d::Camera3D::setFov |
( |
float | fov_y_deg | ) |
|
|
noexcept |
Sets vertical field of view.
- Parameters
-
◆ setOrientation()
| void correlation::render3d::Camera3D::setOrientation |
( |
float | azimuth_deg, |
|
|
float | elevation_deg ) |
|
noexcept |
Sets camera orbit orientation directly in degrees.
- Parameters
-
| azimuth_deg | Horizontal azimuth angle in degrees. |
| elevation_deg | Vertical elevation angle in degrees. |
◆ setProjectionMode()
| void correlation::render3d::Camera3D::setProjectionMode |
( |
ProjectionMode | mode | ) |
|
|
inlinenoexcept |
◆ setTarget()
| void correlation::render3d::Camera3D::setTarget |
( |
const math::Vector3< float > & | target | ) |
|
|
noexcept |
Sets target look-at point.
- Parameters
-
| target | World coordinates of the focus target. |
◆ setViewport()
| void correlation::render3d::Camera3D::setViewport |
( |
float | width, |
|
|
float | height ) |
|
noexcept |
Updates viewport aspect ratio.
- Parameters
-
| width | Viewport pixel width. |
| height | Viewport pixel height. |
◆ target()
| const math::Vector3< float > & correlation::render3d::Camera3D::target |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ viewMatrix()
| Matrix4< float > correlation::render3d::Camera3D::viewMatrix |
( |
| ) |
const |
|
nodiscard |
Generates current view matrix.
- Returns
- 4x4 View matrix.
◆ viewProjectionMatrix()
| Matrix4< float > correlation::render3d::Camera3D::viewProjectionMatrix |
( |
| ) |
const |
|
nodiscard |
Generates combined view-projection matrix (P * V).
- Returns
- 4x4 View-projection matrix.
◆ zoom()
| void correlation::render3d::Camera3D::zoom |
( |
float | factor | ) |
|
|
noexcept |
Zooms camera by adjusting orbital distance.
- Parameters
-
| factor | Zoom factor (positive zooms in, negative zooms out). |
◆ aspect_ratio_
| float correlation::render3d::Camera3D::aspect_ratio_ {1.3333F} |
|
private |
◆ azimuth_deg_
| float correlation::render3d::Camera3D::azimuth_deg_ {0.0F} |
|
private |
◆ distance_
| float correlation::render3d::Camera3D::distance_ {20.0F} |
|
private |
◆ elevation_deg_
| float correlation::render3d::Camera3D::elevation_deg_ {20.0F} |
|
private |
◆ fov_y_deg_
| float correlation::render3d::Camera3D::fov_y_deg_ {45.0F} |
|
private |
◆ projection_mode_
◆ target_
| math::Vector3<float> correlation::render3d::Camera3D::target_ {0.0F, 0.0F, 0.0F} |
|
private |
◆ world_up_
| math::Vector3<float> correlation::render3d::Camera3D::world_up_ {0.0F, 1.0F, 0.0F} |
|
private |
◆ z_far_
| float correlation::render3d::Camera3D::z_far_ {2000.0F} |
|
private |
◆ z_near_
| float correlation::render3d::Camera3D::z_near_ {0.1F} |
|
private |
The documentation for this class was generated from the following files: