pub trait ViewMapping<S: DomainSpace>:
Send
+ Sync
+ 'static {
// Required methods
fn name(&self) -> &'static str;
fn image_point(&self, eye: &Pose<S>, point: S::Point) -> Option<[f32; 3]>;
fn lift(&self, eye: &Pose<S>, ray: &ImageRay) -> Option<DomainRay<S>>;
fn depth_envelope(&self) -> DepthEnvelope;
// Provided methods
fn image_local(
&self,
space: &S,
eye: &Pose<S>,
pose: &Pose<S>,
_relative: &S::Relative,
local: S::Point,
) -> Option<[f32; 3]> { ... }
fn image_segment(
&self,
space: &S,
eye: &Pose<S>,
pose: &Pose<S>,
relative: &S::Relative,
segment: [S::Point; 2],
emit: &mut dyn FnMut(f32, Option<[f32; 3]>),
) { ... }
fn section(&self, _eye: &Pose<S>, _pose: &Pose<S>) -> Option<SectionCut> { ... }
fn ray_lift(&self) -> bool { ... }
fn image_radius(&self, _eye: &Pose<S>, _point: S::Point, radius: f32) -> f32 { ... }
fn depth_envelope_at(&self, _eye: &Pose<S>) -> DepthEnvelope { ... }
}Expand description
Results stay stable for the same inputs; configuration changes replace the map through ViewStyle::set_mapping.
Required Methods§
fn name(&self) -> &'static str
fn image_point(&self, eye: &Pose<S>, point: S::Point) -> Option<[f32; 3]>
fn lift(&self, eye: &Pose<S>, ray: &ImageRay) -> Option<DomainRay<S>>
fn depth_envelope(&self) -> DepthEnvelope
Provided Methods§
fn image_local( &self, space: &S, eye: &Pose<S>, pose: &Pose<S>, _relative: &S::Relative, local: S::Point, ) -> Option<[f32; 3]>
Sourcefn image_segment(
&self,
space: &S,
eye: &Pose<S>,
pose: &Pose<S>,
relative: &S::Relative,
segment: [S::Point; 2],
emit: &mut dyn FnMut(f32, Option<[f32; 3]>),
)
fn image_segment( &self, space: &S, eye: &Pose<S>, pose: &Pose<S>, relative: &S::Relative, segment: [S::Point; 2], emit: &mut dyn FnMut(f32, Option<[f32; 3]>), )
Emits an ordered image polyline; None breaks the line.
fn section(&self, _eye: &Pose<S>, _pose: &Pose<S>) -> Option<SectionCut>
Sourcefn ray_lift(&self) -> bool
fn ray_lift(&self) -> bool
True when lift recovers a domain ray from any image ray; a map without one refuses grabs and field bridges by name.