Skip to main content

Space

Trait Space 

Source
pub trait Space {
    type Point: Copy + Send + Sync + 'static;
    type Vector: Copy + Send + Sync + 'static;
    type Frame: Copy + Send + Sync + 'static;

    // Required methods
    fn frame_at(&self, at: Self::Point) -> Self::Frame;
    fn distance(&self, a: Self::Point, b: Self::Point) -> f32;
    fn exp(&self, at: Self::Point, v: Self::Vector) -> Self::Point;
    fn log(&self, from: Self::Point, to: Self::Point) -> Self::Vector;
    fn parallel_transport(
        &self,
        from: Self::Point,
        to: Self::Point,
        v: Self::Vector,
    ) -> Self::Vector;
    fn chart_envelope(&self) -> f32;
    fn valid_point(&self, p: Self::Point) -> bool;

    // Provided methods
    fn parallel_transport_along(
        &self,
        path: &[Self::Point],
        v: Self::Vector,
    ) -> Self::Vector { ... }
    fn is_chart_flat(&self) -> bool { ... }
}

Required Associated Types§

Source

type Point: Copy + Send + Sync + 'static

Source

type Vector: Copy + Send + Sync + 'static

Source

type Frame: Copy + Send + Sync + 'static

Required Methods§

Source

fn frame_at(&self, at: Self::Point) -> Self::Frame

Source

fn distance(&self, a: Self::Point, b: Self::Point) -> f32

Source

fn exp(&self, at: Self::Point, v: Self::Vector) -> Self::Point

Advances for unit time along the geodesic with initial velocity v.

Source

fn log(&self, from: Self::Point, to: Self::Point) -> Self::Vector

Source

fn parallel_transport( &self, from: Self::Point, to: Self::Point, v: Self::Vector, ) -> Self::Vector

Source

fn chart_envelope(&self) -> f32

Geodesic distance from the chart origin beyond which Self::valid_point refuses a point.

Source

fn valid_point(&self, p: Self::Point) -> bool

Finite, inside the chart, and within Self::chart_envelope of the origin.

Provided Methods§

Source

fn parallel_transport_along( &self, path: &[Self::Point], v: Self::Vector, ) -> Self::Vector

Composes transport along consecutive points; fewer than two points leave v unchanged.

Source

fn is_chart_flat(&self) -> bool

True when chart arithmetic respects the global geometry, including identifications.

Implementors§