Struct dotrix_core::camera::Camera[][src]

pub struct Camera {
    pub distance: f32,
    pub y_angle: f32,
    pub xz_angle: f32,
    pub target: Point3,
    pub view: Option<Mat4>,
    pub fov: f32,
    pub near_plane: f32,
    pub far_plane: f32,
    pub proj: Option<Mat4>,
}
Expand description

Camera management service

Fields

distance: f32

Distance between the camera and a target

y_angle: f32

Angle around the Y axis

xz_angle: f32

Angle in horizontal plane

target: Point3

Camera target coordinate

view: Option<Mat4>

View matri

fov: f32

Field of View

near_plane: f32

Near plane

far_plane: f32

Far plane

proj: Option<Mat4>

Projection matrix

Implementations

Creates new Camera instance

Returns view matrix with zero transition

It is useful for sky boxes and domes

Returns calculated camera position

Returns view matrix

Returns a reference to view matrix

Returns a reference to projection matrix

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

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more