Struct smooth_bevy_cameras::LookAngles
source · pub struct LookAngles { /* private fields */ }
Expand description
A (yaw, pitch) pair representing a direction.
Implementations§
source§impl LookAngles
impl LookAngles
pub fn from_vector(v: Vec3) -> Self
pub fn unit_vector(self) -> Vec3
pub fn set_direction(&mut self, v: Vec3)
pub fn set_yaw(&mut self, yaw: f32)
pub fn get_yaw(&self) -> f32
pub fn add_yaw(&mut self, delta: f32)
pub fn set_pitch(&mut self, pitch: f32)
pub fn get_pitch(&self) -> f32
pub fn add_pitch(&mut self, delta: f32)
pub fn assert_not_looking_up(&self)
Trait Implementations§
source§impl Clone for LookAngles
impl Clone for LookAngles
source§fn clone(&self) -> LookAngles
fn clone(&self) -> LookAngles
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LookAngles
impl Debug for LookAngles
source§impl Default for LookAngles
impl Default for LookAngles
source§fn default() -> LookAngles
fn default() -> LookAngles
Returns the “default value” for a type. Read more
impl Copy for LookAngles
Auto Trait Implementations§
impl RefUnwindSafe for LookAngles
impl Send for LookAngles
impl Sync for LookAngles
impl Unpin for LookAngles
impl UnwindSafe for LookAngles
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World]