pub struct RelativeMovement(pub i32);Expand description
Relative position/rotation flags.
When a flag is set, the corresponding value is relative to the player’s current value. When not set, the value is absolute.
Tuple Fields§
§0: i32Implementations§
Source§impl RelativeMovement
impl RelativeMovement
Sourcepub const ROTATE_DELTA: i32
pub const ROTATE_DELTA: i32
Rotate delta is relative
Sourcepub const NONE: RelativeMovement
pub const NONE: RelativeMovement
No relative flags (all values are absolute)
Sourcepub const ROTATION: RelativeMovement
pub const ROTATION: RelativeMovement
All rotation flags.
Sourcepub const DELTA: RelativeMovement
pub const DELTA: RelativeMovement
Vanilla delta movement flags, including rotated-delta semantics.
Sourcepub const fn is_x_relative(self) -> bool
pub const fn is_x_relative(self) -> bool
Returns true if the X position is relative.
Sourcepub const fn is_y_relative(self) -> bool
pub const fn is_y_relative(self) -> bool
Returns true if the Y position is relative.
Sourcepub const fn is_z_relative(self) -> bool
pub const fn is_z_relative(self) -> bool
Returns true if the Z position is relative.
Sourcepub const fn is_y_rot_relative(self) -> bool
pub const fn is_y_rot_relative(self) -> bool
Returns true if yaw is relative.
Sourcepub const fn is_x_rot_relative(self) -> bool
pub const fn is_x_rot_relative(self) -> bool
Returns true if pitch is relative.
Sourcepub const fn is_delta_x_relative(self) -> bool
pub const fn is_delta_x_relative(self) -> bool
Returns true if delta X is relative.
Sourcepub const fn is_delta_y_relative(self) -> bool
pub const fn is_delta_y_relative(self) -> bool
Returns true if delta Y is relative.
Sourcepub const fn is_delta_z_relative(self) -> bool
pub const fn is_delta_z_relative(self) -> bool
Returns true if delta Z is relative.
Sourcepub const fn rotates_delta(self) -> bool
pub const fn rotates_delta(self) -> bool
Returns true if current delta movement is rotated by the teleport rotation delta.
Trait Implementations§
Source§impl Clone for RelativeMovement
impl Clone for RelativeMovement
Source§fn clone(&self) -> RelativeMovement
fn clone(&self) -> RelativeMovement
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 RelativeMovement
Source§impl Debug for RelativeMovement
impl Debug for RelativeMovement
Source§impl Default for RelativeMovement
impl Default for RelativeMovement
Source§fn default() -> RelativeMovement
fn default() -> RelativeMovement
Returns the “default value” for a type. Read more
impl Eq for RelativeMovement
Source§impl PartialEq for RelativeMovement
impl PartialEq for RelativeMovement
impl StructuralPartialEq for RelativeMovement
Auto Trait Implementations§
impl Freeze for RelativeMovement
impl RefUnwindSafe for RelativeMovement
impl Send for RelativeMovement
impl Sync for RelativeMovement
impl Unpin for RelativeMovement
impl UnsafeUnpin for RelativeMovement
impl UnwindSafe for RelativeMovement
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§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<>>