[−][src]Struct f1_api::packet::motion::Motion
Data about a car and its position and movement in space
The position and movement of each car in a session is described in the motion packet.
Methods
impl Motion
[src]
pub fn new(
position: Property3D<f32>,
velocity: Property3D<f32>,
forward_direction: Property3D<i16>,
right_direction: Property3D<i16>,
g_force: Property3D<f32>,
yaw: f32,
pitch: f32,
roll: f32
) -> Self
[src]
position: Property3D<f32>,
velocity: Property3D<f32>,
forward_direction: Property3D<i16>,
right_direction: Property3D<i16>,
g_force: Property3D<f32>,
yaw: f32,
pitch: f32,
roll: f32
) -> Self
Constructs a new Motion
.
impl Motion
[src]
pub fn yaw(&self) -> f32
[src]
Returns the yaw angle of the car in radians.
pub fn pitch(&self) -> f32
[src]
Returns the pitch angle of the car in radians.
pub fn roll(&self) -> f32
[src]
Returns the roll angle of the car in radians.
impl Motion
[src]
pub fn position(&self) -> &Property3D<f32>
[src]
Returns the position of the car in 3D space.
pub fn velocity(&self) -> &Property3D<f32>
[src]
Returns the velocity of the car on three axis.
pub fn forward_direction(&self) -> &Property3D<i16>
[src]
Returns the normalized forward motion of the car on three axis.
Normalized values can be converted to float through division by 32767.0f.
pub fn right_direction(&self) -> &Property3D<i16>
[src]
Returns the normalized lateral motion of the car on three axis.
Normalized values can be converted to float through division by 32767.0f.
pub fn g_force(&self) -> &Property3D<f32>
[src]
Returns the G force on the car on each of the three axis.
Trait Implementations
impl Clone for Motion
[src]
impl Copy for Motion
[src]
impl Debug for Motion
[src]
impl Default for Motion
[src]
impl PartialEq<Motion> for Motion
[src]
impl PartialOrd<Motion> for Motion
[src]
fn partial_cmp(&self, other: &Motion) -> Option<Ordering>
[src]
fn lt(&self, other: &Motion) -> bool
[src]
fn le(&self, other: &Motion) -> bool
[src]
fn gt(&self, other: &Motion) -> bool
[src]
fn ge(&self, other: &Motion) -> bool
[src]
impl StructuralPartialEq for Motion
[src]
Auto Trait Implementations
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnwindSafe for Motion
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,