pub struct Sphere {
pub center: Vec3,
pub radius: f32,
pub material: Material,
}
A sphere is a 3-D ball, it has a center point and a radius.
Formats the value using the given formatter. Read more
In case of a sphere it’s pretty easy, we need to project the center of the sphere on the ray of light and see if the projection is inside the sphere
impl<T> Any for T where
T: 'static + ?Sized,
[src]
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
[src]
impl<T> Pointable for T
The alignment of pointer.
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
Initializes a with the given initializer. Read more
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
Mutably dereferences the given pointer. Read more
pub unsafe fn drop(ptr: usize)
Drops the object pointed to by the given pointer. Read more
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
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.