pub struct Plane {
pub facing: Vector,
pub offset: f32,
}Expand description
Single-precision plane
Fields§
§facing: VectorA normalized directional vector for the direction the plane faces.
offset: f32The offset of the plane from the origin in the direction of facing
Implementations§
Source§impl Plane
impl Plane
Sourcepub fn new(dir: Vector, ofs: f32) -> Plane
pub fn new(dir: Vector, ofs: f32) -> Plane
Create a new plane from directional vector, and offset from origin.
Sourcepub fn isdistpos_point(&self, p: Vector) -> bool
pub fn isdistpos_point(&self, p: Vector) -> bool
Returns true if distance from Plane to point is positive.
Sourcepub fn isdistpos_bcube(&self, bcube: BCube) -> bool
pub fn isdistpos_bcube(&self, bcube: BCube) -> bool
Returns true if distance from Plane to BCube is positive
Trait Implementations§
impl Copy for Plane
impl StructuralPartialEq for Plane
Auto Trait Implementations§
impl Freeze for Plane
impl RefUnwindSafe for Plane
impl Send for Plane
impl Sync for Plane
impl Unpin for Plane
impl UnwindSafe for Plane
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