Skip to main content

DomainSpace

Trait DomainSpace 

Source
pub trait DomainSpace:
    Space<Vector: Mul<f32, Output = <Self as Space>::Vector>>
    + Send
    + Sync
    + Sized
    + 'static {
    type Placement: Copy + Send + Sync + 'static;
    type Relative: Copy + Send + Sync + 'static;

    const BLENDS: bool = true;
Show 20 methods // Required methods fn origin(&self) -> Self::Point; fn check(&self, point: Self::Point) -> Result<(), DomainError>; fn chart_dimension(&self) -> u32; fn chart_point(&self, point: Self::Point) -> ChartPoint; fn local_point(&self, coordinates: [f32; 4]) -> Self::Point; fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose; fn blend(&self, from: &Pose<Self>, to: &Pose<Self>, t: f32) -> Pose<Self>; fn pose_from_chart( &self, pose: &ChartPose, ) -> Result<Pose<Self>, DomainError>; fn tangent_from_chart( &self, tangent: &ChartTangent, ) -> Result<Self::Vector, DomainError>; fn chart_reach(&self, at: Self::Point, radius: f32) -> f32; fn hit_ball( &self, ray: &DomainRay<Self>, center: Self::Point, radius: f32, ) -> Option<f32>; fn prepare(&self, pose: &Pose<Self>) -> Self::Placement; fn place( &self, placement: &Self::Placement, local: Self::Point, ) -> Result<Self::Point, DomainError>; fn local( &self, pose: &Pose<Self>, point: Self::Point, ) -> Result<Self::Point, DomainError>; fn relative( &self, eye: &Pose<Self>, pose: &Pose<Self>, ) -> Result<Self::Relative, DomainError>; fn place_relative( &self, relative: &Self::Relative, local: Self::Point, ) -> Result<Self::Point, DomainError>; fn carry( &self, pose: &Pose<Self>, local: Self::Point, tangent: Self::Vector, ) -> Result<Self::Vector, DomainError>; fn moved( &self, pose: &Pose<Self>, to: Self::Point, ) -> Result<Pose<Self>, DomainError>; // Provided methods fn point_from_chart( &self, point: &ChartPoint, ) -> Result<Self::Point, DomainError> { ... } fn walk( &self, pose: &Pose<Self>, tangent: Self::Vector, dt: f32, ) -> Result<Pose<Self>, DomainError> { ... }
}

Provided Associated Constants§

Source

const BLENDS: bool = true

False when blend returns to, so publication draws tick poses and skips the blend bookkeeping.

Required Associated Types§

Source

type Placement: Copy + Send + Sync + 'static

Source

type Relative: Copy + Send + Sync + 'static

Required Methods§

Source

fn origin(&self) -> Self::Point

Source

fn check(&self, point: Self::Point) -> Result<(), DomainError>

Source

fn chart_dimension(&self) -> u32

Source

fn chart_point(&self, point: Self::Point) -> ChartPoint

Source

fn local_point(&self, coordinates: [f32; 4]) -> Self::Point

Reads the leading coordinates the space has and ignores the rest.

Source

fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose

Source

fn blend(&self, from: &Pose<Self>, to: &Pose<Self>, t: f32) -> Pose<Self>

The pose drawn a fraction t of the way through a tick that moved from to to.

Source

fn pose_from_chart(&self, pose: &ChartPose) -> Result<Pose<Self>, DomainError>

Source

fn tangent_from_chart( &self, tangent: &ChartTangent, ) -> Result<Self::Vector, DomainError>

Source

fn chart_reach(&self, at: Self::Point, radius: f32) -> f32

Source

fn hit_ball( &self, ray: &DomainRay<Self>, center: Self::Point, radius: f32, ) -> Option<f32>

Arc length along ray into the metric ball of radius around center: zero from inside, None on a miss.

Source

fn prepare(&self, pose: &Pose<Self>) -> Self::Placement

Source

