[][src]Struct mgf::Sphere

pub struct Sphere {
    pub c: Point3<f32>,
    pub r: f32,
}

A point and a distance.

Like AABBs, spheres are closed volumes.

Fields

c: Point3<f32>

The center point of the sphere.

r: f32

The radius of the sphere.

Methods

impl Sphere[src]

pub fn new(center: Point3<f32>, radius: f32) -> Self[src]

Create a new sphere.

Trait Implementations

impl Add<Vector3<f32>> for Sphere[src]

type Output = Self

The resulting type after applying the + operator.

impl Add<f32> for Sphere[src]

type Output = Self

The resulting type after applying the + operator.

impl AddAssign<Vector3<f32>> for Sphere[src]

impl Bound for Sphere[src]

impl BoundedBy<AABB> for Sphere[src]

impl BoundedBy<Sphere> for Triangle[src]

impl BoundedBy<Sphere> for Rectangle[src]

impl BoundedBy<Sphere> for AABB[src]

Taking the bounding sphere of an AABB creates a sphere that contains all of the extreme points of the AABB. Thus, a bounding sphere for an AABB created from another bounding sphere will be larger in size than the original sphere.

impl BoundedBy<Sphere> for Capsule[src]

impl BoundedBy<Sphere> for OBB[src]

impl BoundedBy<Sphere> for Component[src]

impl BoundedBy<Sphere> for Compound[src]

impl Clone for Sphere[src]

impl Contacts<Moving<Capsule>> for Sphere[src]

impl Contacts<Moving<Component>> for Sphere[src]

impl Contacts<Moving<Sphere>> for Sphere[src]

impl Contains<Point3<f32>> for Sphere[src]

impl Contains<Sphere> for Sphere[src]

An important consequence of Spheres being closed: two spheres with the same center and radius contain each other.

impl Convex<Point3<f32>> for Sphere[src]

impl Copy for Sphere[src]

impl Debug for Sphere[src]

impl<'de> Deserialize<'de> for Sphere[src]

impl Div<f32> for Sphere[src]

type Output = Self

The resulting type after applying the / operator.

impl From<Sphere> for Component[src]

impl Inertia for Sphere[src]

impl<P: Particle> Intersects<Sphere> for P[src]

impl Mul<f32> for Sphere[src]

type Output = Self

The resulting type after applying the * operator.

impl Overlaps<AABB> for Sphere[src]

impl Overlaps<Sphere> for AABB[src]

impl Overlaps<Sphere> for Sphere[src]

impl Serialize for Sphere[src]

impl Shape for Sphere[src]

impl Sub<Vector3<f32>> for Sphere[src]

type Output = Self

The resulting type after applying the - operator.

impl Sub<f32> for Sphere[src]

type Output = Self

The resulting type after applying the - operator.

impl SubAssign<Vector3<f32>> for Sphere[src]

impl Volumetric for Sphere[src]

fn rotate<R: Rotation3<f32>>(self, _: R) -> Sphere[src]

Rotation to a bounding sphere does nothing.

Auto Trait Implementations

impl RefUnwindSafe for Sphere

impl Send for Sphere

impl Sync for Sphere

impl Unpin for Sphere

impl UnwindSafe for Sphere

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.