Struct adi_gpu_base::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]

Create a new Vec3

Get the magnitude of a Vec3

Multiply matrix onto Vec3 (as directional vector)

Create a zero Vec3

Find the midpoint between two Vec3

Calculate the distance squared between two Vec3

The recipricol (inverse) of the vector.

Calculate the dot product of two Vec3s

Normalize a Vec3

Calculate angle between 2 Vec3's

Trait Implementations

impl Add<Vec3> for Vec3
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Add<f32> for Vec3
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Add<Vec3> for BBox
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub<Vec3> for BBox
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Sub<f32> for Vec3
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Sub<Vec3> for Vec3
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Clone for Vec3
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl SubAssign<Vec3> for Vec3
[src]

Performs the -= operation.

impl Debug for Vec3
[src]

Formats the value using the given formatter. Read more

impl Mul<f32> for Vec3
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Mul<Vec3> for Mat4
[src]

The resulting type after applying the * operator.

Transform as a position.

impl Copy for Vec3
[src]

impl Neg for Vec3
[src]

The resulting type after applying the - operator.

Performs the unary - operation.

impl PartialEq<Vec3> for Vec3
[src]

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

This method tests for !=.

impl Div<f32> for Vec3
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl AddAssign<Vec3> for Vec3
[src]

Performs the += operation.

Auto Trait Implementations

impl Send for Vec3

impl Sync for Vec3