Skip to main content

RasterizableSpace

Trait RasterizableSpace 

Source
pub trait RasterizableSpace<const N: usize>: Space {
    // Required methods
    fn point_to_array(p: Self::Point) -> [f32; N];
    fn array_to_point(arr: [f32; N]) -> Self::Point;
    fn project_point(
        point: Self::Point,
        projection: &Projection<N>,
    ) -> Option<Vec3>;
    fn tessellate_segment(
        p0: Self::Point,
        p1: Self::Point,
        samples: usize,
        emit: impl FnMut(Self::Point),
    );
}

Required Methods§

Source

fn point_to_array(p: Self::Point) -> [f32; N]

Source

fn array_to_point(arr: [f32; N]) -> Self::Point

Source

fn project_point(point: Self::Point, projection: &Projection<N>) -> Option<Vec3>

Source

fn tessellate_segment( p0: Self::Point, p1: Self::Point, samples: usize, emit: impl FnMut(Self::Point), )

Emits both endpoints and samples - 1 interior points when samples > 1.

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§