Struct mgf::Sphere[][src]

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

A point and a distance.

Like AABBs, spheres are closed volumes.

Fields

The center point of the sphere.

The radius of the sphere.

Methods

impl Sphere
[src]

Create a new sphere.

Trait Implementations

impl BoundedBy<AABB> for Sphere
[src]

impl Mul<f32> for Sphere
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Div<f32> for Sphere
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Add<f32> for Sphere
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub<f32> for Sphere
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Bound for Sphere
[src]

Produce a bound that encloses the two arguments.

Return a measure of the area of the object.

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 From<Sphere> for Component
[src]

Performs the conversion.

impl BoundedBy<Sphere> for Component
[src]

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

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

impl BoundedBy<Sphere> for Compound
[src]

impl Overlaps<Sphere> for AABB
[src]

Returns true if the two objects overlap and false otherwise.

impl Overlaps<AABB> for Sphere
[src]

Returns true if the two objects overlap and false otherwise.

impl Overlaps<Sphere> for Sphere
[src]

Returns true if the two objects overlap and false otherwise.

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

Returns true if the current object contains the argument.

impl Contains<Sphere> for Sphere
[src]

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

Returns true if the current object contains the argument.

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

Returns an Intersection if one exists.

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

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

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

Calls the closure for each contact found. Returns true if any contact was found. Read more

Returns the last contact found, if one exists.

impl Copy for Sphere
[src]

impl Clone for Sphere
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Sphere
[src]

Formats the value using the given formatter. Read more

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

The resulting type after applying the + operator.

Performs the + operation.

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

The resulting type after applying the - operator.

Performs the - operation.

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

Performs the += operation.

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

Performs the -= operation.

impl Shape for Sphere
[src]

Returns the center of mass of the geometry, assuming a regular density.

Returns the closest point on the shape to the given point.

Sets the center of the shape to p.

impl Volumetric for Sphere
[src]

Rotation to a bounding sphere does nothing.

Rotates the object around a point.

impl Convex for Sphere
[src]

Returns the point on the object that produces the greatest dot product with the supplied axis. The axis is expected to be normalized. Read more

impl Inertia for Sphere
[src]

Auto Trait Implementations

impl Send for Sphere

impl Sync for Sphere