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]

[src]

A unit vector in the x direction.

[src]

A unit vector in the y direction.

[src]

A unit vector in the w direction.

[src]

Returns the cross product of the vector and other.

[src]

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

[src]

Create a Vector2, dropping the z value.

impl<S> Vector3<S>
[src]

[src]

Construct a new vector, using the provided values.

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

[src]

Component-wise casting to another type.

Trait Implementations

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

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

[src]

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

[src]

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

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

[src]

This method tests for !=.

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

[src]

[src]

[src]

[src]

[src]

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the + operator.

[src]

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.

[src]

Performs the + operation.

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

[src]

Formats the value using the given formatter.

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

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

[src]

Returns true if self is equal to the additive identity.

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

[src]

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

[src]

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

[src]

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

[src]

[src]

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

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

[src]

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

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

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

The returned type after indexing.

[src]

Performs the indexing (container[index]) operation.

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

[src]

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

[src]

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

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

[src]

Performs the conversion.

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

[src]

Performs the conversion.

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

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

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

[src]

[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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

The resulting type after applying the - operator.

[src]

Performs the unary - operation.