Struct vodk_math::vec3::Vector3D
[−]
[src]
pub struct Vector3D<Unit> { pub x: f32, pub y: f32, pub z: f32, // some fields omitted }
Fields
x: f32
y: f32
z: f32
Methods
impl<U> Vector3D<U>
[src]
fn new(x: f32, y: f32, z: f32) -> Vector3D<U>
fn from_slice(from: &[f32]) -> Vector3D<U>
fn as_slice<'l>(&'l self) -> &'l [f32]
fn as_mut_slice<'l>(&'l mut self) -> &'l mut [f32]
fn dot(&self, rhs: &Vector3D<U>) -> f32
fn cross(&self, rhs: &Vector3D<U>) -> Vector3D<U>
fn length(&self) -> f32
fn square_length(&self) -> f32
fn tuple(&self) -> (f32, f32, f32)
fn array(&self) -> [f32; 3]
fn xy(&self) -> Vector2D<U>
fn xz(&self) -> Vector2D<U>
fn yz(&self) -> Vector2D<U>
fn yx(&self) -> Vector2D<U>
fn xyz(&self) -> Vector3D<U>
fn zxy(&self) -> Vector3D<U>
fn yzx(&self) -> Vector3D<U>
fn xzy(&self) -> Vector3D<U>
fn yxz(&self) -> Vector3D<U>
fn to_vec4(&self, w: f32) -> Vector4D<U>
Trait Implementations
impl<U> AsRef<[f32; 3]> for Vector3D<U>
[src]
impl<U> AsRef<(f32, f32, f32)> for Vector3D<U>
[src]
impl<U> AsMut<[f32; 3]> for Vector3D<U>
[src]
impl<U> AsMut<(f32, f32, f32)> for Vector3D<U>
[src]
impl<U> Default for Vector3D<U>
[src]
impl<U> Add<Vector3D<U>> for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the +
operator
fn add(self, rhs: Vector3D<U>) -> Vector3D<U>
The method for the +
operator
impl<U> Sub<Vector3D<U>> for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the -
operator
fn sub(self, rhs: Vector3D<U>) -> Vector3D<U>
The method for the -
operator
impl<U> Mul<Vector3D<U>> for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the *
operator
fn mul(self, rhs: Vector3D<U>) -> Vector3D<U>
The method for the *
operator
impl<U> Mul<f32> for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the *
operator
fn mul(self, rhs: f32) -> Vector3D<U>
The method for the *
operator
impl<U> Div<Vector3D<U>> for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the /
operator
fn div(self, rhs: Vector3D<U>) -> Vector3D<U>
The method for the /
operator
impl<U> Div<f32> for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the /
operator
fn div(self, rhs: f32) -> Vector3D<U>
The method for the /
operator
impl<U> Neg for Vector3D<U>
[src]
type Output = Vector3D<U>
The resulting type after applying the -
operator
fn neg(self) -> Vector3D<U>
The method for the unary -
operator
impl<U> Copy for Vector3D<U>
[src]
impl<U> Clone for Vector3D<U>
[src]
fn clone(&self) -> Vector3D<U>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more