pub struct LinearAccelerationRecord {
pub first_vector_component_field: f32,
pub second_vector_component_field: f32,
pub third_vector_component_field: f32,
}
Expand description
Linear Acceleration Record as defined in IEEE 1278.1 standard. Used to communicate the acceleration of an entity for dead-reckoning during the simulation. Typically uses metres per second per second as units
Fields
first_vector_component_field: f32
second_vector_component_field: f32
third_vector_component_field: f32
Implementations
sourceimpl LinearAccelerationRecord
impl LinearAccelerationRecord
sourcepub fn new(x: f32, y: f32, z: f32) -> Self
pub fn new(x: f32, y: f32, z: f32) -> Self
Provides a function to create a new LinearAccelerationRecord.
Examples
Creating a blank LinearAccelerationRecord:
let linear_acceleration_record = LinearAccelerationRecord::new{
x: 0.0,
y: 0.0,
z: 0.0
};
sourcepub fn serialize(&self, buf: &mut BytesMut)
pub fn serialize(&self, buf: &mut BytesMut)
Fills a BytesMut struct with a LinearAccelerationRecord serialised into binary. This buffer is then ready to be sent via UDP to the simluation network.
pub fn decode(buf: &mut BytesMut) -> LinearAccelerationRecord
Trait Implementations
sourceimpl Clone for LinearAccelerationRecord
impl Clone for LinearAccelerationRecord
sourcefn clone(&self) -> LinearAccelerationRecord
fn clone(&self) -> LinearAccelerationRecord
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LinearAccelerationRecord
impl Debug for LinearAccelerationRecord
sourceimpl Default for LinearAccelerationRecord
impl Default for LinearAccelerationRecord
sourcefn default() -> LinearAccelerationRecord
fn default() -> LinearAccelerationRecord
Returns the “default value” for a type. Read more
impl Copy for LinearAccelerationRecord
Auto Trait Implementations
impl RefUnwindSafe for LinearAccelerationRecord
impl Send for LinearAccelerationRecord
impl Sync for LinearAccelerationRecord
impl Unpin for LinearAccelerationRecord
impl UnwindSafe for LinearAccelerationRecord
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more