Enum collision::primitive::Primitive3
[−]
[src]
pub enum Primitive3<S> where
S: BaseFloat, { Particle(Particle3<S>), Quad(Quad<S>), Sphere(Sphere<S>), Cuboid(Cuboid<S>), Cylinder(Cylinder<S>), Capsule(Capsule<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
Quad(Quad<S>)
Rectangular plane
Sphere(Sphere<S>)
Sphere
Cuboid(Cuboid<S>)
Cuboid
Cylinder(Cylinder<S>)
Cylinder
Capsule(Capsule<S>)
Capsule
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,
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
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<Quad<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
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<Cylinder<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(cylinder: Cylinder<S>) -> Primitive3<S>
[src]
Performs the conversion.
impl<S> From<Capsule<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(capsule: Capsule<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> ComputeBound<Aabb3<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Sphere<S>> for Primitive3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Sphere<S>
[src]
Compute the bounding volume
impl<S> Primitive 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,
Auto Trait Implementations
impl<S> Send for Primitive3<S> where
S: Send,
S: Send,
impl<S> Sync for Primitive3<S> where
S: Sync,
S: Sync,