pub struct Plane { /* private fields */ }Expand description
An unbounded plane.
The frame’s z is the normal; x and y span the surface and fix its
parameterization.
Implementations§
Source§impl Plane
impl Plane
Sourcepub fn through(origin: Point, normal: Direction) -> Self
pub fn through(origin: Point, normal: Direction) -> Self
The plane through origin with the given normal, parameterized
arbitrarily but deterministically.
Sourcepub fn through_points(
a: Point,
b: Point,
c: Point,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn through_points( a: Point, b: Point, c: Point, tol: Tolerances, ) -> OgeomResult<Self>
The plane through three points, with the normal following the right-hand
rule around a, b, c.
§Errors
OgeomError::Construction if the points
are collinear.
Sourcepub fn signed_distance_to(&self, p: Point) -> f64
pub fn signed_distance_to(&self, p: Point) -> f64
The signed distance from p, positive on the side the normal points to.
Sourcepub fn distance_to(&self, p: Point) -> f64
pub fn distance_to(&self, p: Point) -> f64
The distance from p.
Sourcepub fn contains(&self, p: Point, tol: Tolerances) -> bool
pub fn contains(&self, p: Point, tol: Tolerances) -> bool
Whether p lies on the plane within tol.confusion().
Sourcepub fn transformed(&self, t: &Transform, tol: Tolerances) -> OgeomResult<Self>
pub fn transformed(&self, t: &Transform, tol: Tolerances) -> OgeomResult<Self>
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 UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.