Struct collision::primitive::Sphere
[−]
[src]
pub struct Sphere<S> { pub radius: S, }
Sphere primitive
Fields
radius: S
Radius of the sphere
Methods
impl<S> Sphere<S>
[src]
Trait Implementations
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: Debug> Debug for Sphere<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 Sphere<S>
[src]
fn clone(&self) -> Sphere<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 Sphere<S>
[src]
fn eq(&self, __arg_0: &Sphere<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: &Sphere<S>) -> bool
[src]
This method tests for !=
.
impl<S> Primitive for Sphere<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> ComputeBound<Aabb3<S>> for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Aabb3<S>
[src]
Compute the bounding volume
impl<S> ComputeBound<Sphere<S>> for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn compute_bound(&self) -> Sphere<S>
[src]
Compute the bounding volume
impl<S> Discrete<Ray3<S>> for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn intersects(&self, r: &Ray3<S>) -> bool
[src]
Intersection test
impl<S> Continuous<Ray3<S>> for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,