8#include "../utility/utility.hpp"
9#include "../macros.hpp"
14hi_export_module(hikogui.geometry : perspective);
16hi_export
namespace hi {
inline namespace v1 {
59 auto const a = _aspect_ratio;
60 auto const t = _tan_half_fov_y;
62 auto const n = _znear;
66 1.0f / (a * t), 0.0f , 0.0f , 0.0f,
67 0.0f , 1.0f / t, 0.0f , 0.0f,
68 0.0f , 0.0f , f / (n - f), -(f * n) / (f - n),
69 0.0f , 0.0f , -1.0f , 0.0f
75 float _tan_half_fov_y;
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
A high-level geometric extent.
Definition extent2.hpp:32
A 2D or 3D homogenius matrix for transforming homogenious vectors and points.
Definition matrix3.hpp:36
Perspective transform.
Definition perspective.hpp:21
perspective(float fov_y, float aspect_ratio, float znear, float zfar) noexcept
Create a right-handed perspective transform.
Definition perspective.hpp:37
perspective(float fov_y, extent2 view_port, float znear, float zfar) noexcept
Create a right-handed perspective transform.
Definition perspective.hpp:52