Skip to main content

IsPlane

Trait IsPlane 

Source
pub trait IsPlane: GeometricPrimitive {
    type Point: IsPoint;
    type Normal: IsUnitVector;

    // Required methods
    fn point(&self) -> Self::Point;
    fn point_mut(&mut self) -> &mut Self::Point;
    fn normal(&self) -> Self::Normal;
    fn normal_mut(&mut self) -> &mut Self::Normal;
}
Expand description

A plane-like primitive represented by a point and a unit normal.

This abstraction is dimension-neutral: in 3D it corresponds to a geometric plane, while in 2D and 1D it can serve as the mirror/reference hyperplane for transformation traits.

Required Associated Types§

Source

type Point: IsPoint

Point type used to anchor the plane.

Source

type Normal: IsUnitVector

Unit normal type used to orient the plane.

Required Methods§

Source

fn point(&self) -> Self::Point

Returns a point on the plane.

Source

fn point_mut(&mut self) -> &mut Self::Point

Returns a mutable reference to a point on the plane.

Source

fn normal(&self) -> Self::Normal

Returns the plane normal.

Source

fn normal_mut(&mut self) -> &mut Self::Normal

Returns a mutable reference to the plane normal.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§