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§
Required Associated Types§
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
Sourcefn local_point(&self, coordinates: [f32; 4]) -> Self::Point
fn local_point(&self, coordinates: [f32; 4]) -> Self::Point
Reads the leading coordinates the space has and ignores the rest.
fn chart_pose(&self, pose: &Pose<Self>) -> ChartPose
Sourcefn blend(&self, from: &Pose<Self>, to: &Pose<Self>, t: f32) -> Pose<Self>
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.
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
Sourcefn hit_ball(
&self,
ray: &DomainRay<Self>,
center: Self::Point,
radius: f32,
) -> Option<f32>
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.
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>
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.