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::Translation); fn scale(&mut self, scale: Positive<S>); fn support( &self, direction: <P::Translation as VectorSpace<S>>::NonZero, ) -> (P, S); }
Expand description

Geometric primitives generic over dimension

Required Methods§

Source

fn translate(&mut self, displacement: P::Translation)

Source

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

Source

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

Returns the point with largeest dot product in search direction

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: OrderedField + AffineSpace<S, Translation = S> + VectorSpace<S, NonZero = NonZero<S>>,