oa::vlm::Vec3

Struct published by the oa::vlm module.

StRust public API

Declaration

#[repr(C)]pub struct Vec3<T: Float = f32> { pub x: T, pub y: T, pub z: T, }
Public Rust declaration.

Public Methods

pub fn is_finite(self) -> bool
pub fn length_squared(self) -> T
pub fn length(self) -> T
pub fn try_normalized(self) -> Option<Self>
pub fn dot(self, other: Self) -> T
pub fn lerp(self, other: Self, amount: T) -> Self
pub fn distance_squared(self, other: Self) -> T
pub fn distance(self, other: Self) -> T
pub fn abs(self) -> Self
pub fn component_min(self) -> T
pub fn component_max(self) -> T
pub fn component_mul(self, other: Self) -> Self
pub fn component_div(self, other: Self) -> Self
pub fn min(self, other: Self) -> Self
pub fn max(self, other: Self) -> Self
pub fn clamp(self, minimum: Self, maximum: Self) -> Self
pub fn approximately_equal(self, other: Self, absolute: T, relative: T) -> bool
pub fn cross(self, other: Self) -> Self
pub fn reflect(self, normal: Self) -> Self
pub fn refract(self, normal: Self, eta: T) -> Self
pub fn face_forward(self, incident: Self, reference_normal: Self) -> Self
pub fn try_project_onto(self, onto: Self, tolerance: T) -> Option<Self>
pub fn try_reject_from(self, from: Self, tolerance: T) -> Option<Self>
pub fn try_angle_between(self, other: Self, tolerance: T) -> Option<T>
pub fn try_perpendicular(self, tolerance: T) -> Option<Self>
pub fn try_signed_angle_between( self, other: Self, axis: Self, tolerance: T, ) -> Option<T>
fn add(self, other: Self) -> Self
fn add_assign(&mut self, other: Self)
fn clone(&self) -> Vec3<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn div(self, scalar: T) -> Self
fn div_assign(&mut self, scalar: T)
fn mul(self, matrix: Mat3<T>) -> Self
fn mul(self, scalar: T) -> Self
fn mul(self, vector: Vec3<f64>) -> Self::Output
fn mul(self, vector: Vec3<f32>) -> Self::Output
fn mul_assign(&mut self, scalar: T)
fn neg(self) -> Self
fn eq(&self, other: &Vec3<T>) -> bool
fn sub(self, other: Self) -> Self
fn sub_assign(&mut self, other: Self)

Associated Functions

fn default() -> Vec3<T>

Public Data Members

xTfield
yTfield
zTfield

Public Method Documentation

pub fn is_finite( self ) -> bool
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn length_squared( self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn length( self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn try_normalized( self ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn dot( self, other: Self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn lerp( self, other: Self, amount: T ) -> Self
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn distance_squared( self, other: Self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn distance( self, other: Self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn abs( self ) -> Self
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn component_min( self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn component_max( self ) -> T
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn component_mul( self, other: Self ) -> Self
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn component_div( self, other: Self ) -> Self
No public source comment is attached to this declaration.
pub fn min( self, other: Self ) -> Self
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn max( self, other: Self ) -> Self
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn clamp( self, minimum: Self, maximum: Self ) -> Self
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn approximately_equal( self, other: Self, absolute: T, relative: T ) -> bool
Returns a unit vector, or None for a zero-length or non-finite value.
pub fn cross( self, other: Self ) -> Self
No public source comment is attached to this declaration.
pub fn reflect( self, normal: Self ) -> Self
No public source comment is attached to this declaration.
pub fn refract( self, normal: Self, eta: T ) -> Self
No public source comment is attached to this declaration.
pub fn face_forward( self, incident: Self, reference_normal: Self ) -> Self
No public source comment is attached to this declaration.
pub fn try_project_onto( self, onto: Self, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_reject_from( self, from: Self, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_angle_between( self, other: Self, tolerance: T ) -> Option<T>
No public source comment is attached to this declaration.
pub fn try_perpendicular( self, tolerance: T ) -> Option<Self>
No public source comment is attached to this declaration.
pub fn try_signed_angle_between( self, other: Self, axis: Self, tolerance: T ) -> Option<T>
No public source comment is attached to this declaration.
fn add( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn add_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
fn clone( &self ) -> Vec3<T>
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn div( self, scalar: T ) -> Self
No public source comment is attached to this declaration.
fn div_assign( &mut self, scalar: T )
No public source comment is attached to this declaration.
fn mul( self, matrix: Mat3<T> ) -> Self
No public source comment is attached to this declaration.
fn mul( self, scalar: T ) -> Self
No public source comment is attached to this declaration.
fn mul( self, vector: Vec3<f64> ) -> Self::Output
No public source comment is attached to this declaration.
fn mul( self, vector: Vec3<f32> ) -> Self::Output
No public source comment is attached to this declaration.
fn mul_assign( &mut self, scalar: T )
No public source comment is attached to this declaration.
fn neg( self ) -> Self
No public source comment is attached to this declaration.
fn eq( &self, other: &Vec3<T> ) -> bool
No public source comment is attached to this declaration.
fn sub( self, other: Self ) -> Self
No public source comment is attached to this declaration.
fn sub_assign( &mut self, other: Self )
No public source comment is attached to this declaration.
fn default() -> Vec3<T>
No public source comment is attached to this declaration.