[−][src]Enum collision::primitive::Primitive2
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> ComputeBound<Aabb2<S>> for Primitive2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb2<S>
[src]
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>>,
impl<S> DiscreteTransformed<Ray<S, Point2<S>, Vector2<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>,
impl<S> ContinuousTransformed<Ray<S, Point2<S>, Vector2<S>>> for Primitive2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Point = Point2<S>
Point type for transformation of self
type Result = Point2<S>
Result of intersection test
fn intersection_transformed<T>(
&self,
ray: &Ray2<S>,
transform: &T
) -> Option<Point2<S>> where
T: Transform<Point2<S>>,
[src]
&self,
ray: &Ray2<S>,
transform: &T
) -> Option<Point2<S>> where
T: Transform<Point2<S>>,
impl<S: Clone> Clone for Primitive2<S>
[src]
fn clone(&self) -> Primitive2<S>
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: PartialEq> PartialEq<Primitive2<S>> for Primitive2<S>
[src]
fn eq(&self, other: &Primitive2<S>) -> bool
[src]
fn ne(&self, other: &Primitive2<S>) -> bool
[src]
impl<S> From<Particle<Point2<S>>> for Primitive2<S>
[src]
fn from(particle: Particle2<S>) -> Primitive2<S>
[src]
impl<S> From<Line<S, Vector2<S>, Point2<S>>> for Primitive2<S>
[src]
fn from(line: Line2<S>) -> Primitive2<S>
[src]
impl<S> From<Circle<S>> for Primitive2<S>
[src]
fn from(circle: Circle<S>) -> Primitive2<S>
[src]
impl<S> From<Rectangle<S>> for Primitive2<S>
[src]
fn from(rectangle: Rectangle<S>) -> Primitive2<S>
[src]
impl<S> From<Square<S>> for Primitive2<S>
[src]
fn from(rectangle: Square<S>) -> Primitive2<S>
[src]
impl<S> From<ConvexPolygon<S>> for Primitive2<S>
[src]
fn from(polygon: ConvexPolygon<S>) -> Primitive2<S>
[src]
impl<S: Debug> Debug for Primitive2<S>
[src]
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,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,