Struct euclid::HomogeneousVector
source · #[repr(C)]pub struct HomogeneousVector<T, U> {
pub x: T,
pub y: T,
pub z: T,
pub w: T,
/* private fields */
}
Expand description
Homogeneous vector in 3D space.
Fields§
§x: T
§y: T
§z: T
§w: T
Implementations§
source§impl<T, U> HomogeneousVector<T, U>
impl<T, U> HomogeneousVector<T, U>
source§impl<T: Copy + Div<T, Output = T> + Zero + PartialOrd, U> HomogeneousVector<T, U>
impl<T: Copy + Div<T, Output = T> + Zero + PartialOrd, U> HomogeneousVector<T, U>
sourcepub fn to_point2d(self) -> Option<Point2D<T, U>>
pub fn to_point2d(self) -> Option<Point2D<T, U>>
Convert into Cartesian 2D point.
Returns None if the point is on or behind the W=0 hemisphere.
sourcepub fn to_point3d(self) -> Option<Point3D<T, U>>
pub fn to_point3d(self) -> Option<Point3D<T, U>>
Convert into Cartesian 3D point.
Returns None if the point is on or behind the W=0 hemisphere.
Trait Implementations§
source§impl<T: Clone, U> Clone for HomogeneousVector<T, U>
impl<T: Clone, U> Clone for HomogeneousVector<T, U>
source§impl<T: Debug, U> Debug for HomogeneousVector<T, U>
impl<T: Debug, U> Debug for HomogeneousVector<T, U>
source§impl<T, U> Hash for HomogeneousVector<T, U>where
T: Hash,
impl<T, U> Hash for HomogeneousVector<T, U>where
T: Hash,
source§impl<T, U> PartialEq for HomogeneousVector<T, U>where
T: PartialEq,
impl<T, U> PartialEq for HomogeneousVector<T, U>where
T: PartialEq,
impl<T: Copy, U> Copy for HomogeneousVector<T, U>
impl<T, U> Eq for HomogeneousVector<T, U>where
T: Eq,
Auto Trait Implementations§
impl<T, U> RefUnwindSafe for HomogeneousVector<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for HomogeneousVector<T, U>
impl<T, U> Sync for HomogeneousVector<T, U>
impl<T, U> Unpin for HomogeneousVector<T, U>
impl<T, U> UnwindSafe for HomogeneousVector<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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