[−][src]Struct euclid::HomogeneousVector
Homogeneous vector in 3D space.
Fields
x: T
y: T
z: T
w: T
Methods
impl<T, U> HomogeneousVector<T, U>
[src]
impl<T, U> HomogeneousVector<T, U>
impl<T: Copy + Div<T, Output = T> + Zero + PartialOrd, U> HomogeneousVector<T, U>
[src]
impl<T: Copy + Div<T, Output = T> + Zero + PartialOrd, U> HomogeneousVector<T, U>
pub fn to_point2d(&self) -> Option<TypedPoint2D<T, U>>
[src]
pub fn to_point2d(&self) -> Option<TypedPoint2D<T, U>>
Convert into Cartesian 2D point.
Returns None if the point is on or behind the W=0 hemisphere.
pub fn to_point3d(&self) -> Option<TypedPoint3D<T, U>>
[src]
pub fn to_point3d(&self) -> Option<TypedPoint3D<T, U>>
Convert into Cartesian 3D point.
Returns None if the point is on or behind the W=0 hemisphere.
Trait Implementations
impl<T, U> PartialEq<HomogeneousVector<T, U>> for HomogeneousVector<T, U> where
T: PartialEq,
[src]
impl<T, U> PartialEq<HomogeneousVector<T, U>> for HomogeneousVector<T, U> where
T: PartialEq,
fn eq(&self, other: &Self) -> bool
[src]
fn eq(&self, other: &Self) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<T, U> Eq for HomogeneousVector<T, U> where
T: Eq,
[src]
impl<T, U> Eq for HomogeneousVector<T, U> where
T: Eq,
impl<T: Zero, U> From<TypedVector2D<T, U>> for HomogeneousVector<T, U>
[src]
impl<T: Zero, U> From<TypedVector2D<T, U>> for HomogeneousVector<T, U>
fn from(v: TypedVector2D<T, U>) -> Self
[src]
fn from(v: TypedVector2D<T, U>) -> Self
Performs the conversion.
impl<T: Zero, U> From<TypedVector3D<T, U>> for HomogeneousVector<T, U>
[src]
impl<T: Zero, U> From<TypedVector3D<T, U>> for HomogeneousVector<T, U>
fn from(v: TypedVector3D<T, U>) -> Self
[src]
fn from(v: TypedVector3D<T, U>) -> Self
Performs the conversion.
impl<T: Zero + One, U> From<TypedPoint2D<T, U>> for HomogeneousVector<T, U>
[src]
impl<T: Zero + One, U> From<TypedPoint2D<T, U>> for HomogeneousVector<T, U>
fn from(p: TypedPoint2D<T, U>) -> Self
[src]
fn from(p: TypedPoint2D<T, U>) -> Self
Performs the conversion.
impl<T: One, U> From<TypedPoint3D<T, U>> for HomogeneousVector<T, U>
[src]
impl<T: One, U> From<TypedPoint3D<T, U>> for HomogeneousVector<T, U>
fn from(p: TypedPoint3D<T, U>) -> Self
[src]
fn from(p: TypedPoint3D<T, U>) -> Self
Performs the conversion.
impl<T: Display, U> Display for HomogeneousVector<T, U>
[src]
impl<T: Display, U> Display for HomogeneousVector<T, U>
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Debug, U> Debug for HomogeneousVector<T, U>
[src]
impl<T: Debug, U> Debug for HomogeneousVector<T, U>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T, U> Hash for HomogeneousVector<T, U> where
T: Hash,
[src]
impl<T, U> Hash for HomogeneousVector<T, U> where
T: Hash,
fn hash<H: Hasher>(&self, h: &mut H)
[src]
fn hash<H: Hasher>(&self, h: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: Copy, U> Copy for HomogeneousVector<T, U>
[src]
impl<T: Copy, U> Copy for HomogeneousVector<T, U>
impl<T: Clone, U> Clone for HomogeneousVector<T, U>
[src]
impl<T: Clone, U> Clone for HomogeneousVector<T, U>
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T, U> Serialize for HomogeneousVector<T, U> where
T: Serialize,
[src]
impl<T, U> Serialize for HomogeneousVector<T, U> where
T: Serialize,
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de, T, U> Deserialize<'de> for HomogeneousVector<T, U> where
T: Deserialize<'de>,
[src]
impl<'de, T, U> Deserialize<'de> for HomogeneousVector<T, U> where
T: Deserialize<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl<T, U> Send for HomogeneousVector<T, U> where
T: Send,
U: Send,
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> Sync for HomogeneousVector<T, U> where
T: Sync,
U: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,