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§
Source§impl Camera
impl Camera
Sourcepub fn view_matrix_static(&self) -> Mat4
pub fn view_matrix_static(&self) -> Mat4
Returns view matrix with zero transition
It is useful for sky boxes and domes
Sourcepub fn view_matrix(&self) -> Mat4
pub fn view_matrix(&self) -> Mat4
Returns view matrix
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Camera
impl RefUnwindSafe for Camera
impl Send for Camera
impl Sync for Camera
impl Unpin for Camera
impl UnwindSafe for Camera
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more