pub struct Plane3 {
pub normal: Vec3,
pub distance: f32,
}Expand description
Plane represented as normal dot position + distance >= 0.
Fields§
§normal: Vec3Inward-facing plane normal.
distance: f32Signed distance term.
Implementations§
Source§impl Plane3
impl Plane3
Sourcepub const fn new(normal: Vec3, distance: f32) -> Self
pub const fn new(normal: Vec3, distance: f32) -> Self
Creates a plane from a normal and distance term.
Sourcepub fn from_normal_and_point(normal: Vec3, point: Position3) -> Self
pub fn from_normal_and_point(normal: Vec3, point: Position3) -> Self
Creates a plane passing through a point.
Sourcepub fn signed_distance_to_position(self, position: Position3) -> f32
pub fn signed_distance_to_position(self, position: Position3) -> f32
Signed distance from a position to this plane.
Sourcepub fn intersects_aabb(self, aabb: Aabb3) -> bool
pub fn intersects_aabb(self, aabb: Aabb3) -> bool
Returns whether an AABB intersects this plane’s positive half-space.
Trait Implementations§
impl Copy for Plane3
impl StructuralPartialEq for Plane3
Auto Trait Implementations§
impl Freeze for Plane3
impl RefUnwindSafe for Plane3
impl Send for Plane3
impl Sync for Plane3
impl Unpin for Plane3
impl UnsafeUnpin for Plane3
impl UnwindSafe for Plane3
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more