53 value{0.0, 0.0, 0.0, 0.0} {}
56 value{pl[0], pl[1], pl[2], pl[3]} {}
61 value{v[0], v[1], v[2], v[3]} {}
63 constexpr t_plane(value_type nx, value_type ny, value_type nz, value_type in_p) :
64 value{nx, ny, nz, in_p} {}
67 value{normal.x, normal.y, normal.z, in_p} {}
70 value{normal.x, normal.y, normal.z, -dot(position, normal)} {}
74 value{v[0], v[1], v[2], v[3]} {}
78 value{v[0], v[1], v[2], v[3]} {}
80 constexpr std::size_t size()
const {
return 4; }
82 value_type& operator[](std::size_t i) {
return value[i]; }
83 value_type operator[](std::size_t i)
const {
return value[i]; }
88 value[0] =
static_cast<value_type
>(rhs[0]);
89 value[1] =
static_cast<value_type
>(rhs[1]);
90 value[2] =
static_cast<value_type
>(rhs[2]);
91 value[3] =
static_cast<value_type
>(rhs[3]);
95 void set(value_type in_x, value_type in_y, value_type in_z, value_type in_d)
103 bool valid()
const {
return n.x != 0.0 && n.y != 0.0 && n.z != 0.0; }
105 explicit operator bool()
const noexcept {
return valid(); }
107 T* data() {
return value; }
108 const T* data()
const {
return value; }