Struct nannou::prelude::Vector3[][src]

#[repr(C)]
pub struct Vector3<S> { pub x: S, pub y: S, pub z: S, }

A 3-dimensional vector.

This type is marked as #[repr(C)].

Fields

The x component of the vector.

The y component of the vector.

The z component of the vector.

Methods

impl<S> Vector3<S> where
    S: BaseNum
[src]

A unit vector in the x direction.

A unit vector in the y direction.

A unit vector in the z direction.

Returns the cross product of the vector and other.

Create a Vector4, using the x, y and z values from this vector, and the provided w.

Create a Vector2, dropping the z value.

impl<S> Vector3<S>
[src]

Construct a new vector, using the provided values.

Perform the given operation on each field in the vector, returning a new point constructed from the operations.

impl<S> Vector3<S> where
    S: Copy + NumCast
[src]

Component-wise casting to another type.

Trait Implementations

impl<S> IndexMut<RangeFrom<usize>> for Vector3<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<RangeFull> for Vector3<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<Range<usize>> for Vector3<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<usize> for Vector3<S>
[src]

Important traits for &'a mut R

Performs the mutable indexing (container[index]) operation.

impl<S> IndexMut<RangeTo<usize>> for Vector3<S>
[src]

Important traits for &'a [u8]

Performs the mutable indexing (container[index]) operation.

impl<S> ElementWise<Vector3<S>> for Vector3<S> where
    S: BaseNum
[src]

impl<S> ElementWise<S> for Vector3<S> where
    S: BaseNum
[src]

impl<S> Rand for Vector3<S> where
    S: BaseFloat + Rand
[src]

Generates a random instance of this type using the specified source of randomness. Read more

impl<S> Hash for Vector3<S> where
    S: Hash
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<S> InnerSpace for Vector3<S> where
    S: BaseFloat
[src]

Vector dot (or inner) product.

Returns the angle between two vectors in radians.

Returns true if the vector is perpendicular (at right angles) to the other vector. Read more

Returns the squared magnitude. Read more

The distance from the tail to the tip of the vector.

Returns a vector with the same direction, but with a magnitude of 1.

Returns a vector with the same direction and a given magnitude.

Returns the result of linearly interpolating the magnitude of the vector towards the magnitude of other by the specified amount. Read more

Returns the vector projection of the current inner space projected onto the supplied argument. Read more

impl<'a, 'b, S> Sub<&'a Vector3<S>> for &'b Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<Vector3<S>> for &'a Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<&'a Vector3<S>> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Sub<Vector3<S>> for Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<&'a Vector3<S>> for Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, 'b, S> Sub<&'a Vector3<S>> for &'b Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<'a, S> Sub<Vector3<S>> for &'a Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Sub<Vector3<S>> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<S> Clone for Vector3<S> where
    S: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S> VectorSpace for Vector3<S> where
    S: BaseNum
[src]

The associated scalar.

impl<S> MulAssign<S> for Vector3<S> where
    S: BaseNum + MulAssign<S>, 
[src]

Performs the *= operation.

impl<S> Debug for Vector3<S> where
    S: Debug
[src]

Formats the value using the given formatter. Read more

impl<'a, S> Sum<&'a Vector3<S>> for Vector3<S> where
    S: 'a + BaseNum
[src]

Method which takes an iterator and generates Self from the elements by "summing up" the items. Read more

impl<S> Sum<Vector3<S>> for Vector3<S> where
    S: BaseNum
[src]

Method which takes an iterator and generates Self from the elements by "summing up" the items. Read more

impl<S> Serialize for Vector3<S> where
    S: Serialize
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de, S> Deserialize<'de> for Vector3<S> where
    S: Deserialize<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl<S> Mul<Vector3<S>> for Matrix3<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<i8>> for i8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<u64>> for u64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<u32>> for u32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<u8>> for u8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<i16>> for i16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<u32>> for u32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<u16>> for u16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<i16>> for i16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<f64>> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<isize>> for isize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Mul<Vector3<S>> for Quaternion<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<f64>> for f64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<S> for &'a Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<u64>> for u64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<i8>> for i8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<i32>> for i32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<f32>> for f32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<usize>> for usize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<&'a Vector3<S>> for Matrix3<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<Vector3<S>> for &'a Quaternion<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<u8>> for u8
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<isize>> for isize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<i64>> for i64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, 'b, S> Mul<&'a Vector3<S>> for &'b Quaternion<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<i32>> for i32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<&'a Vector3<S>> for Quaternion<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<usize>> for usize
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<i64>> for i64
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, S> Mul<Vector3<S>> for &'a Matrix3<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vector3<f32>> for f32
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> Mul<S> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a, 'b, S> Mul<&'a Vector3<S>> for &'b Matrix3<S> where
    S: BaseFloat
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<'a> Mul<&'a Vector3<u16>> for u16
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<S> RemAssign<S> for Vector3<S> where
    S: BaseNum + RemAssign<S>, 
[src]

Performs the %= operation.

impl<S> AsRef<(S, S, S)> for Vector3<S>
[src]

Performs the conversion.

impl<S> AsRef<[S; 3]> for Vector3<S>
[src]

Performs the conversion.

impl<S> Neg for Vector3<S> where
    S: Neg<Output = S>, 
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl<S> AddAssign<Vector3<S>> for Vector3<S> where
    S: BaseNum + AddAssign<S>, 
[src]

Performs the += operation.

impl<S> AddAssign<Vector3<S>> for Point3<S> where
    S: BaseNum + AddAssign<S>, 
[src]

Performs the += operation.

