32namespace utility::graphic
39 template<
typename Type>
62 :
FieldOfView(Type { 0 }, Type { 0 }, Type { 0 }, Type { 0 })
202 return std::abs(_up - _down) <= epsilon
203 && std::abs(_left - _right) <= epsilon;
210 using FieldOfViewF = FieldOfView<float>;
215 using FieldOfViewD = FieldOfView<double>;
223 std::ostream &operator<<(std::ostream &stream,
const FieldOfViewF &fov);
231 std::ostream &operator<<(std::ostream &stream,
const FieldOfViewD &fov);
Field of view representation in radians for up, down, left, and right directions.
FieldOfView & setRight(const Type right)
Set right field-of-view in radians.
FieldOfView & setDown(const Type down)
Set down field-of-view in radians.
FieldOfView & setLeft(const Type left)
Set left field-of-view in radians.
FieldOfView(void)
Default constructor initializing all FOV angles to 0 radians.
FieldOfView(Type up, Type down, Type left, Type right)
Constructor to initialize field of view angles in radians.
Type getLeft(void) const noexcept
Get left field-of-view in radians.
Type getUp(void) const noexcept
Get up field-of-view in radians.
FieldOfView(const FieldOfView &other)=default
Copy constructor.
FieldOfView & operator=(const FieldOfView &other)=default
Copy assignment operator.
Type getDown(void) const noexcept
Get down field-of-view in radians.
~FieldOfView(void)=default
Default destructor for FieldOfView.
FieldOfView(FieldOfView &&other) noexcept=default
Move constructor.
Type getRight(void) const noexcept
Get right field-of-view in radians.
FieldOfView & operator=(FieldOfView &&other) noexcept=default
Move assignment operator.
bool isSymmetric(Type epsilon=Type { 1e-6 }) const noexcept
Check if this FOV is symmetric around vertical and horizontal axes.
FieldOfView & setUp(const Type up)
Set up field-of-view in radians.
Concept to constrain field-of-view component type.