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.