pub struct Vector4 {
pub x: f64,
pub y: f64,
pub z: f64,
pub w: f64,
}
Expand description
4D vectors (x, y, z, w)
Fields§
§x: f64
§y: f64
§z: f64
§w: f64
Implementations§
Trait Implementations§
Source§impl AddAssign<Vector4> for Point2
impl AddAssign<Vector4> for Point2
Source§fn add_assign(&mut self, rhs: Vector4)
fn add_assign(&mut self, rhs: Vector4)
Performs the
+=
operation. Read moreSource§impl AddAssign for Vector4
impl AddAssign for Vector4
Source§fn add_assign(&mut self, rhs: Vector4)
fn add_assign(&mut self, rhs: Vector4)
Performs the
+=
operation. Read moreSource§impl DivAssign<f64> for Vector4
impl DivAssign<f64> for Vector4
Source§fn div_assign(&mut self, rhs: f64)
fn div_assign(&mut self, rhs: f64)
Performs the
/=
operation. Read moreSource§impl Homogeneous<Vector4> for Vector3
impl Homogeneous<Vector4> for Vector3
Source§fn from_homogeneous(vector: &Vector4) -> Self
fn from_homogeneous(vector: &Vector4) -> Self
Get a inhomogeneous vector from an homogeneous vector Read more
Source§fn to_homogeneous(&self) -> Vector4
fn to_homogeneous(&self) -> Vector4
Get a vector transformed to an homogeneous vector Read more
Source§impl Initializer for Vector4
impl Initializer for Vector4
Source§impl Interpolation for Vector4
impl Interpolation for Vector4
Source§fn set_herp(
&mut self,
other: &Self,
other1: &Self,
other2: &Self,
s: f64,
) -> &mut Self
fn set_herp( &mut self, other: &Self, other1: &Self, other2: &Self, s: f64, ) -> &mut Self
Set the Hermite’s interpolation
Source§fn set_berp(
&mut self,
other: &Self,
other1: &Self,
other2: &Self,
s: f64,
) -> &mut Self
fn set_berp( &mut self, other: &Self, other1: &Self, other2: &Self, s: f64, ) -> &mut Self
Set the Bezier’s interpolation
Source§impl Metric for Vector4
impl Metric for Vector4
Source§fn magnitude2(&self) -> f64
fn magnitude2(&self) -> f64
Squared magnitude of an object
Source§fn set_normalized(&mut self) -> &mut Self
fn set_normalized(&mut self) -> &mut Self
Normalizes the vector, ie. sets magnitude to 1 without changing direction
Source§fn normalized(&self) -> Self
fn normalized(&self) -> Self
Get the normalized vector, ie. vector with same direction and magnitude 1
Source§impl MulAssign<Matrix4> for Vector4
impl MulAssign<Matrix4> for Vector4
Source§fn mul_assign(&mut self, rhs: Matrix4)
fn mul_assign(&mut self, rhs: Matrix4)
Performs the
*=
operation. Read moreSource§impl MulAssign<f64> for Vector4
impl MulAssign<f64> for Vector4
Source§fn mul_assign(&mut self, rhs: f64)
fn mul_assign(&mut self, rhs: f64)
Performs the
*=
operation. Read moreSource§impl SubAssign<Vector4> for Point2
impl SubAssign<Vector4> for Point2
Source§fn sub_assign(&mut self, rhs: Vector4)
fn sub_assign(&mut self, rhs: Vector4)
Performs the
-=
operation. Read moreSource§impl SubAssign for Vector4
impl SubAssign for Vector4
Source§fn sub_assign(&mut self, rhs: Vector4)
fn sub_assign(&mut self, rhs: Vector4)
Performs the
-=
operation. Read moreimpl Copy for Vector4
Auto Trait Implementations§
impl Freeze for Vector4
impl RefUnwindSafe for Vector4
impl Send for Vector4
impl Sync for Vector4
impl Unpin for Vector4
impl UnwindSafe for Vector4
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more