pub struct ProjectionMatrixBuilder { /* private fields */ }
Expand description

Builder to construct projection matrices

Implementations

Returns an instance of a builder

Default

By default, the matrix builder sets the following defaults:

  • screen_position: 0.0
  • view_limit: 1000.0
  • fov: 90.0
  • width: 1280
  • height: 720

Sets the near clip position in the z axis

Sets the far clip position in the z axis

Sets the field of view in grades

Panic

If the entered fov is not within the (0, 360) range

Sets the width of the screen

Sets the height of the screen

Builds the projection matrix derived from the entered parameters and consumes the builder

Panic

If the specified view limit position is less than the specified screen position. The view limit must be further in the Z-axis.

Trait Implementations

Returns the “default value” for a type. Read more

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 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.