Struct ami::Vec3 [] [src]

pub struct Vec3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}

3-dimensional vector

Fields

X coordinate

Y coordinate

Z coordinate

Methods

impl Vec3
[src]

[src]

Create a new Vec3

[src]

Get the magnitude of a Vec3

[src]

Multiply matrix onto Vec3 (as directional vector)

[src]

Create a zero Vec3

[src]

Find the midpoint between two Vec3

[src]

Calculate the distance squared between two Vec3

[src]

The recipricol (inverse) of the vector.

[src]

Calculate the dot product of two Vec3s

[src]

Normalize a Vec3

[src]

Calculate angle between 2 Vec3's

Trait Implementations

impl Mul<Vec3> for Mat4
[src]

The resulting type after applying the * operator.

[src]

Transform as a position.

impl Sub<Vec3> for BBox
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Add<Vec3> for BBox
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Clone for Vec3
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Vec3
[src]

impl PartialEq for Vec3
[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 Debug for Vec3
[src]

[src]

Formats the value using the given formatter. Read more

impl Add for Vec3
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub for Vec3
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Mul<f32> for Vec3
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Div<f32> for Vec3
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Neg for Vec3
[src]

The resulting type after applying the - operator.

[src]

Performs the unary - operation.

Auto Trait Implementations

impl Send for Vec3

impl Sync for Vec3