Struct CameraEntity
pub struct CameraEntity {
pub position: [f64; 3],
pub previous: [f64; 3],
pub x_rot: f32,
pub y_rot: f32,
pub x_rot_o: f32,
pub y_rot_o: f32,
pub eye_height: f32,
pub living: Option<LivingCamera>,
pub mount: Option<(f32, f64)>,
}Expand description
The camera entity as Camera.alignWithEntity and the field-of-view
death and hurt effects see it.
Fields§
§position: [f64; 3]§previous: [f64; 3]xo, yo, zo.
x_rot: f32§y_rot: f32§x_rot_o: f32§y_rot_o: f32§eye_height: f32Entity.getEyeHeight().
living: Option<LivingCamera>A living entity’s getScale() and camera distance attribute.
mount: Option<(f32, f64)>The vehicle’s scale and camera distance when it is living.
Implementations§
§impl CameraEntity
impl CameraEntity
pub fn view_x_rot(&self, partial: f32) -> f32
pub fn view_x_rot(&self, partial: f32) -> f32
Entity.getXRot(partialTicks).
pub fn view_y_rot(&self, partial: f32) -> f32
pub fn view_y_rot(&self, partial: f32) -> f32
LocalPlayer.getViewYRot (getYRot(partialTicks), a Mth.rotLerp).
Trait Implementations§
§impl Clone for CameraEntity
impl Clone for CameraEntity
§fn clone(&self) -> CameraEntity
fn clone(&self) -> CameraEntity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CameraEntity
§impl Debug for CameraEntity
impl Debug for CameraEntity
§impl PartialEq for CameraEntity
impl PartialEq for CameraEntity
impl StructuralPartialEq for CameraEntity
Auto Trait Implementations§
impl Freeze for CameraEntity
impl RefUnwindSafe for CameraEntity
impl Send for CameraEntity
impl Sync for CameraEntity
impl Unpin for CameraEntity
impl UnsafeUnpin for CameraEntity
impl UnwindSafe for CameraEntity
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