pub struct Rotation { /* private fields */ }Expand description
A 3-dimensional rotation in the road network. This struct represents a rotation in the road network, which can be defined using a quaternion or roll-pitch-yaw angles. It provides methods to create a rotation, convert between representations, and apply the rotation to an inertial position.
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub fn from_quat(q: &Quaternion) -> Rotation
pub fn from_quat(q: &Quaternion) -> Rotation
Create a new Rotation from a Quaternion.
Sourcepub fn from_rpy(rpy: &RollPitchYaw) -> Rotation
pub fn from_rpy(rpy: &RollPitchYaw) -> Rotation
Create a new Rotation from a RollPitchYaw.
Sourcepub fn quat(&self) -> Quaternion
pub fn quat(&self) -> Quaternion
Get a quaternion representation of the Rotation.
Sourcepub fn rpy(&self) -> RollPitchYaw
pub fn rpy(&self) -> RollPitchYaw
Get a roll-pitch-yaw representation of the Rotation.
Sourcepub fn set_quat(&mut self, q: &Quaternion)
pub fn set_quat(&mut self, q: &Quaternion)
Set the Rotation from a Quaternion.
Sourcepub fn apply(&self, v: &InertialPosition) -> InertialPosition
pub fn apply(&self, v: &InertialPosition) -> InertialPosition
Apply the Rotation to an InertialPosition.