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§
Source§impl 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§
Source§impl Clone for LinearAccelerationRecord
impl Clone for LinearAccelerationRecord
Source§fn clone(&self) -> LinearAccelerationRecord
fn clone(&self) -> LinearAccelerationRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LinearAccelerationRecord
impl Debug for LinearAccelerationRecord
Source§impl Default for LinearAccelerationRecord
impl Default for LinearAccelerationRecord
Source§fn default() -> LinearAccelerationRecord
fn default() -> LinearAccelerationRecord
Returns the “default value” for a type. Read more
impl Copy for LinearAccelerationRecord
Auto Trait Implementations§
impl Freeze for LinearAccelerationRecord
impl RefUnwindSafe for LinearAccelerationRecord
impl Send for LinearAccelerationRecord
impl Sync for LinearAccelerationRecord
impl Unpin for LinearAccelerationRecord
impl UnwindSafe for LinearAccelerationRecord
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