33#include <NDEVR/Vector.h>
52 template<u
int01 t_dims,
class t_type,
class t_vector_type = Vector<t_dims, t_type>>
59 constexpr explicit Vertex(
const t_type& scaler)
60 : t_vector_type(scaler)
62 constexpr Vertex(
const t_vector_type& vector)
63 : t_vector_type(vector)
66 : t_vector_type(vector)
68 constexpr Vertex(
const t_type x,
const t_type y)
71 constexpr Vertex(t_type x, t_type y, t_type z)
72 : t_vector_type(x, y, z)
74 constexpr Vertex(
const t_type x,
const t_type y,
const t_type z,
const t_type w)
75 : t_vector_type(x, y, z, w)
77 constexpr explicit Vertex(
const t_type(&vector)[t_dims])
78 : t_vector_type(vector)
81 : t_vector_type(vector, postfix)
83 constexpr Vertex(
const Vector<
getMax(t_dims - 2, 0), t_type>& vector,
const t_type postfix_a,
const t_type postfix_b)
84 : t_vector_type(vector, postfix_a, postfix_b)
87 : t_vector_type(prefix, vector)
105 template<u
int01 t_new_dim,
class t_new_type,
class t_new_vector = Vector<t_new_dim, t_new_type>>
110 template<
class t_new_type,
class t_new_vector = Vector<t_dims, t_new_type>>
115 template<u
int01 t_new_dim,
class t_new_type,
class t_new_vector = Vector<t_new_dim, t_new_type>>
198 t_vector_type::operator=(scaler);
219 t_vector_type::operator=(vector);
224 t_vector_type::operator=(vector);
245 template<u
int01 t_dims,
class t_type,
class t_base>
249 for (
uint01 dim = 0; dim < t_dims; dim++)
251 vec[dim] =
getMax(v1[dim], v2[dim]);
272 template<u
int01 t_dims,
class t_type,
class t_base>
276 for (
uint01 dim = 0; dim < t_dims; dim++)
278 vec[dim] =
getMin(v1[dim], v2[dim]);
292 template<u
int01 t_dims,
class t_type,
class t_vector_type>
319 template<u
int01 t_dims,
class t_type,
class t_vector_type>
320 static constexpr bool isNaN(
const Vertex<t_dims, t_type, t_vector_type>& value)
322 for (
uint01 dim = 0; dim < t_dims; ++dim)
324 if (isNaN(value[dim]))
339 template<u
int01 t_dims,
class t_type,
class t_vector_type = Vector<t_dims, t_type>>
340 class Ray :
public t_vector_type
346 constexpr explicit Ray(
const t_type& scaler)
347 : t_vector_type(scaler)
349 constexpr Ray(
const t_vector_type& vector)
350 : t_vector_type(vector)
353 : t_vector_type(vector)
355 constexpr Ray(
const t_type x,
const t_type y)
356 : t_vector_type(x, y)
358 constexpr Ray(t_type x, t_type y, t_type z)
359 : t_vector_type(x, y, z)
361 constexpr Ray(
const t_type x,
const t_type y,
const t_type z,
const t_type w)
362 : t_vector_type(x, y, z, w)
364 constexpr explicit Ray(
const t_type(&vector)[t_dims])
365 : t_vector_type(vector)
367 constexpr Ray(
const Vector<
getMax(t_dims - 1, 0), t_type>& vector,
const t_type postfix)
368 : t_vector_type(vector, postfix)
370 constexpr Ray(
const Vector<
getMax(t_dims - 2, 0), t_type>& vector,
const t_type postfix_a,
const t_type postfix_b)
371 : t_vector_type(vector, postfix_a, postfix_b)
374 : t_vector_type(prefix, vector)
392 template<u
int01 t_new_dim,
class t_new_type,
class t_new_vector = Vector<t_new_dim, t_new_type>>
397 template<
class t_new_type,
class t_new_vector = Vector<t_dims, t_new_type>>
422 return (*
this *
scale);
443 return (*
this *
scale);
464 t_vector_type::operator=(scaler);
485 t_vector_type::operator=(vector);
490 t_vector_type::operator=(vector);
511 template<u
int01 t_dims,
class t_type,
class t_base>
515 for (
uint01 dim = 0; dim < t_dims; dim++)
538 template<u
int01 t_dims,
class t_type,
class t_base>
542 for (
uint01 dim = 0; dim < t_dims; dim++)
558 template<u
int01 t_dims,
class t_type,
class t_vector_type>
585 template<u
int01 t_dims,
class t_type,
class t_vector_type>
586 static constexpr bool isNaN(
const Ray<t_dims, t_type, t_vector_type>& value)
588 for (
uint01 dim = 0; dim < t_dims; ++dim)
590 if (isNaN(value[dim]))
599 struct hash<
NDEVR::Vertex<3, NDEVR::fltp08>>
603 std::size_t h = 0, g = 0;
607 h = (h << 4) + bytes[i];
617 struct hash<
NDEVR::Vertex<3, NDEVR::fltp04>>
621 std::size_t h = 0, g = 0;
625 h = (h << 4) + bytes[i];
Definition Vertex.hpp:341
constexpr Ray(const t_type(&vector)[t_dims])
Definition Vertex.hpp:364
constexpr Ray(t_type x, t_type y, t_type z)
Definition Vertex.hpp:358
constexpr Ray(const Vector< getMax(t_dims - 1, 0), t_type > &vector, const t_type postfix)
Definition Vertex.hpp:367
constexpr Ray< t_dims, t_type, t_vector_type > & operator=(const t_vector_type &vector)
Definition Vertex.hpp:483
constexpr Ray(const t_type &scaler)
Definition Vertex.hpp:346
constexpr Ray(const Ray< t_dims, t_type, t_vector_type > &vector)
Definition Vertex.hpp:352
constexpr Ray(const t_type x, const t_type y, const t_type z, const t_type w)
Definition Vertex.hpp:361
constexpr Ray(const t_vector_type &vector)
Definition Vertex.hpp:349
constexpr Ray scale(const t_vector_type &scale) const
Definition Vertex.hpp:420
constexpr Ray< t_dims, t_type, t_vector_type > & operator=(const Ray< t_dims, t_type, t_vector_type > &vector)
Definition Vertex.hpp:488
constexpr Ray scale(const t_type scale) const
Definition Vertex.hpp:441
constexpr Ray< t_new_dim, t_new_type, t_new_vector > as(t_new_type extra_fill_value=0) const
Definition Vertex.hpp:393
constexpr Ray(const Vector< getMax(t_dims - 2, 0), t_type > &vector, const t_type postfix_a, const t_type postfix_b)
Definition Vertex.hpp:370
constexpr Ray(const t_type x, const t_type y)
Definition Vertex.hpp:355
constexpr Ray< t_dims, t_new_type, t_new_vector > as() const
Definition Vertex.hpp:398
constexpr Ray< t_dims, t_type, t_vector_type > & operator=(const t_type &scaler)
Definition Vertex.hpp:462
constexpr Ray()
Definition Vertex.hpp:343
constexpr Ray(const t_type prefix, const Vector< t_dims - 1, t_type > &vector)
Definition Vertex.hpp:373
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
A vertex.
Definition Vertex.hpp:54
constexpr Vertex(const t_type(&vector)[t_dims])
Definition Vertex.hpp:77
constexpr Vertex< t_new_dim, t_new_type, t_new_vector > as() const
Definition Vertex.hpp:106
constexpr Vertex scale(const t_vector_type &scale, const Vertex< t_dims, t_type > ¢er) const
Definition Vertex.hpp:138
constexpr Vertex(const t_type &scaler)
Definition Vertex.hpp:59
constexpr Vertex(const t_type x, const t_type y)
Definition Vertex.hpp:68
constexpr Vertex< t_new_dim, t_new_type, t_new_vector > as(t_new_type extra_fill_value) const
Definition Vertex.hpp:116
constexpr Vertex scale(const t_type scale, const Vertex< t_dims, t_type > ¢er) const
Definition Vertex.hpp:159
constexpr const Vertex & center() const
Definition Vertex.hpp:176
constexpr Vertex< t_dims, t_new_type, t_new_vector > as() const
Definition Vertex.hpp:111
constexpr Vertex(const Vector< getMax(t_dims - 1, 0), t_type > &vector, const t_type postfix)
Definition Vertex.hpp:80
constexpr Vertex(const t_type prefix, const Vector< t_dims - 1, t_type > &vector)
Definition Vertex.hpp:86
constexpr Vertex< t_dims, t_type, t_vector_type > & operator=(const t_vector_type &vector)
Definition Vertex.hpp:217
constexpr Vertex< t_dims, t_type, t_vector_type > & operator=(const Vertex< t_dims, t_type, t_vector_type > &vector)
Definition Vertex.hpp:222
constexpr Vertex()
Definition Vertex.hpp:56
constexpr Vertex< t_dims, t_type, t_vector_type > & operator=(const t_type &scaler)
Definition Vertex.hpp:196
constexpr Vertex(t_type x, t_type y, t_type z)
Definition Vertex.hpp:71
constexpr Vertex(const Vertex< t_dims, t_type, t_vector_type > &vector)
Definition Vertex.hpp:65
constexpr Vertex(const t_vector_type &vector)
Definition Vertex.hpp:62
constexpr Vertex(const Vector< getMax(t_dims - 2, 0), t_type > &vector, const t_type postfix_a, const t_type postfix_b)
Definition Vertex.hpp:83
constexpr Vertex(const t_type x, const t_type y, const t_type z, const t_type w)
Definition Vertex.hpp:74
constexpr t_type getMax(const t_type &left, const t_type &right)
Finds the max of the given arguments using the > operator.
Definition BaseFunctions.hpp:116
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:98
constexpr Angle< t_angle_type > abs(const Angle< t_angle_type > &value)
Definition AngleFunctions.h:750
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181
constexpr t_type getMin(const t_type &left, const t_type &right)
Finds the minimum of the given arguments based on the < operator.
Definition BaseFunctions.hpp:67
Definition BaseValues.hpp:272
static const t_type Min
Definition BaseValues.hpp:276
static const t_type Max
Definition BaseValues.hpp:278
static const t_type NaN
Definition BaseValues.hpp:274
std::size_t operator()(const NDEVR::Vertex< 3, NDEVR::fltp04 > &s) const noexcept
Definition Vertex.hpp:619
std::size_t operator()(const NDEVR::Vertex< 3, NDEVR::fltp08 > &s) const noexcept
Definition Vertex.hpp:601