Trait CoordinateFrame

Source
pub trait CoordinateFrame {
    type Type;

    const COORDINATE_FRAME: CoordinateFrameType;
Show 16 methods // Required methods fn coordinate_frame(&self) -> CoordinateFrameType; fn to_ned(&self) -> NorthEastDown<Self::Type> where Self::Type: Copy + SaturatingNeg<Output = Self::Type>; fn to_enu(&self) -> EastNorthUp<Self::Type> where Self::Type: Copy + SaturatingNeg<Output = Self::Type>; fn x(&self) -> Self::Type where Self::Type: Clone; fn y(&self) -> Self::Type where Self::Type: Clone; fn z(&self) -> Self::Type where Self::Type: Clone; fn x_ref(&self) -> &Self::Type; fn y_ref(&self) -> &Self::Type; fn z_ref(&self) -> &Self::Type; fn x_mut(&mut self) -> &mut Self::Type; fn y_mut(&mut self) -> &mut Self::Type; fn z_mut(&mut self) -> &mut Self::Type; fn right_handed(&self) -> bool; fn x_axis() -> [Self::Type; 3] where Self::Type: ZeroOne<Output = Self::Type> + Neg<Output = Self::Type>; fn y_axis() -> [Self::Type; 3] where Self::Type: ZeroOne<Output = Self::Type> + Neg<Output = Self::Type>; fn z_axis() -> [Self::Type; 3] where Self::Type: ZeroOne<Output = Self::Type> + Neg<Output = Self::Type>;
}
Expand description

A coordinate frame.

Required Associated Constants§

Source

const COORDINATE_FRAME: CoordinateFrameType

The coordinate frame type.

Required Associated Types§

Source

type Type

The type of each coordinate value.

Required Methods§

Source

fn coordinate_frame(&self) -> CoordinateFrameType

Returns the coordinate frame of this instance.

Source

fn to_ned(&self) -> NorthEastDown<Self::Type>
where Self::Type: Copy + SaturatingNeg<Output = Self::Type>,

Converts this type to a NorthEastDown instance.

Source

fn to_enu(&self) -> EastNorthUp<Self::Type>
where Self::Type: Copy + SaturatingNeg<Output = Self::Type>,

Converts this type to an EastNorthUp instance.

Source

fn x(&self) -> Self::Type
where Self::Type: Clone,

Gets the value of the first dimension.

Source

fn y(&self) -> Self::Type
where Self::Type: Clone,

Gets the value of the second dimension.

Source

fn z(&self) -> Self::Type
where Self::Type: Clone,

Gets the value of the third dimension.

Source

fn x_ref(&self) -> &Self::Type

Gets a reference to the value of the first dimension.

Source

fn y_ref(&self) -> &Self::Type

Gets a reference to the value of the second dimension.

Source

fn z_ref(&self) -> &Self::Type

Gets a reference to the value of the third dimension.

Source

fn x_mut(&mut self) -> &mut Self::Type

Gets a mutable reference to the value of the first dimension.

Source

fn y_mut(&mut self) -> &mut Self::Type

Gets a mutable reference to the value of the second dimension.

Source

fn z_mut(&mut self) -> &mut Self::Type

Gets a mutable reference to the value of the third dimension.

Source

fn right_handed(&self) -> bool

Indicates whether this coordinate system is right-handed or left-handed.

Source

fn x_axis() -> [Self::Type; 3]
where Self::Type: ZeroOne<Output = Self::Type> + Neg<Output = Self::Type>,

Returns the base vector for the x axis in the global frame.

Source

fn y_axis() -> [Self::Type; 3]
where Self::Type: ZeroOne<Output = Self::Type> + Neg<Output = Self::Type>,

Returns the base vector for the y axis in the global frame.

Source

fn z_axis() -> [Self::Type; 3]
where Self::Type: ZeroOne<Output = Self::Type> + Neg<Output = Self::Type>,

Returns the base vector for the z axis in the global frame.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> CoordinateFrame for DownEastNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownEastNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownEastSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownEastSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownNorthEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownNorthEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownNorthWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownNorthWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownSouthEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownSouthEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownSouthWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownSouthWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownWestNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownWestNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for DownWestSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::DownWestSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastDownNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastDownNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastDownSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastDownSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastNorthDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastNorthDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastNorthUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastNorthUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastSouthDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastSouthDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastSouthUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastSouthUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastUpNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastUpNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for EastUpSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::EastUpSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthDownEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthDownEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthDownWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthDownWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthEastDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthEastDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthEastUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthEastUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthUpEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthUpEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthUpWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthUpWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthWestDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthWestDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for NorthWestUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::NorthWestUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthDownEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthDownEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthDownWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthDownWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthEastDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthEastDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthEastUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthEastUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthUpEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthUpEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthUpWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthUpWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthWestDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthWestDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for SouthWestUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::SouthWestUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpEastNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpEastNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpEastSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpEastSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpNorthEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpNorthEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpNorthWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpNorthWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpSouthEast<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpSouthEast

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpSouthWest<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpSouthWest

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpWestNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpWestNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for UpWestSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::UpWestSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestDownNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestDownNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestDownSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestDownSouth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestNorthDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestNorthDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestNorthUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestNorthUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestSouthDown<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestSouthDown

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestSouthUp<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestSouthUp

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestUpNorth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestUpNorth

Source§

type Type = T

Source§

impl<T> CoordinateFrame for WestUpSouth<T>

Source§

const COORDINATE_FRAME: CoordinateFrameType = CoordinateFrameType::WestUpSouth

Source§

type Type = T