pub struct LinearVelocityRecord {
pub first_vector_component_field: f32,
pub second_vector_component_field: f32,
pub third_vector_component_field: f32,
}
Expand description
Linear Velocity Record as defined in IEEE 1278.1 standard. Used to communicate the velocity of an entity for dead-reckoning during the simulation. Typically uses metres per second as units
Fields
first_vector_component_field: f32
second_vector_component_field: f32
third_vector_component_field: f32
Implementations
sourceimpl LinearVelocityRecord
impl LinearVelocityRecord
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 LinearVelocityRecord.
Examples
Creating a blank LinearVelocityRecord:
let linear_velocity_record = LinearVelocityRecord::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 LinearVelocityRecord serialised into binary. This buffer is then ready to be sent via UDP to the simluation network.
pub fn decode(buf: &mut BytesMut) -> LinearVelocityRecord
Trait Implementations
sourceimpl Clone for LinearVelocityRecord
impl Clone for LinearVelocityRecord
sourcefn clone(&self) -> LinearVelocityRecord
fn clone(&self) -> LinearVelocityRecord
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 LinearVelocityRecord
impl Debug for LinearVelocityRecord
sourceimpl Default for LinearVelocityRecord
impl Default for LinearVelocityRecord
sourcefn default() -> LinearVelocityRecord
fn default() -> LinearVelocityRecord
Returns the “default value” for a type. Read more
impl Copy for LinearVelocityRecord
Auto Trait Implementations
impl RefUnwindSafe for LinearVelocityRecord
impl Send for LinearVelocityRecord
impl Sync for LinearVelocityRecord
impl Unpin for LinearVelocityRecord
impl UnwindSafe for LinearVelocityRecord
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