Struct Camera
pub struct Camera {
pub position: [f64; 3],
pub eye_height: f32,
pub partial_tick: f32,
pub yaw: f32,
pub pitch: f32,
pub fov_degrees: f32,
pub near: f32,
pub far: f32,
pub view: [f32; 16],
pub projection: [f32; 16],
pub dimension: String,
}Expand description
Camera values from the most recently extracted world frame.
Fields§
§position: [f64; 3]The camera position in blocks (x, y, z).
eye_height: f32The eye height above the position, in blocks.
partial_tick: f32The fraction of the current tick elapsed, 0 to 1.
yaw: f32The horizontal rotation in degrees.
pitch: f32The vertical rotation in degrees; negative looks up.
fov_degrees: f32The vertical field of view in degrees.
near: f32The near clip distance in blocks.
far: f32The far clip distance in blocks.
view: [f32; 16]Camera-relative view matrix in column-major order.
projection: [f32; 16]Reversed-Z projection matrix in column-major order.
dimension: StringThe id of the dimension drawn, such as minecraft:overworld.
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 UnsafeUnpin 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