Struct pathfinder_geometry::vector::Vector3F
source · pub struct Vector3F(pub F32x4);
Expand description
3D points.
The w value in the SIMD vector is always 0.0.
Tuple Fields§
§0: F32x4
Implementations§
source§impl Vector3F
impl Vector3F
pub fn new(x: f32, y: f32, z: f32) -> Vector3F
pub fn splat(x: f32) -> Vector3F
sourcepub fn to_4d(self) -> Vector4F
pub fn to_4d(self) -> Vector4F
Converts this vector to an equivalent 3D homogeneous one with a w component of 1.0.
pub fn cross(self, other: Vector3F) -> Vector3F
pub fn square_length(self) -> f32
pub fn length(self) -> f32
pub fn normalize(self) -> Vector3F
pub fn x(self) -> f32
pub fn y(self) -> f32
pub fn z(self) -> f32
pub fn scale(self, factor: f32) -> Vector3F
Trait Implementations§
source§impl AddAssign for Vector3F
impl AddAssign for Vector3F
source§fn add_assign(&mut self, other: Vector3F)
fn add_assign(&mut self, other: Vector3F)
Performs the
+=
operation. Read moresource§impl PartialEq for Vector3F
impl PartialEq for Vector3F
impl Copy for Vector3F
impl StructuralPartialEq for Vector3F
Auto Trait Implementations§
impl Freeze for Vector3F
impl RefUnwindSafe for Vector3F
impl Send for Vector3F
impl Sync for Vector3F
impl Unpin for Vector3F
impl UnwindSafe for Vector3F
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