pub struct Sphere {
pub center: Point3,
pub radius: f64,
pub material: Option<Arc<dyn Material>>,
}Expand description
A sphere defined by a center, a radius, and an optional material.
Fields§
§center: Point3Center of the sphere.
radius: f64Radius of the sphere (negative radius creates a hollow sphere).
material: Option<Arc<dyn Material>>Material of the sphere (None means no material is assigned).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Sphere
impl !RefUnwindSafe for Sphere
impl Send for Sphere
impl Sync for Sphere
impl Unpin for Sphere
impl !UnwindSafe for Sphere
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more