CMSC23700 Common Code Library
Support code for CS23700 programming projects
|
representation of a oriented 3D plane More...
#include <cs237-plane.hpp>
Public Types | |
using | vec3 = glm::vec< 3, T, glm::defaultp > |
using | vec4 = glm::vec< 4, T, glm::defaultp > |
Public Member Functions | |
Plane () | |
unit normal and signed distance from origin | |
Plane (vec3 n, T d) | |
specify a plane as a unit-length normal vector and signed distance from origin | |
Plane (vec3 n, vec3 p) | |
specify a plane as a normal vector and point on the plane | |
vec3 | norm () const |
get the plane normal vector | |
T | dist () const |
signed distance from origin to plane | |
T | distanceToPt (vec3 const &p) const |
signed distance from a point to plane | |
vec3 | project (vec3 const &p) const |
std::string | toString () const |
the string representation of a plane | |
Public Attributes | |
vec4 | _nd |
|
inline |
unit normal and signed distance from origin
specify a plane as a unit-length normal vector and signed distance from origin
n | unit-length plane normal vector |
d | signed distance from origin to the plane |
specify a plane as a normal vector and point on the plane
n | plane-normal vector (does not have to be unit length) |
p | a point on the plane |
|
inline |
signed distance from origin to plane
signed distance from a point to plane
p | a point in space |
p
to the plane
|
inline |
get the plane normal vector
project a point onto the plane
p | a point in space |
p
onto the plane.
|
inline |
the string representation of a plane
vec4 cs237::__detail::Plane< T >::_nd |