Enum collision::primitive::Primitive3
[−]
[src]
pub enum Primitive3<S> where
S: BaseFloat, { Particle(Particle3<S>), Sphere(Sphere<S>), Cuboid(Cuboid<S>), ConvexPolyhedron(ConvexPolyhedron<S>), }
Wrapper enum for 3D primitives, that also implements the Primitive
trait, making it easier
to use many different primitives in algorithms.
Variants
Particle(Particle3<S>)
Particle
Sphere(Sphere<S>)
Sphere
Cuboid(Cuboid<S>)
Cuboid
ConvexPolyhedron(ConvexPolyhedron<S>)
Convex polyhedron with any number of vertices/faces
Trait Implementations
impl<S: Debug> Debug for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
impl<S: Clone> Clone for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn clone(&self) -> Primitive3<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 Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn eq(&self, __arg_0: &Primitive3<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: &Primitive3<S>) -> bool
[src]
This method tests for !=
.
impl<S> From<Particle3<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(particle: Particle3<S>) -> Primitive3<S>
[src]
Performs the conversion.
impl<S> From<Sphere<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(sphere: Sphere<S>) -> Primitive3<S>
[src]
Performs the conversion.
impl<S> From<Cuboid<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(cuboid: Cuboid<S>) -> Primitive3<S>
[src]
Performs the conversion.
impl<S> From<ConvexPolyhedron<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(polyhedron: ConvexPolyhedron<S>) -> Primitive3<S>
[src]
Performs the conversion.
impl<S> HasAabb for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Aabb = Aabb3<S>
Bounding box type
fn get_bound(&self) -> Self::Aabb
[src]
Get the bounding box of the primitive in local space coordinates.
impl<S> SupportFunction for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Point = Point3<S>
Point type
fn support_point<T>(&self, direction: &Vector3<S>, transform: &T) -> Point3<S> where
T: Transform<Point3<S>>,
[src]
T: Transform<Point3<S>>,
Get the support point on the shape in a given direction. Read more
impl<S> DiscreteTransformed<Ray3<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Point = Point3<S>
Point type for transformation of self
fn intersects_transformed<T>(&self, ray: &Ray3<S>, transform: &T) -> bool where
T: Transform<Self::Point>,
[src]
T: Transform<Self::Point>,
Intersection test for transformed self
impl<S> ContinuousTransformed<Ray3<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,