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§
Source§impl 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§
Source§impl Clone for LinearVelocityRecord
impl Clone for LinearVelocityRecord
Source§fn clone(&self) -> LinearVelocityRecord
fn clone(&self) -> LinearVelocityRecord
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 LinearVelocityRecord
impl Debug for LinearVelocityRecord
Source§impl Default for LinearVelocityRecord
impl Default for LinearVelocityRecord
Source§fn default() -> LinearVelocityRecord
fn default() -> LinearVelocityRecord
Returns the “default value” for a type. Read more
impl Copy for LinearVelocityRecord
Auto Trait Implementations§
impl Freeze for LinearVelocityRecord
impl RefUnwindSafe for LinearVelocityRecord
impl Send for LinearVelocityRecord
impl Sync for LinearVelocityRecord
impl Unpin for LinearVelocityRecord
impl UnwindSafe for LinearVelocityRecord
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