Skip to main content

Primitive

Trait Primitive 

Source
pub trait Primitive<S, P>: Debug
where S: Field, P: AffineSpace<S>,
{ // Required methods fn translate(&mut self, displacement: <P as AffineSpace<S>>::Translation); fn scale(&mut self, scale: Positive<S>); fn support( &self, direction: <<P as AffineSpace<S>>::Translation as VectorSpace<S>>::NonZero, ) -> (P, S); }
Available on crate feature math-utils only.
Expand description

Geometric primitives generic over dimension

Required Methods§

Source

fn translate(&mut self, displacement: <P as AffineSpace<S>>::Translation)

Source

fn scale(&mut self, scale: Positive<S>)

Source

fn support( &self, direction: <<P as AffineSpace<S>>::Translation as VectorSpace<S>>::NonZero, ) -> (P, S)

Returns the point with largeest dot product in search direction

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<S> Primitive<S, Point3<S>> for (Hull3<S>, Arc<VertexEdgeTriangleMesh>)
where S: Real + Real + Debug + MaybeSerDes,

Source§

fn translate(&mut self, displacement: Vec3<S>)

Source§

fn scale(&mut self, scale: Positive<S>)

Source§

fn support(&self, direction: NonZero3<S>) -> (Point3<S>, S)

Implementors§

Source§

impl<S> Primitive<S, Point2<S>> for Aabb2<S>
where S: OrderedField,

Source§

impl<S> Primitive<S, Point2<S>> for Hull2<S>
where S: Real + Real + Debug + MaybeSerDes,

Source§

impl<S> Primitive<S, Point2<S>> for Line2<S>

Source§

impl<S> Primitive<S, Point2<S>> for Obb2<S>
where S: Real + Real + MaybeSerDes,

Source§

impl<S> Primitive<S, Point2<S>> for Ray2<S>
where S: OrderedField + FloatCore + AbsDiffEq<Epsilon = S>,

Source§

impl<S> Primitive<S, Point2<S>> for Sphere2<S>
where S: Real + Real + MaybeSerDes,

Source§

impl<S> Primitive<S, Point3<S>> for Aabb3<S>
where S: OrderedField,

Source§

impl<S> Primitive<S, Point3<S>> for Capsule3<S>
where S: Real + Real + MaybeSerDes,

Source§

impl<S> Primitive<S, Point3<S>> for Cone3<S>

Source§

impl<S> Primitive<S, Point3<S>> for Cylinder3<S>
where S: Real + Real + MaybeSerDes,

Source§

impl<S> Primitive<S, Point3<S>> for Hull3<S>
where S: Real + Real + MaybeSerDes,

Source§

impl<S> Primitive<S, Point3<S>> for Line3<S>

Source§

impl<S> Primitive<S, Point3<S>> for Obb3<S>
where S: Real + Real + MaybeSerDes,

Source§

impl<S> Primitive<S, Point3<S>> for Plane3<S>
where S: Real + FloatCore + RelativeEq,

Source§

impl<S> Primitive<S, Point3<S>> for Ray3<S>
where S: OrderedField + FloatCore + AbsDiffEq<Epsilon = S>,

Source§

impl<S> Primitive<S, Point3<S>> for Sphere3<S>
where S: Real + Real + Debug + MaybeSerDes,

Source§

impl<S> Primitive<S, S> for Interval<S>
where S: AffineSpace<S, Translation = S> + VectorSpace<S, NonZero = NonZero<S>> + OrderedField,