Struct spherical_cow::shapes::Sphere [] [src]

pub struct Sphere {
    pub center: Point3<f32>,
    pub radius: f32,
}

Constructs a sphere located at center in Euclidean space with a given radius.

Fields

Central point in space where this sphere is located.

Radius of current sphere.

Methods

impl Sphere
[src]

[src]

Creates a new sphere given the location of the spheres' center and its' radius.

[src]

If the distance between the centers of two spheres is less than the sum of their radii, we can consider them to be overlapping. Will return true in this case.

Trait Implementations

impl PartialEq for Sphere
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Debug for Sphere
[src]

[src]

Formats the value using the given formatter.

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

[src]

Checks if sphere exists inside the current bounding sphere.

[src]

Calculates the volume of this sphere in normalised units.

impl Display for Sphere
[src]

[src]

Formats the value using the given formatter. Read more

impl Serialize for Sphere
[src]

[src]

Serialize this value into the given Serde serializer. Read more

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

[src]

Deserialize this value from the given Serde deserializer. Read more