13#include "../macros.hpp"
17hi_export_module(hikogui.geometry : lookat);
19hi_export
namespace hi {
inline namespace v1 {
29 constexpr lookat& operator=(
lookat const&)
noexcept =
default;
30 constexpr lookat& operator=(
lookat&&)
noexcept =
default;
39 auto const f = normalize(_lookat_location - _camera_location);
40 auto const s = normalize(cross(f, _up));
41 auto const u = cross(s, f);
48 s.x(),
u.x(), -f.x(), -dot(s,
eye),
49 s.y(),
u.y(), -f.y(), -dot(
u,
eye),
50 s.z(),
u.z(), -f.z(), -dot(f,
eye),
51 0.0f , 0.0f , 0.0f , 1.0f
57 point3 _camera_location;
58 point3 _lookat_location;
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
Perspective transform.
Definition lookat.hpp:24
A 2D or 3D homogenius matrix for transforming homogenious vectors and points.
Definition matrix3.hpp:36
A high-level geometric vector Part of the high-level vector, point, mat and color types.
Definition vector3.hpp:26