pub struct LookControl {
wanted_position: DVec3,
y_max_rot_speed: f32,
x_max_rot_angle: f32,
look_at_cooldown: i32,
}Fields§
§wanted_position: DVec3§y_max_rot_speed: f32§x_max_rot_angle: f32§look_at_cooldown: i32Implementations§
Source§impl LookControl
impl LookControl
pub const fn new() -> Self
pub const fn wanted_position(&self) -> DVec3
pub const fn y_max_rot_speed(&self) -> f32
pub const fn x_max_rot_angle(&self) -> f32
pub const fn is_looking_at_target(&self) -> bool
pub const fn set_look_at( &mut self, position: DVec3, y_max_rot_speed: f32, x_max_rot_angle: f32, )
pub const fn tick_cooldown(&mut self) -> bool
Trait Implementations§
Source§impl Clone for LookControl
impl Clone for LookControl
Source§fn clone(&self) -> LookControl
fn clone(&self) -> LookControl
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 LookControl
Source§impl Debug for LookControl
impl Debug for LookControl
Source§impl Default for LookControl
impl Default for LookControl
Source§impl PartialEq for LookControl
impl PartialEq for LookControl
impl StructuralPartialEq for LookControl
Auto Trait Implementations§
impl Freeze for LookControl
impl RefUnwindSafe for LookControl
impl Send for LookControl
impl Sync for LookControl
impl Unpin for LookControl
impl UnsafeUnpin for LookControl
impl UnwindSafe for LookControl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>