fn place( &self, placement: &Self::Placement, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source

fn local( &self, pose: &Pose<Self>, point: Self::Point, ) -> Result<Self::Point, DomainError>

Source

fn relative( &self, eye: &Pose<Self>, pose: &Pose<Self>, ) -> Result<Self::Relative, DomainError>

Source

fn place_relative( &self, relative: &Self::Relative, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source

fn carry( &self, pose: &Pose<Self>, local: Self::Point, tangent: Self::Vector, ) -> Result<Self::Vector, DomainError>

Source

fn moved( &self, pose: &Pose<Self>, to: Self::Point, ) -> Result<Pose<Self>, DomainError>

Provided Methods§

Source

fn point_from_chart( &self, point: &ChartPoint, ) -> Result<Self::Point, DomainError>

Source

fn walk( &self, pose: &Pose<Self>, tangent: Self::Vector, dt: f32, ) -> Result<Pose<Self>, DomainError>

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.

Implementations on Foreign Types§

Source§

impl DomainSpace for EuclideanR3

Source§

type Placement = <EuclideanR3 as IsometryGroup>::Iso

Source§

type Relative = <EuclideanR3 as IsometryGroup>::Iso

Source§

fn prepare(&self, pose: &Pose<Self>) -> Self::Placement

Source§

fn place( &self, placement: &Self::Placement, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn local( &self, pose: &Pose<Self>, point: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn relative( &self, eye: &Pose<Self>, pose: &Pose<Self>, ) -> Result<Self::Relative, DomainError>

Source§

fn place_relative( &self, relative: &Self::Relative, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn carry( &self, pose: &Pose<Self>, local: Self::Point, tangent: Self::Vector, ) -> Result<Self::Vector, DomainError>

Source§

fn moved( &self, pose: &Pose<Self>, to: Self::Point, ) -> Result<Pose<Self>, DomainError>

Source§

fn walk( &self, pose: &Pose<Self>, tangent: Self::Vector, dt: f32, ) -> Result<Pose<Self>, DomainError>

Source§

fn origin(&self) -> Self::Point

Source§

fn check(&self, point: Self::Point) -> Result<(), DomainError>

Source§

fn chart_dimension(&self) -> u32

Source§

fn chart_point(&self, point: Self::Point) -> ChartPoint

Source§

fn local_point(&self, coordinates: [f32; 4]) -> Self::Point

Source§

fn blend(&self, from: &Pose<Self>, to: &Pose<Self>, t: f32) -> Pose<Self>

Source§

fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose

Source§

fn pose_from_chart(&self, pose: &ChartPose) -> Result<Pose<Self>, DomainError>

Source§

fn tangent_from_chart( &self, tangent: &ChartTangent, ) -> Result<Self::Vector, DomainError>

Source§

fn chart_reach(&self, _at: Self::Point, radius: f32) -> f32

Source§

fn hit_ball( &self, ray: &DomainRay<Self>, center: Self::Point, radius: f32, ) -> Option<f32>

Source§

impl DomainSpace for EuclideanR4

Source§

type Placement = <EuclideanR4 as IsometryGroup>::Iso

Source§

type Relative = <EuclideanR4 as IsometryGroup>::Iso

Source§

fn prepare(&self, pose: &Pose<Self>) -> Self::Placement

Source§

fn place( &self, placement: &Self::Placement, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn local( &self, pose: &Pose<Self>, point: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn relative( &self, eye: &Pose<Self>, pose: &Pose<Self>, ) -> Result<Self::Relative, DomainError>

Source§

fn place_relative( &self, relative: &Self::Relative, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn carry( &self, pose: &Pose<Self>, local: Self::Point, tangent: Self::Vector, ) -> Result<Self::Vector, DomainError>

Source§

fn moved( &self, pose: &Pose<Self>, to: Self::Point, ) -> Result<Pose<Self>, DomainError>

Source§

fn walk( &self, pose: &Pose<Self>, tangent: Self::Vector, dt: f32, ) -> Result<Pose<Self>, DomainError>

Source§

fn origin(&self) -> Self::Point

Source§

fn check(&self, point: Self::Point) -> Result<(), DomainError>

Source§

fn chart_dimension(&self) -> u32

Source§

fn chart_point(&self, point: Self::Point) -> ChartPoint

Source§

fn local_point(&self, coordinates: [f32; 4]) -> Self::Point

Source§

fn blend(&self, from: &Pose<Self>, to: &Pose<Self>, t: f32) -> Pose<Self>

Source§

fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose

Source§

fn pose_from_chart(&self, pose: &ChartPose) -> Result<Pose<Self>, DomainError>

Source§

fn tangent_from_chart( &self, tangent: &ChartTangent, ) -> Result<Self::Vector, DomainError>

Source§

fn chart_reach(&self, _at: Self::Point, radius: f32) -> f32

Source§

fn hit_ball( &self, ray: &DomainRay<Self>, center: Self::Point, radius: f32, ) -> Option<f32>

Source§

impl DomainSpace for HyperbolicH3

Source§

const BLENDS: bool = false

Source§

type Placement = <HyperbolicH3 as IsometryGroup>::Iso

Source§

type Relative = <HyperbolicH3 as IsometryGroup>::Iso

Source§

fn prepare(&self, pose: &Pose<Self>) -> Self::Placement

Source§

fn place( &self, placement: &Self::Placement, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn local( &self, pose: &Pose<Self>, point: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn relative( &self, eye: &Pose<Self>, pose: &Pose<Self>, ) -> Result<Self::Relative, DomainError>

Source§

fn place_relative( &self, relative: &Self::Relative, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn carry( &self, pose: &Pose<Self>, local: Self::Point, tangent: Self::Vector, ) -> Result<Self::Vector, DomainError>

Source§

fn moved( &self, pose: &Pose<Self>, to: Self::Point, ) -> Result<Pose<Self>, DomainError>

Source§

fn walk( &self, pose: &Pose<Self>, tangent: Self::Vector, dt: f32, ) -> Result<Pose<Self>, DomainError>

Source§

fn origin(&self) -> Self::Point

Source§

fn check(&self, point: Self::Point) -> Result<(), DomainError>

Source§

fn chart_dimension(&self) -> u32

Source§

fn chart_point(&self, point: Self::Point) -> ChartPoint

Source§

fn local_point(&self, coordinates: [f32; 4]) -> Self::Point

Source§

fn blend(&self, _from: &Pose<Self>, to: &Pose<Self>, _t: f32) -> Pose<Self>

Source§

fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose

Source§

fn pose_from_chart(&self, pose: &ChartPose) -> Result<Pose<Self>, DomainError>

Source§

fn tangent_from_chart( &self, tangent: &ChartTangent, ) -> Result<Self::Vector, DomainError>

Source§

fn chart_reach(&self, _at: Self::Point, radius: f32) -> f32

Source§

fn hit_ball( &self, ray: &DomainRay<Self>, center: Self::Point, radius: f32, ) -> Option<f32>

Source§

impl<A, B, F> DomainSpace for BlendedSpace<A, B, F>
where A: Space<Point = <EuclideanR3 as Space>::Point, Vector = <EuclideanR3 as Space>::Point> + ConformallyFlat + Send + Sync + 'static, B: Space<Point = <EuclideanR3 as Space>::Point, Vector = <EuclideanR3 as Space>::Point> + ConformallyFlat + Send + Sync + 'static, F: BlendingField,

Source§

const BLENDS: bool = false

Source§

type Placement = Pose<BlendedSpace<A, B, F>>

Source§

type Relative = (Pose<BlendedSpace<A, B, F>>, Pose<BlendedSpace<A, B, F>>)

Source§

fn origin(&self) -> Self::Point

Source§

fn check(&self, point: Self::Point) -> Result<(), DomainError>

Source§

fn chart_dimension(&self) -> u32

Source§

fn chart_point(&self, point: Self::Point) -> ChartPoint

Source§

fn local_point(&self, coordinates: [f32; 4]) -> Self::Point

Source§

fn blend(&self, _from: &Pose<Self>, to: &Pose<Self>, _t: f32) -> Pose<Self>

Source§

fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose

Source§

fn pose_from_chart(&self, pose: &ChartPose) -> Result<Pose<Self>, DomainError>

Source§

fn tangent_from_chart( &self, tangent: &ChartTangent, ) -> Result<Self::Vector, DomainError>

Source§

fn chart_reach(&self, at: Self::Point, radius: f32) -> f32

Source§

fn hit_ball( &self, ray: &DomainRay<Self>, center: Self::Point, radius: f32, ) -> Option<f32>

Source§

fn prepare(&self, pose: &Pose<Self>) -> Self::Placement

Source§

fn place( &self, placement: &Self::Placement, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn local( &self, pose: &Pose<Self>, point: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn relative( &self, eye: &Pose<Self>, pose: &Pose<Self>, ) -> Result<Self::Relative, DomainError>

Source§

fn place_relative( &self, relative: &Self::Relative, local: Self::Point, ) -> Result<Self::Point, DomainError>

Source§

fn carry( &self, pose: &Pose<Self>, local: Self::Point, tangent: Self::Vector, ) -> Result<Self::Vector, DomainError>

Source§

fn moved( &self, pose: &Pose<Self>, to: Self::Point, ) -> Result<Pose<Self>, DomainError>

Source§

fn walk( &self, pose: &Pose<Self>, tangent: Self::Vector, dt: f32, ) -> Result<Pose<Self>, DomainError>

Implementors§