use he3d_math::{Quat, Vec3};
pub const DEFAULT_NEAR: f32 = 0.1;
#[derive(Clone, Copy, PartialEq, Debug)]
pub struct Camera {
pub position: Vec3,
pub orientation: Quat,
pub fov_y_degrees: f32,
pub near: f32,
}
impl Camera {
#[must_use]
pub const fn new(position: Vec3, orientation: Quat, fov_y_degrees: f32) -> Self {
Self {
position,
orientation,
fov_y_degrees,
near: DEFAULT_NEAR,
}
}
}
impl Default for Camera {
fn default() -> Self {
Self {
position: Vec3::new(0.0, 0.0, 5.0),
orientation: Quat::IDENTITY,
fov_y_degrees: 90.0,
near: DEFAULT_NEAR,
}
}
}