pub struct EulerAnglesRecord {
pub psi_field: f32,
pub theta_field: f32,
pub phi_field: f32,
}
Expand description
Euler Angles Record as defined in IEEE 1278.1 standard. Used to communicate the orientation of an entity during the simulation. Uses radians as units.
Fields§
§psi_field: f32
§theta_field: f32
§phi_field: f32
Implementations§
Source§impl EulerAnglesRecord
impl EulerAnglesRecord
Sourcepub fn new(psi: f32, theta: f32, phi: f32) -> Self
pub fn new(psi: f32, theta: f32, phi: f32) -> Self
Provides a function to create a new EulerAnglesRecord.
§Examples
Creating a blank EulerAnglesRecord:
let euler_angles_record = EulerAnglesRecord::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 EulerAnglesRecord serialised into binary. This buffer is then ready to be sent via UDP to the simluation network.
pub fn decode(buf: &mut BytesMut) -> EulerAnglesRecord
Trait Implementations§
Source§impl Clone for EulerAnglesRecord
impl Clone for EulerAnglesRecord
Source§fn clone(&self) -> EulerAnglesRecord
fn clone(&self) -> EulerAnglesRecord
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 EulerAnglesRecord
impl Debug for EulerAnglesRecord
Source§impl Default for EulerAnglesRecord
impl Default for EulerAnglesRecord
Source§fn default() -> EulerAnglesRecord
fn default() -> EulerAnglesRecord
Returns the “default value” for a type. Read more
impl Copy for EulerAnglesRecord
Auto Trait Implementations§
impl Freeze for EulerAnglesRecord
impl RefUnwindSafe for EulerAnglesRecord
impl Send for EulerAnglesRecord
impl Sync for EulerAnglesRecord
impl Unpin for EulerAnglesRecord
impl UnwindSafe for EulerAnglesRecord
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