62 Vector3(T x, T y, T z) : std::array<T, 3>({x, y, z}) {}
63 Vector3(std::array<T, 3>& arr) : std::array<T, 3>(arr) {}
64 Vector3(std::array<T, 3>&& arr) : std::array<T, 3>(std::move(arr)) {}
66 std::copy(arr.begin(), arr.end(), this->begin());
71 return {(*this)[0] + other[0], (*this)[1] + other[1], (*this)[2] + other[2]};
76 return {(*this)[0] - other[0], (*this)[1] - other[1], (*this)[2] - other[2]};
80 return {(*this)[0] - other[0], (*this)[1] - other[1], (*this)[2] - other[2]};
87 (*this)[0] += other[0];
88 (*this)[1] += other[1];
89 (*this)[2] += other[2];
102inline std::string
zeroPad(
size_t value,
size_t width) {
103 std::ostringstream oss;
104 oss << std::setw(width) << std::setfill(
'0') << value;
111inline size_t roundUp(
const size_t& number,
const size_t& multiple) {
return (number + multiple - 1) & -multiple;}
Vector3(std::array< T, 3 > &arr)
Definition utils.hpp:63
Vector3< double > operator-(const Vector3< double > &other) const
Definition utils.hpp:79
Vector3(T x, T y, T z)
Definition utils.hpp:62
Vector3(const std::array< T, 3 > &arr)
Definition utils.hpp:65
Vector3< T > operator-(const Vector3< U > &other) const
Definition utils.hpp:75
Vector3< T > & operator+=(const Vector3< U > &other)
Definition utils.hpp:86
Vector3()
Definition utils.hpp:61
Vector3(std::array< T, 3 > &&arr)
Definition utils.hpp:64
Vector3< T > & operator/=(const U &val)
Definition utils.hpp:94
Vector3< T > operator-() const
Definition utils.hpp:83
Vector3< T > operator+(const Vector3< U > &other) const
Definition utils.hpp:70
std::string zeroPad(size_t value, size_t width)
Definition utils.hpp:102
size_t roundUp(const size_t &number, const size_t &multiple)
Definition utils.hpp:111
constexpr size_t INVALID_PATCH_INDEX
Definition utils.hpp:55
uint16_t typeGeometryInput
Definition utils.hpp:49
const size_t g_infinitenumber
Definition utils.hpp:52
const typeGeometryInput g_infiniteDepth
Definition utils.hpp:51
const size_t g_valueNotSet
Definition utils.hpp:53