Type Alias euclid::default::HomogeneousVector
source · pub type HomogeneousVector<T> = HomogeneousVector<T, UnknownUnit>;
Aliased Type§
struct HomogeneousVector<T> {
pub x: T,
pub y: T,
pub z: T,
pub w: T,
/* private fields */
}
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