Struct camera_controllers::Camera [] [src]

pub struct Camera<T = f32> {
    pub position: [T; 3],
    pub up: [T; 3],
    pub right: [T; 3],
    pub forward: [T; 3],
}

Models a camera with position and directions.

Fields

The camera position.

The up direction.

The right direction.

The forward direction.

Methods

impl<T> Camera<T> where
    T: Copy + Float, 
[src]

[src]

Constructs a new camera.

Places the camera at [x, y, z], looking towards pozitive z.

[src]

Computes an orthogonal matrix for the camera.

This matrix can be used to transform coordinates to the screen.

[src]

Orients the camera to look at a point.

[src]

Sets yaw and pitch angle of camera in radians.

[src]

Sets forward, up, and right vectors from a Quaternion rotation relative to the positive z-axis