Struct azalea_entity::Physics
source · pub struct Physics {
pub velocity: Vec3,
pub xxa: f32,
pub yya: f32,
pub zza: f32,
pub on_ground: bool,
pub last_on_ground: bool,
pub dimensions: EntityDimensions,
pub bounding_box: AABB,
pub has_impulse: bool,
}Expand description
The physics data relating to the entity, such as position, velocity, and bounding box.
Fields§
§velocity: Vec3How fast the entity is moving.
xxa: f32X acceleration.
yya: f32Y acceleration.
zza: f32Z acceleration.
on_ground: bool§last_on_ground: bool§dimensions: EntityDimensionsThe width and height of the entity.
bounding_box: AABBThe bounding box of the entity. This is more than just width and height, unlike dimensions.
has_impulse: boolImplementations§
Trait Implementations§
source§impl Component for Physics
impl Component for Physics
§type Storage = TableStorage
type Storage = TableStorage
A marker type indicating the storage type used for this component.
This must be either
TableStorage or SparseStorage.Auto Trait Implementations§
impl RefUnwindSafe for Physics
impl Send for Physics
impl Sync for Physics
impl Unpin for Physics
impl UnwindSafe for Physics
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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId) )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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.