Struct pathfinder_geometry::vector::Vector4F
source · pub struct Vector4F(pub F32x4);
Expand description
3D homogeneous points.
Tuple Fields§
§0: F32x4
Implementations§
source§impl Vector4F
impl Vector4F
pub fn new(x: f32, y: f32, z: f32, w: f32) -> Vector4F
pub fn splat(value: f32) -> Vector4F
pub fn to_2d(self) -> Vector2F
pub fn x(self) -> f32
pub fn y(self) -> f32
pub fn z(self) -> f32
pub fn w(self) -> f32
pub fn scale(self, x: f32) -> Vector4F
pub fn set_x(&mut self, x: f32)
pub fn set_y(&mut self, y: f32)
pub fn set_z(&mut self, z: f32)
pub fn set_w(&mut self, w: f32)
pub fn approx_eq(self, other: Vector4F, epsilon: f32) -> bool
sourcepub fn is_zero(self) -> bool
pub fn is_zero(self) -> bool
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
Trait Implementations§
source§impl AddAssign for Vector4F
impl AddAssign for Vector4F
source§fn add_assign(&mut self, other: Vector4F)
fn add_assign(&mut self, other: Vector4F)
Performs the
+=
operation. Read moresource§impl Mul<Vector4F> for Transform4F
impl Mul<Vector4F> for Transform4F
source§impl PartialEq for Vector4F
impl PartialEq for Vector4F
impl Copy for Vector4F
impl StructuralPartialEq for Vector4F
Auto Trait Implementations§
impl Freeze for Vector4F
impl RefUnwindSafe for Vector4F
impl Send for Vector4F
impl Sync for Vector4F
impl Unpin for Vector4F
impl UnwindSafe for Vector4F
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