Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Plane equation := dot(n, x - p) = 0 -> Ax + By + Cz + d == 0. More...
#include <frustum.hpp>
Public Member Functions | |
constexpr | Plane () noexcept |
constexpr | Plane (const Plane &o) noexcept=default |
constexpr | Plane (Plane &&o) noexcept=default |
constexpr float | distanceTo (const float x, const float y, const float z) const noexcept |
Return signed distance of plane to given point. More... | |
constexpr float | distanceTo (const jau::math::Vec3f &p) const noexcept |
Return distance of plane to given point, see distanceTo(float, float, float) . More... | |
constexpr Plane & | operator= (const Plane &) noexcept=default |
constexpr Plane & | operator= (Plane &&) noexcept=default |
constexpr Plane & | set (const jau::math::Vec3f &n_, const jau::math::Vec3f &p0) noexcept |
Setup of plane using given normal and one point on plane. More... | |
constexpr Plane & | set (const jau::math::Vec3f &p0, const jau::math::Vec3f &p1, const jau::math::Vec3f &p2) noexcept |
Setup of plane using 3 points. More... | |
constexpr void | toFloats (float out[]) const noexcept |
Sets the given [float[off]..float[off+4]) out to ( n, d ) . More... | |
std::string | toString () const noexcept |
constexpr jau::math::Vec4f & | toVec4f (jau::math::Vec4f &out) const noexcept |
Sets the given vec4f out to ( n, d ) . More... | |
Public Attributes | |
float | d |
Distance to origin. More... | |
jau::math::Vec3f | n |
Normal of the plane. More... | |
Plane equation := dot(n, x - p) = 0 -> Ax + By + Cz + d == 0.
In order to work w/ isOutside(..)
methods, the normals have to point to the inside of the frustum.
Definition at line 151 of file frustum.hpp.
|
inlineconstexprnoexcept |
Definition at line 159 of file frustum.hpp.
|
constexprdefaultnoexcept |
|
constexprdefaultnoexcept |
|
constexprdefaultnoexcept |
|
inlineconstexprnoexcept |
Setup of plane using 3 points.
None of the three points are mutated.
Since this method may not properly define whether the normal points inside the frustum, consider using set(Vec3f, Vec3f)
.
p0 | point on plane, used as the shared start-point for vec(p0->p1) and vec(p0->p2) |
p1 | point on plane |
p2 | point on plane |
Definition at line 178 of file frustum.hpp.
|
inlineconstexprnoexcept |
Setup of plane using given normal and one point on plane.
The given normal is mutated, the point not mutated.
n_ | normal to plane pointing to the inside of this frustum |
p0 | point on plane, consider choosing the closest point to origin |
Definition at line 192 of file frustum.hpp.
|
inlineconstexprnoexcept |
Sets the given vec4f out
to ( n, d )
.
Returns out
for chaining.
Definition at line 199 of file frustum.hpp.
|
inlineconstexprnoexcept |
Sets the given [float[off]..float[off+4])
out
to ( n, d )
.
out | the float[off+4] output array |
Definition at line 208 of file frustum.hpp.
|
inlineconstexprnoexcept |
Return signed distance of plane to given point.
A plane cuts 3D space into 2 half spaces.
Positive halfspace is where the plane’s normals vector points into.
Negative halfspace is the other side of the plane, i.e. *-1
Definition at line 230 of file frustum.hpp.
|
inlineconstexprnoexcept |
Return distance of plane to given point, see distanceTo(float, float, float)
.
Definition at line 235 of file frustum.hpp.
|
inlinenoexcept |
Definition at line 239 of file frustum.hpp.
jau::math::Vec3f jau::math::geom::Frustum::Plane::n |
Normal of the plane.
Definition at line 154 of file frustum.hpp.
float jau::math::geom::Frustum::Plane::d |
Distance to origin.
Definition at line 157 of file frustum.hpp.