#[repr(transparent)]
pub struct Sphere<T = i32>(_);
Expand description

A Sphere positioned at (x, y, z) with radius.

Please see the module-level documentation for examples.

Implementations

Constructs a Sphere at position (x, y, z) with radius.

Returns Sphere as [x, y, z, radius].

Returns Sphere as a byte slice &[x, y, z, radius].

Returns Sphere as a mutable byte slice &mut [x, y, z, radius].

Constructs a Sphere at position Point with radius.

Returns the x-coordinate of the sphere.

Sets the x-coordinate of the sphere.

Returns the y-coordinate of the sphere.

Sets the y-coordinate of the sphere.

Returns the z-coordinate of the sphere.

Sets the z-coordinate of the sphere.

Returns the radius of the sphere.

Sets the radius of the sphere.

Returns the center Point.

Converts Sphere < T > to Sphere < U >.

Returns Sphere < T > with the nearest integers to the numbers. Round half-way cases away from 0.0.

Returns Sphere < T > with the largest integers less than or equal to the numbers.

Returns Sphere < T > with the smallest integers greater than or equal to the numbers.

Trait Implementations

Performs the conversion.

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns whether this sphere contains a given Point.

Returns whether this sphere completely contains another sphere.

The shape type. e.g. Rect<T>.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Deserialize this value from the given Serde deserializer. Read more

Converts &[T; M] to Sphere < T >.

Converts Sphere < T > to &[T; M].

Converts [T; M] to Sphere < T >.

Converts Sphere < T > to [T; M].

Creates a value from an iterator. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Returns the closest intersection point with a given line and distance along the line or None if there is no intersection.

Returns whether this sphere intersects another sphere.

The shape type. e.g. Rect<T>.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.