NGL
6.5
The NCCA Graphics Library
|
#include <Plane.h>
Public Member Functions | |
Plane (const Vec3 &_v1, const Vec3 &_v2, const Vec3 &_v3) noexcept | |
ctor passing in 3 vectors for the plane More... | |
Plane () noexcept | |
default ctor More... | |
~Plane () noexcept | |
dtor (not used) More... | |
void | setPoints (const Vec3 &_v1, const Vec3 &_v2, const Vec3 &_v3) noexcept |
set the plane from 3 points More... | |
void | setNormalPoint (const Vec3 &_normal, const Vec3 &_point) noexcept |
set the plane from a normal and a point More... | |
void | setFloats (Real _a, Real _b, Real _c, Real _d) noexcept |
set the plane from the co-efficients More... | |
Real | distance (const Vec3 &_p) const noexcept |
get the distance from the point _p to the plane More... | |
Vec3 | getNormal () const noexcept |
accesor to get the normal More... | |
Vec3 | getPoint () const noexcept |
accesor to get the point More... | |
Real | getD () const noexcept |
accesor to get D More... | |
Private Attributes | |
Vec3 | m_normal |
the normal of the plane More... | |
Vec3 | m_point |
the point position of the normal / plane More... | |
Real | m_d |
the co-efficient of the plane More... | |
ctor passing in 3 vectors for the plane
[in] | _v1 | the first Point |
[in] | _v2 | the second Point |
[in] | _v3 | the third Point |
Definition at line 31 of file Plane.cpp.
References setPoints().
get the distance from the point _p to the plane
[in] | _p | the position to check agains |
Definition at line 75 of file Plane.cpp.
References ngl::Vec3::inner(), m_d, and m_normal.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
set the plane from the co-efficients
[in] | _a | the first co-efficient |
[in] | _b | the second co-efficient |
[in] | _c | the third co-efficient |
[in] | _d | the fourth co-efficient |
Definition at line 62 of file Plane.cpp.
References ngl::Vec3::length(), m_d, m_normal, ngl::Vec3::normalize(), and ngl::Vec3::set().
set the plane from a normal and a point
[in] | _normal | the normal |
[in] | _point | the point |
Definition at line 54 of file Plane.cpp.
References ngl::Vec3::inner(), m_d, m_normal, m_point, and ngl::Vec3::normalize().
set the plane from 3 points
[in] | _v1 | the first point |
[in] | _v2 | the second point |
[in] | _v3 | the third point |
Definition at line 42 of file Plane.cpp.
References ngl::Vec3::cross(), ngl::Vec3::inner(), m_d, m_normal, m_point, and ngl::Vec3::normalize().
|
private |