42#ifndef DVD_CORE_MATH_PLANE_H_
43#define DVD_CORE_MATH_PLANE_H_
81 Plane(
const T a,
const T b,
const T c,
const T distance) noexcept
128 set(equation.xyz, equation.w);
136 void set(T a, T b, T c, T distance)
noexcept {
141 const vec3<T> edge1 = point1 - point0;
142 const vec3<T> edge2 = point2 - point0;
168 if (length >
static_cast<T
>(0))
170 const F32 invLength = 1.f / length;
194 const T denom =
Dot(
Cross(a._normal, b._normal), c._normal);
196 return (-(a._distance *
Cross(b._normal, c._normal)) -
197 b._distance *
Cross(c._normal, a._normal) -
198 c._distance *
Cross(a._normal, b._normal)) / denom;
bool compare(const Plane &rhs, F32 epsilon)
Plane(const vec3< T > &normal, T distance) noexcept
distance is stored as the negative of the specified value
bool operator!=(const Plane &rhs) const noexcept
void set(T a, T b, T c, T distance) noexcept
Plane & operator=(const Plane &other) noexcept
Plane(const vec3< T > &point0, const vec3< T > &point1, const vec3< T > &point2)
void set(const vec4< T > &equation) noexcept
vec3< T > closestPointOnPlaneToPoint(const vec3< T > &point) const
Plane(const Plane &rhs) noexcept
Plane(const T a, const T b, const T c, const T distance) noexcept
distance is stored as the negative of the specified value
Plane(const vec3< T > &normal, const vec3< T > &point)
Plane(const vec4< T > &plane) noexcept
void redefine(const vec3< T > &point0, const vec3< T > &point1, const vec3< T > &point2)
bool operator==(const Plane &rhs) const noexcept
Comparison operator.
T signedDistanceToPoint(const vec3< T > &point) const noexcept
Side classifyPoint(const vec3< F32 > &point) const noexcept
void set(const vec3< T > &normal, T distance) noexcept
void redefine(const vec3< T > &normal, const vec3< T > &point)
void cross(const vec3 &v1, const vec3 &v2) noexcept
set this vector to be equal to the cross of the 2 specified vectors
Handle console commands that start with a forward slash.
std::array< Plane< F32 >, N > PlaneList
bool IS_ZERO(const T X) noexcept
FORCE_INLINE vec3< T > GetIntersection(const Plane< T > &a, const Plane< T > &b, const Plane< T > &c) noexcept
T Dot(vec2< T > a, vec2< T > b) noexcept
general vec2 dot product
eastl::vector< Type > vector
bool COMPARE_TOLERANCE(const T X, const U Y, const T TOLERANCE) noexcept
vector< Plane< F32 > > PlaneDynamicList
vec2< T > Cross(vec2< T > v1, vec2< T > v2) noexcept
general vec2 cross function
bool COMPARE(T X, U Y) noexcept