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]

[src]

Rotates the sphere about the origin

Trait Implementations

impl BoundedBy<AABB> for Sphere
[src]

[src]

impl Mul<f32> for Sphere
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Div<f32> for Sphere
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Add<f32> for Sphere
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl Sub<f32> for Sphere
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl<RHS: BoundedBy<Sphere>> Contains<RHS> for Sphere
[src]

[src]

Returns true if the current object contains the argument.

impl Bound for Sphere
[src]

[src]

Produce a bound that encloses the two arguments.

[src]

Rotation to a bounding sphere does nothing.

[src]

Return a measure of the area of the object.

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

[src]

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

[src]

Returns the last contact found, if one exists.

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

[src]

Returns true if the current object contains the argument.

impl Intersects<Ray> for Sphere
[src]

[src]

Returns an Intersection if one exists.

impl Intersects<Segment> for Sphere
[src]

[src]

Returns an Intersection if one exists.

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

[src]

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

[src]

Returns the last contact found, if one exists.

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

[src]

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

[src]

Returns the last contact found, if one exists.

impl Copy for Sphere
[src]

impl Clone for Sphere
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Sphere
[src]

[src]

Formats the value using the given formatter.

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

[src]

Returns closest point on the sphere to q

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

The resulting type after applying the + operator.

[src]

Performs the + operation.

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

The resulting type after applying the - operator.

[src]

Performs the - operation.

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

[src]

Performs the += operation.

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

[src]

Performs the -= operation.

impl Shape for Sphere
[src]

[src]

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

[src]

Sets the center of the shape to p.

impl Inertia for Sphere
[src]

[src]