Enum collision::primitive::Primitive2
[−]
[src]
pub enum Primitive2<S> { Particle(Particle2<S>), Line(Line2<S>), Circle(Circle<S>), Rectangle(Rectangle<S>), Square(Square<S>), ConvexPolygon(ConvexPolygon<S>), }
Wrapper enum for 2D primitives, that also implements the Primitive
trait, making it easier
to use many different primitives in algorithms.
Variants
Particle(Particle2<S>)
Particle
Line(Line2<S>)
Line
Circle(Circle<S>)
Circle
Rectangle(Rectangle<S>)
Rectangle
Square(Square<S>)
Square
ConvexPolygon(ConvexPolygon<S>)
Convex polygon with any number of vertices.
Trait Implementations
impl<S: Debug> Debug for Primitive2<S>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<S: Clone> Clone for Primitive2<S>
[src]
fn clone(&self) -> Primitive2<S>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: PartialEq> PartialEq for Primitive2<S>
[src]
fn eq(&self, __arg_0: &Primitive2<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Primitive2<S>) -> bool
[src]
This method tests for !=
.
impl<S> From<Particle2<S>> for Primitive2<S>
[src]
fn from(particle: Particle2<S>) -> Primitive2<S>
[src]
Performs the conversion.
impl<S> From<Line2<S>> for Primitive2<S>
[src]
fn from(line: Line2<S>) -> Primitive2<S>
[src]
Performs the conversion.
impl<S> From<Circle<S>> for Primitive2<S>
[src]
fn from(circle: Circle<S>) -> Primitive2<S>
[src]
Performs the conversion.
impl<S> From<Rectangle<S>> for Primitive2<S>
[src]
fn from(rectangle: Rectangle<S>) -> Primitive2<S>
[src]
Performs the conversion.
impl<S> From<Square<S>> for Primitive2<S>
[src]
fn from(rectangle: Square<S>) -> Primitive2<S>
[src]
Performs the conversion.
impl<S> From<ConvexPolygon<S>> for Primitive2<S>
[src]
fn from(polygon: ConvexPolygon<S>) -> Primitive2<S>
[src]
Performs the conversion.
impl<S> ComputeBound<Aabb2<S>> for Primitive2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb2<S>
[src]
Compute the bounding volume
impl<S> Primitive for Primitive2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Point = Point2<S>
Point type
fn support_point<T>(&self, direction: &Vector2<S>, transform: &T) -> Point2<S> where
T: Transform<Point2<S>>,
[src]
T: Transform<Point2<S>>,
Get the support point on the shape in a given direction. Read more
impl<S> DiscreteTransformed<Ray2<S>> for Primitive2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Point = Point2<S>
Point type for transformation of self
fn intersects_transformed<T>(&self, ray: &Ray2<S>, transform: &T) -> bool where
T: Transform<Self::Point>,
[src]
T: Transform<Self::Point>,
Intersection test for transformed self
impl<S> ContinuousTransformed<Ray2<S>> for Primitive2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
Auto Trait Implementations
impl<S> Send for Primitive2<S> where
S: Send,
S: Send,
impl<S> Sync for Primitive2<S> where
S: Sync,
S: Sync,