41#ifndef UFO_CORE_NORMAL_HPP
42#define UFO_CORE_NORMAL_HPP
45#include <ufo/numeric/vec.hpp>
78template <std::
size_t Dim = 3, std::
floating_po
int T =
float>
83 constexpr Normal() noexcept = default;
90 constexpr
Normal(
Vec<Dim, T> const& normal) noexcept :
Vec<Dim, T>(normal) {}
97 template <std::convertible_to<T>... Args>
98 requires(
sizeof...(Args) == Dim)
144template <std::
size_t Dim, std::formattable<
char> T>
145struct std::formatter<
ufo::Normal<Dim, T>> : std::formatter<ufo::Vec<Dim, T>> {
150 return std::formatter<ufo::Vec<Dim, T>>::format(n, ctx);
164template <std::
size_t Dim,
class T>
167 return out << std::format(
"{}", n);
All vision-related classes and functions.
Represents an N-dimensional unit surface normal vector as a fixed-size array.
constexpr Normal(Args... args) noexcept
Constructs from exactly Dim scalar components.
constexpr Normal() noexcept=default
Default-constructs with indeterminate component values.
A fixed-size arithmetic vector of up to 4 dimensions.