logo

Struct ami::Frustum

source · []
pub struct Frustum {
    pub center: Vector,
    pub radius: f32,
    pub wfov: f32,
    pub hfov: f32,
    pub xrot: f32,
    pub yrot: f32,
}
Expand description

Single-precision frustum

Fields

center: Vector

The center of the frustum

radius: f32

The radius of the frustum

wfov: f32

The fov in x

hfov: f32

the fov in y

xrot: f32

how much rotated from facing “straight forward” in x

yrot: f32

how much rotated from facing “straight forward” in y

Implementations

Create a new viewing frustum.

  • center - The center of the frustum cone.
  • radius - How far can you see?
  • xrot - Direction facing on x axis (radians).
  • yrot - Direction facing on y axis (radians).
  • wfov - The fov on the X axis (radians).
  • hfov - The fov on the Y axis (radians).

If viewing frustum collides with the bounding box.

If viewing frustum collides with a point.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.