pub struct Camera3D {
pub position: Vec3,
pub target: Vec3,
pub up: Vec3,
pub fovy: f32,
pub aspect: Option<f32>,
pub projection: Projection,
pub render_target: Option<RenderTarget>,
}
Fields
position: Vec3
Camera position
target: Vec3
Camera target it looks-at
up: Vec3
Camera up vector (rotation over its axis)
fovy: f32
Camera field-of-view apperture in Y (degrees) in perspective, used as near plane width in orthographic
aspect: Option<f32>
Screen aspect ratio By default aspect is calculated with screen_width() / screen_height() on each frame
projection: Projection
Camera projection type, perspective or orthographics
render_target: Option<RenderTarget>
If “render_target” is set - camera will render to texture otherwise to the screen
Trait Implementations
sourceimpl Camera for Camera3D
impl Camera for Camera3D
fn matrix(&self) -> Mat4
fn depth_enabled(&self) -> bool
fn render_pass(&self) -> Option<RenderPass>
impl Copy for Camera3D
Auto Trait Implementations
impl RefUnwindSafe for Camera3D
impl Send for Camera3D
impl Sync for Camera3D
impl Unpin for Camera3D
impl UnwindSafe for Camera3D
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more