mal-math
C++20 mathematics library.
|
Represents a plane in 3D space defined by its normal and two vectors. More...
#include "plane.hpp"
Public Member Functions | |
bool | Intersect (Intersection &i, Ray const &ray) const |
Checks for the intersection of the plane with a given ray. | |
void | update_plane (vec3 const &first, vec3 const &second) |
Updates the plane's vectors and normal based on two new vectors. | |
Public Attributes | |
vec3 | v |
One of the vectors defining the plane. | |
vec3 | w |
The other vector defining the plane. | |
vec3 | normal |
The normal to the plane. | |
Represents a plane in 3D space defined by its normal and two vectors.
This structure provides functionalities such as checking for intersections with rays and updating the plane based on new vector inputs.
|
inline |
Checks for the intersection of the plane with a given ray.
i | Intersection data to update if an intersection occurs. |
ray | The ray to check for intersection with the plane. |
Definition at line 37 of file plane.hpp.
Updates the plane's vectors and normal based on two new vectors.
first | The first vector to define the plane. |
second | The second vector to define the plane. |
std::invalid_argument | if the provided vectors are collinear. |
Definition at line 62 of file plane.hpp.
vec3 mal_math::Plane::v |
vec3 mal_math::Plane::w |