impl<S> From<[S; 3]> for Vector3<S> where
    S: Clone
[src]

Performs the conversion.

impl<'a, S> From<&'a (S, S, S)> for &'a Vector3<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a [S; 3]> for &'a Vector3<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a mut (S, S, S)> for &'a mut Vector3<S>
[src]

Performs the conversion.

impl<'a, S> From<&'a mut [S; 3]> for &'a mut Vector3<S>
[src]

Performs the conversion.

impl<S> From<(S, S, S)> for Vector3<S>
[src]

Performs the conversion.

impl<S> Array for Vector3<S> where
    S: Copy
[src]

Get the number of elements in the array type Read more

Construct a vector from a single value, replicating it. Read more

The sum of the elements of the array.

The product of the elements of the array.

Get the pointer to the first element of the array.

Get a mutable pointer to the first element of the array.

Swap the elements at indices i and j in-place.

impl<S> Into<(S, S, S)> for Vector3<S>
[src]

Performs the conversion.

impl<S> Into<[S; 3]> for Vector3<S>
[src]

Performs the conversion.

impl<S> ApproxEq for Vector3<S> where
    S: BaseFloat
[src]

Used for specifying relative comparisons.

The default tolerance to use when testing values that are close together. Read more

The default relative tolerance for testing values that are far-apart. Read more

The default ULPs to tolerate when testing values that are far-apart. Read more

A test for equality that uses a relative comparison if the values are far apart.

A test for equality that uses units in the last place (ULP) if the values are far apart.

The inverse of ApproxEq::relative_eq.

The inverse of ApproxEq::ulps_eq.

impl<S> MetricSpace for Vector3<S> where
    S: BaseFloat
[src]

The metric to be returned by the distance function.

Returns the squared distance. Read more

The distance between two values.

impl<S> Index<RangeFrom<usize>> for Vector3<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<RangeTo<usize>> for Vector3<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<RangeFull> for Vector3<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<Range<usize>> for Vector3<S>
[src]

The returned type after indexing.

Important traits for &'a [u8]

Performs the indexing (container[index]) operation.

impl<S> Index<usize> for Vector3<S>
[src]

The returned type after indexing.

Important traits for &'a mut R

Performs the indexing (container[index]) operation.

impl<S> Add<Vector3<S>> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, 'b, S> Add<&'a Vector3<S>> for &'b Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, S> Add<&'a Vector3<S>> for Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, S> Add<Vector3<S>> for &'a Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, 'b, S> Add<&'a Vector3<S>> for &'b Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Add<Vector3<S>> for Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, S> Add<Vector3<S>> for &'a Point3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<'a, S> Add<&'a Vector3<S>> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<S> Zero for Vector3<S> where
    S: BaseNum
[src]

Returns the additive identity element of Self, 0. Read more

Returns true if self is equal to the additive identity.

impl<S> Bounded for Vector3<S> where
    S: Bounded
[src]

returns the smallest finite number this type can represent

returns the largest finite number this type can represent

impl Rem<Vector3<f32>> for f32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<u8>> for u8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<u8>> for u8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<u32>> for u32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<u16>> for u16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<u64>> for u64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<i8>> for i8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<i32>> for i32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<isize>> for isize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<i8>> for i8
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a, S> Rem<S> for &'a Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<i64>> for i64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<i64>> for i64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<i32>> for i32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<i16>> for i16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<u32>> for u32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<u64>> for u64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<isize>> for isize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<i16>> for i16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> Rem<S> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<f64>> for f64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<u16>> for u16
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<f64>> for f64
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl Rem<Vector3<usize>> for usize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<usize>> for usize
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<'a> Rem<&'a Vector3<f32>> for f32
[src]

The resulting type after applying the % operator.

Performs the % operation.

impl<S> SubAssign<Vector3<S>> for Point3<S> where
    S: BaseNum + SubAssign<S>, 
[src]

Performs the -= operation.

impl<S> SubAssign<Vector3<S>> for Vector3<S> where
    S: BaseNum + SubAssign<S>, 
[src]

Performs the -= operation.

impl<S> AsMut<[S; 3]> for Vector3<S>
[src]

Performs the conversion.

impl<S> AsMut<(S, S, S)> for Vector3<S>
[src]

Performs the conversion.

impl<S> DivAssign<S> for Vector3<S> where
    S: BaseNum + DivAssign<S>, 
[src]

Performs the /= operation.

impl<S> Copy for Vector3<S> where
    S: Copy
[src]

impl<S> Eq for Vector3<S> where
    S: Eq
[src]

impl<S> PartialEq<Vector3<S>> for Vector3<S> where
    S: PartialEq<S>, 
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Div<&'a Vector3<u32>> for u32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<i8>> for i8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<i64>> for i64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a, S> Div<S> for &'a Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<isize>> for isize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<u8>> for u8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<i64>> for i64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<u32>> for u32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<f64>> for f64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<u16>> for u16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<i16>> for i16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<i32>> for i32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<f32>> for f32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<i8>> for i8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<f64>> for f64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<i32>> for i32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<u16>> for u16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<u8>> for u8
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<u64>> for u64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<i16>> for i16
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<f32>> for f32
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<u64>> for u64
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<S> Div<S> for Vector3<S> where
    S: BaseNum
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<isize>> for isize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<'a> Div<&'a Vector3<usize>> for usize
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<Vector3<usize>> for usize
[src]

The resulting type after applying the / operator.

Performs the / operation.

Auto Trait Implementations

impl<S> Send for Vector3<S> where
    S: Send

impl<S> Sync for Vector3<S> where
    S: Sync