Struct wrapped2d::serialize::BodySnapshot
source · pub struct BodySnapshot {Show 14 fields
pub body_type: BodyType,
pub position: [f32; 2],
pub angle: f32,
pub linear_velocity: [f32; 2],
pub angular_velocity: f32,
pub linear_damping: f32,
pub angular_damping: f32,
pub allow_sleep: bool,
pub awake: bool,
pub fixed_rotation: bool,
pub bullet: bool,
pub active: bool,
pub gravity_scale: f32,
pub mass_data: Option<MassSnapshot>,
}
Fields§
§body_type: BodyType
§position: [f32; 2]
§angle: f32
§linear_velocity: [f32; 2]
§angular_velocity: f32
§linear_damping: f32
§angular_damping: f32
§allow_sleep: bool
§awake: bool
§fixed_rotation: bool
§bullet: bool
§active: bool
§gravity_scale: f32
§mass_data: Option<MassSnapshot>
Implementations§
source§impl BodySnapshot
impl BodySnapshot
pub fn take<U: UserDataTypes>(body: &MetaBody<U>) -> (BodyId, Self)
pub fn rebuild<U: UserDataTypes>( &self, world: &mut World<U>, data: U::BodyData ) -> BodyHandle
pub fn may_restore_mass_data<U: UserDataTypes>(&self, body: &mut MetaBody<U>)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnwindSafe for Snapshot
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