Skip to main content

TransformStrategy

Trait TransformStrategy 

Source
pub trait TransformStrategy<P: Point> {
    type Output: PointMut + Default;

    // Required method
    fn transform(&self, src: &P) -> Self::Output;
}
Expand description

A function from one Point to another, used by transform.

The output may have a different scalar type or coordinate system than the input. Self::Output must be PointMut + Default because the strategy builds it via Default + set::<D>.

Required Associated Types§

Source

type Output: PointMut + Default

The destination point type.

Required Methods§

Source

fn transform(&self, src: &P) -> Self::Output

Apply the transform to src and return a fresh destination point.

Mirrors Boost’s apply(src, dst), returning dst by value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, P> TransformStrategy<P> for Affine2<T>
where T: CoordinateScalar, P: Point<Scalar = T>, <P::Cs as CoordinateSystem>::Family: SameAs<CartesianFamily>,

Source§

type Output = Point<T, 2>

Source§

impl<T, P> TransformStrategy<P> for Affine3<T>
where T: CoordinateScalar, P: Point<Scalar = T>, <P::Cs as CoordinateSystem>::Family: SameAs<CartesianFamily>,

Source§

type Output = Point<T, 3>