32namespace orrery::viz {
65 core::Real
elevation =
static_cast<core::Real
>(0.3);
85 core::Real far_fraction = 10;
91 [[nodiscard]]
Mat4 view() const noexcept;
93 [[nodiscard]]
Mat4 projection(core::Real aspect_ratio) const noexcept;
99 void orbit(core::Real delta_azimuth, core::Real delta_elevation) noexcept;
110 void zoom(core::Real factor) noexcept;
117 void pan(core::Real right, core::Real up) noexcept;
A camera that orbits a point.
Definition camera.hpp:42
core::Real near_fraction
The near and far clipping distances, as fractions of the distance to the target.
Definition camera.hpp:84
core::Vec3 eye() const noexcept
Where the camera is, which follows from the target, the distance and the two angles.
core::Real azimuth
The angle in the x-y plane, in radians, measured from the positive x axis.
Definition camera.hpp:62
void zoom(core::Real factor) noexcept
Move towards or away from the target by a multiplicative factor.
core::Real elevation
The angle above the x-y plane, in radians.
Definition camera.hpp:65
void pan(core::Real right, core::Real up) noexcept
Slide the target across the plane of the screen.
void orbit(core::Real delta_azimuth, core::Real delta_elevation) noexcept
Turn about the target, clamping the elevation away from the poles.
core::Vec3 target
The point the camera looks at.
Definition camera.hpp:56
Mat4 view_projection(core::Real aspect_ratio) const noexcept
The product of the two, which is the only matrix the renderer needs.
core::Real distance
The distance from the target, which is what zooming changes.
Definition camera.hpp:59
core::Real field_of_view
The whole vertical angle the frustum spans, in radians.
Definition camera.hpp:73
static constexpr core::Real kMaximumElevation
The largest angle from the plane the camera will take, in radians.
Definition camera.hpp:53
The 4-by-4 transforms a camera needs, and nothing else.
A vector in three-dimensional Euclidean space.
Definition vec3.hpp:26
A 4-by-4 transform in column-major order.
Definition matrix4.hpp:58
The scalar and index types that every layer of the project agrees on.
A three-component vector for interfaces, not for storage.