pub struct SerializedBody {
pub position: [i64; 6],
pub velocity: [i64; 6],
pub rotation: [i64; 8],
pub mass: [i64; 2],
pub body_type: u8,
}Expand description
Serialized rigid body (raw fixed-point data).
Position and velocity are stored as 6 i64 values:
[x.hi, x.lo_as_i64, y.hi, y.lo_as_i64, z.hi, z.lo_as_i64]
Fields§
§position: [i64; 6]Position: x.hi, x.lo, y.hi, y.lo, z.hi, z.lo
velocity: [i64; 6]Velocity: x.hi, x.lo, y.hi, y.lo, z.hi, z.lo
rotation: [i64; 8]Rotation quaternion: x.hi, x.lo, y.hi, y.lo, z.hi, z.lo, w.hi, w.lo
mass: [i64; 2]Mass: hi, lo
body_type: u8Body type: 0=Dynamic, 1=Static, 2=Kinematic
Trait Implementations§
Source§impl Clone for SerializedBody
impl Clone for SerializedBody
Source§impl Debug for SerializedBody
impl Debug for SerializedBody
impl Eq for SerializedBody
Source§impl PartialEq for SerializedBody
impl PartialEq for SerializedBody
impl StructuralPartialEq for SerializedBody
Auto Trait Implementations§
impl Freeze for SerializedBody
impl RefUnwindSafe for SerializedBody
impl Send for SerializedBody
impl Sync for SerializedBody
impl Unpin for SerializedBody
impl UnsafeUnpin for SerializedBody
impl UnwindSafe for SerializedBody
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,
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 more