plane
| Type | Struct |
| Namespace | conjure::math |
| Include File Path | engine/include/conjure/core/math/plane.h |
| Source File Path | N/A |
| API ↗ | Math |
Syntax
Variables
| Access | Name | Type | Default | Description |
|---|---|---|---|---|
| public | distance | f32 | 0.0f | |
| public | normal | vec3 | vec3(0.0f, |
Functions
Public
from_point_normal
from_point_normalThe plane through point with the given normal, normalised. A zero normal yields the default (Y up) plane through the point.
from_points
from_pointsThe plane through three counter-clockwise points (normal = cross(b - a, c - a)), normalised. Collinear points yield the default (Y up) plane through a.
normalize
normalizevoid normalize() noexcept;Scales the equation so that the normal has unit length. A zero normal is left as is.
project
projectThe orthogonal projection of a point onto the plane (requires a unit normal).
signed_distance
signed_distancedot(normal, point) + distance: positive in front of the plane, negative behind, zero on it. A metric distance only when the normal has unit length.