pub struct SE3State(pub CompoundState);Expand description
A state representing a 3D rigid body transformation, an element of the Special Euclidean group SE(3).
This state is composed of a 3D translation (x, y, z) and a 3D rotation. It is internally
represented as a CompoundState.
Tuple Fields§
§0: CompoundStateImplementations§
Source§impl SE3State
impl SE3State
Sourcepub fn new(x: f64, y: f64, z: f64, rotation: SO3State) -> Self
pub fn new(x: f64, y: f64, z: f64, rotation: SO3State) -> Self
Creates a new SE3State from x, y, z, and an SO3State for rotation.
§Examples
use oxmpl::base::state::{SE3State, SO3State};
// Assuming SO3State can be created, for example, from a quaternion
let rotation = SO3State::identity(); // Example identity rotation
let state = SE3State::new(1.0, 2.0, 3.0, rotation);
assert_eq!(state.get_x(), 1.0);
assert_eq!(state.get_y(), 2.0);
assert_eq!(state.get_z(), 3.0);Sourcepub fn get_translation(&self) -> &RealVectorState
pub fn get_translation(&self) -> &RealVectorState
Returns a reference to the translational component (x, y, z) of the state.
Sourcepub fn get_rotation(&self) -> &SO3State
pub fn get_rotation(&self) -> &SO3State
Returns a reference to the rotational component (SO3State) of the state.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SE3State
impl !UnwindSafe for SE3State
impl Freeze for SE3State
impl Send for SE3State
impl Sync for SE3State
impl Unpin for SE3State
impl UnsafeUnpin for SE3State
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