Trait Point

Source
pub trait Point<V>: Sized + Sub<Self, Output = V>
where V: AdditiveGroup + GroupAction<Self>,
{ // Required methods fn to_vector(self) -> V; fn from_vector(vector: V) -> Self; // Provided method fn origin() -> Self { ... } }
Expand description

Point types convertible to and from a vector type, with difference function that follows from the free and transitive group action

Required Methods§

Source

fn to_vector(self) -> V

Source

fn from_vector(vector: V) -> Self

Provided Methods§

Source

fn origin() -> Self

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§

Source§

impl<S> Point<Vec2<S>> for Point2<S>
where S: Ring,

Source§

impl<S> Point<Vec2<S>> for Vector2<S>
where S: Ring,

Source§

impl<S> Point<Vec3<S>> for Point3<S>
where S: Ring,

Source§

impl<S> Point<Vec3<S>> for Vector3<S>
where S: Ring,

Source§

impl<S> Point<Vec4<S>> for Point4<S>
where S: Ring,

Source§

impl<S> Point<Vec4<S>> for Vector4<S>
where S: Ring,

Source§

impl<S, U> Point<Displacement2<S, U>> for Displacement2<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement2<S, U>> for Position2<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement3<S, U>> for Displacement3<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement3<S, U>> for Position3<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement4<S, U>> for Displacement4<S, U>
where S: Ring,

Source§

impl<S, U> Point<Displacement4<S, U>> for Position4<S, U>
where S: Ring,