pub struct Ray {
pub origin: Vec3,
pub direction: Vec3,
}
What is the difference between a Vec3 and a Ray? After all Vec3 is a Ray that starts at the origin.
Well Ray is infinite length. That’s why the direction can be unit norm. Vec3 length is finite (it’s norm).
Unit norm direction vector
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.