#[repr(C)]pub struct Point3_<T> {
pub x: T,
pub y: T,
pub z: T,
}Expand description
Fields§
§x: T§y: T§z: TImplementations§
source§impl<T> Point3_<T>
impl<T> Point3_<T>
pub fn new(x: T, y: T, z: T) -> Self
pub fn from_vec3(vec: VecN<T, 3>) -> Self
pub fn from_point(pt: Point_<T>) -> Selfwhere
T: Zero,
pub fn cross(self, pt: Self) -> Selfwhere
T: NumOps + Copy,
pub fn dot(self, pt: Self) -> Twhere
T: NumOps,
pub fn ddot(self, pt: Self) -> f64where
f64: From<T>,
pub fn norm(self) -> f64where
f64: From<T>,
pub fn to<D: NumCast>(self) -> Option<Point3_<D>>where
T: ToPrimitive,
pub fn to_vec3(self) -> VecN<T, 3>
Trait Implementations§
source§impl<T: AddAssign> AddAssign<Point3_<T>> for Point3_<T>
impl<T: AddAssign> AddAssign<Point3_<T>> for Point3_<T>
source§fn add_assign(&mut self, rhs: Point3_<T>)
fn add_assign(&mut self, rhs: Point3_<T>)
Performs the
+= operation. Read moresource§impl<T: DivAssign + Copy> DivAssign<T> for Point3_<T>
impl<T: DivAssign + Copy> DivAssign<T> for Point3_<T>
source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
Performs the
/= operation. Read moresource§impl<T: MulAssign + Copy> MulAssign<T> for Point3_<T>
impl<T: MulAssign + Copy> MulAssign<T> for Point3_<T>
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
Performs the
*= operation. Read moresource§impl<T: PartialEq> PartialEq<Point3_<T>> for Point3_<T>
impl<T: PartialEq> PartialEq<Point3_<T>> for Point3_<T>
source§impl<T: PartialOrd> PartialOrd<Point3_<T>> for Point3_<T>
impl<T: PartialOrd> PartialOrd<Point3_<T>> for Point3_<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<T: SubAssign> SubAssign<Point3_<T>> for Point3_<T>
impl<T: SubAssign> SubAssign<Point3_<T>> for Point3_<T>
source§fn sub_assign(&mut self, rhs: Point3_<T>)
fn sub_assign(&mut self, rhs: Point3_<T>)
Performs the
-= operation. Read more