Struct collision::Sphere
[−]
[src]
pub struct Sphere<S: BaseFloat> { pub center: Point3<S>, pub radius: S, }
Bounding sphere.
Fields
center: Point3<S>
Center point of the sphere in world space
radius: S
Sphere radius
Trait Implementations
impl<S: Copy + BaseFloat> Copy for Sphere<S>
[src]
impl<S: Clone + BaseFloat> 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 + BaseFloat> 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: Debug + BaseFloat> Debug for Sphere<S>
[src]
impl<S> Bound for Sphere<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Point = Point3<S>
Point type for the bounding volume (for dimensionality)
fn min_extent(&self) -> Point3<S>
[src]
Minimum extents of the bounding volume
fn max_extent(&self) -> Point3<S>
[src]
Maximum extents of the bounding volume
fn with_margin(&self, add: Vector3<S>) -> Self
[src]
Create a new bounding volume extended by the given amount
fn transform_volume<T>(&self, transform: &T) -> Self where
T: Transform<Self::Point>,
[src]
T: Transform<Self::Point>,
Apply an arbitrary transform to the bounding volume
fn empty() -> Self
[src]
Create empty volume
impl<S: BaseFloat> Continuous<Ray3<S>> for Sphere<S>
[src]
type Result = Point3<S>
Result returned by the intersection test
fn intersection(&self, r: &Ray3<S>) -> Option<Point3<S>>
[src]
Intersection test
impl<S: BaseFloat> Discrete<Ray3<S>> for Sphere<S>
[src]
fn intersects(&self, r: &Ray3<S>) -> bool
[src]
Intersection test
impl<S: BaseFloat> Discrete<Sphere<S>> for Sphere<S>
[src]
fn intersects(&self, s2: &Sphere<S>) -> bool
[src]
Intersection test
impl<S: BaseFloat> PlaneBound<S> for Sphere<S>
[src]
fn relate_plane(&self, plane: Plane<S>) -> Relation
[src]
Classify the spatial relation with a plane.
fn relate_clip_space(&self, projection: Matrix4<S>) -> Relation
[src]
Classify the relation with a projection matrix.
impl<S: BaseFloat> Contains<Aabb3<S>> for Sphere<S>
[src]
impl<S: BaseFloat> Contains<Point3<S>> for Sphere<S>
[src]
impl<S: BaseFloat> Contains<Line3<S>> for Sphere<S>
[src]
impl<S: BaseFloat> Contains<Sphere<S>> for Sphere<S>
[src]
impl<S: BaseFloat> Union for Sphere<S>
[src]
type Output = Sphere<S>
Union shape created
fn union(&self, other: &Sphere<S>) -> Sphere<S>
[src]
Build the union shape of self and the given shape.
impl<S: BaseFloat> Union<Aabb3<S>> for Sphere<S>
[src]
type Output = Sphere<S>
Union shape created
fn union(&self, aabb: &Aabb3<S>) -> Sphere<S>
[src]
Build the union shape of self and the given shape.
impl<S: BaseFloat> SurfaceArea for Sphere<S>
[src]
type Scalar = S
Result type returned from surface area computation
fn surface_area(&self) -> S
[src]
Compute surface area