[−][src]Struct pathfinder_geometry::vector::Vector4F
3D homogeneous points.
Methods
impl Vector4F
[src]
pub fn new(x: f32, y: f32, z: f32, w: f32) -> Vector4F
[src]
pub fn splat(value: f32) -> Vector4F
[src]
pub fn to_2d(self) -> Vector2F
[src]
pub fn x(self) -> f32
[src]
pub fn y(self) -> f32
[src]
pub fn z(self) -> f32
[src]
pub fn w(self) -> f32
[src]
pub fn scale(self, x: f32) -> Vector4F
[src]
pub fn set_x(&mut self, x: f32)
[src]
pub fn set_y(&mut self, y: f32)
[src]
pub fn set_z(&mut self, z: f32)
[src]
pub fn set_w(&mut self, w: f32)
[src]
pub fn perspective_divide(self) -> Vector4F
[src]
pub fn approx_eq(self, other: Vector4F, epsilon: f32) -> bool
[src]
pub fn is_zero(self) -> bool
[src]
Checks to see whether this homogeneous coordinate equals zero.
Note that since this treats the coordinate as a homogeneous coordinate, the w
is ignored.
pub fn lerp(self, other: Vector4F, t: f32) -> Vector4F
[src]
Trait Implementations
impl Clone for Vector4F
[src]
impl Copy for Vector4F
[src]
impl Default for Vector4F
[src]
impl PartialEq<Vector4F> for Vector4F
[src]
impl Debug for Vector4F
[src]
impl Add<Vector4F> for Vector4F
[src]
type Output = Vector4F
The resulting type after applying the +
operator.
fn add(self, other: Vector4F) -> Vector4F
[src]
impl Mul<Vector4F> for Transform4F
[src]
type Output = Vector4F
The resulting type after applying the *
operator.
fn mul(self, vector: Vector4F) -> Vector4F
[src]
impl Mul<Vector4F> for Vector4F
[src]
type Output = Vector4F
The resulting type after applying the *
operator.
fn mul(self, other: Vector4F) -> Vector4F
[src]
impl Neg for Vector4F
[src]
type Output = Vector4F
The resulting type after applying the -
operator.
fn neg(self) -> Vector4F
[src]
NB: This does not negate w, because that is rarely what you what for homogeneous coordinates.
impl AddAssign<Vector4F> for Vector4F
[src]
fn add_assign(&mut self, other: Vector4F)
[src]
impl StructuralPartialEq for Vector4F
[src]
Auto Trait Implementations
impl Send for Vector4F
impl Sync for Vector4F
impl Unpin for Vector4F
impl UnwindSafe for Vector4F
impl RefUnwindSafe for Vector4F
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,