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<'de, T, U> Deserialize<'de> for HomogeneousVector<T, U>where
T: Deserialize<'de>,
impl<'de, T, U> Deserialize<'de> for HomogeneousVector<T, U>where T: Deserialize<'de>,
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<HomogeneousVector<T, U>> for HomogeneousVector<T, U>where
T: PartialEq,
impl<T, U> PartialEq<HomogeneousVector<T, U>> for HomogeneousVector<T, U>where T: PartialEq,
source§impl<T, U> Serialize for HomogeneousVector<T, U>where
T: Serialize,
impl<T, U> Serialize for HomogeneousVector<T, U>where T: Serialize,
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>where T: Send, U: Send,
impl<T, U> Sync for HomogeneousVector<T, U>where T: Sync, U: Sync,
impl<T, U> Unpin for HomogeneousVector<T, U>where T: Unpin, U: Unpin,
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