24 constexpr lookat& operator=(
lookat const&)
noexcept =
default;
25 constexpr lookat& operator=(
lookat&&)
noexcept =
default;
27 constexpr lookat(point3 camera_location, point3 lookat_location,
vector3 up =
vector3{0.0f, 1.0f, 0.0f}) :
28 _camera_location(camera_location), _lookat_location(lookat_location), _up(up)
32 [[nodiscard]]
constexpr operator matrix3()
noexcept
34 hilet f = normalize(_lookat_location - _camera_location);
35 hilet s = normalize(cross(f, _up));
36 hilet u = cross(s, f);
38 hilet eye =
vector3{
static_cast<f32x4
>(_camera_location).xyz0()};
43 s.x(), u.x(), -f.x(), -dot(s, eye),
44 s.y(), u.y(), -f.y(), -dot(u, eye),
45 s.z(), u.z(), -f.z(), -dot(f, eye),
46 0.0f , 0.0f , 0.0f , 1.0f
52 point3 _camera_location;
53 point3 _lookat_location;
A high-level geometric vector Part of the high-level vector, point, mat and color types.
Definition vector3.hpp:19