Struct f1_api::packet::motion::Motion [−][src]
pub struct Motion { /* fields omitted */ }
Expand description
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.
Implementations
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
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
Constructs a new Motion
.
Returns the position of the car in 3D space.
Returns the velocity of the car on three axis.
Returns the normalized forward motion of the car on three axis.
Normalized values can be converted to float through division by 32767.0f.
Returns the normalized lateral motion of the car on three axis.
Normalized values can be converted to float through division by 32767.0f.
Returns the G force on the car on each of the three axis.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Motion
impl UnwindSafe for Motion
Blanket Implementations
Mutably borrows from an owned value. Read more