pub enum Plane {
XY,
XZ,
YZ,
}
Expand description
Axis aligned planes, used to describe how imported ‘flat’ data is arranged in space
Variants§
Implementations§
Source§impl Plane
impl Plane
Sourcepub fn point_to_3d<T: GenericVector3>(&self, point: T::Vector2) -> T
pub fn point_to_3d<T: GenericVector3>(&self, point: T::Vector2) -> T
Copy this Point2 into a Point3, populating the axes defined by ‘plane’
Plane::XY
: Point2(AB)
-> Point3(AB0)
Plane::XZ
: Point2(AB)
-> Point3(A0B)
Plane::YZ
: Point2(AB)
-> Point3(0BA)
Sourcepub fn point_to_2d<T: GenericVector3>(&self, point: T) -> T::Vector2
pub fn point_to_2d<T: GenericVector3>(&self, point: T) -> T::Vector2
Copy this Point3 into a Point2, populating the axes defined by ‘plane’
Plane::XY
: Point3(ABC)
-> Point2(AB)
Plane::XZ
: Point3(ABC)
-> Point2(AC)
Plane::YZ
: Point3(ABC)
-> Point2(CB)
Sourcepub fn points_to_3d<'a, T: GenericVector3 + 'a, I>(
&self,
iter: I,
) -> impl Iterator<Item = T> + 'awhere
I: IntoIterator + 'a,
I::Item: Borrow<T::Vector2>,
<T as GenericVector3>::Vector2: 'a + ToOwned<Owned = T::Vector2>,
pub fn points_to_3d<'a, T: GenericVector3 + 'a, I>(
&self,
iter: I,
) -> impl Iterator<Item = T> + 'awhere
I: IntoIterator + 'a,
I::Item: Borrow<T::Vector2>,
<T as GenericVector3>::Vector2: 'a + ToOwned<Owned = T::Vector2>,
Convert an iterator of 2D points into 3D points based on the plane.
This works like .map()
, but optimized for the plane.
Plane::XY
: Point2(AB)
-> Point3(AB0)
Plane::XZ
: Point2(AB)
-> Point3(A0B)
Plane::YZ
: Point2(AB)
-> Point3(0BA)
Sourcepub fn points_to_2d<'a, T: GenericVector2 + 'a, I>(
&self,
iter: I,
) -> impl Iterator<Item = T> + 'awhere
I: IntoIterator + 'a,
I::Item: Borrow<T::Vector3>,
<T as GenericVector2>::Vector3: 'a + ToOwned<Owned = T::Vector3>,
pub fn points_to_2d<'a, T: GenericVector2 + 'a, I>(
&self,
iter: I,
) -> impl Iterator<Item = T> + 'awhere
I: IntoIterator + 'a,
I::Item: Borrow<T::Vector3>,
<T as GenericVector2>::Vector3: 'a + ToOwned<Owned = T::Vector3>,
Convert an iterator of 3D points into 2D points based on the plane.
This works like .map()
, but optimized for the plane.
Plane::XY
: Point3(ABC)
-> Point2(AB)
Plane::XZ
: Point3(ABC)
-> Point2(AC)
Plane::YZ
: Point3(ABC)
-> Point2(CB)
Trait Implementations§
impl Copy for Plane
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.