Skip to main content

SE3State

Struct SE3State 

Source
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: CompoundState

Implementations§

Source§

impl SE3State

Source

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);
Source

pub fn get_translation(&self) -> &RealVectorState

Returns a reference to the translational component (x, y, z) of the state.

Source

pub fn get_rotation(&self) -> &SO3State

Returns a reference to the rotational component (SO3State) of the state.

Source

pub fn get_x(&self) -> f64

Returns the x-coordinate of the state.

Source

pub fn get_y(&self) -> f64

Returns the y-coordinate of the state.

Source

pub fn get_z(&self) -> f64

Returns the z-coordinate of the state.

Trait Implementations§

Source§

impl Clone for SE3State

Source§

fn clone(&self) -> SE3State

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SE3State

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl State for SE3State

Source§

fn as_any(&self) -> &dyn Any

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: State + Clone + 'static,

Source§

fn clone_box(&self) -> Box<dyn State>

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V