[−][src]Struct tray_rust::linalg::ray::Ray
Ray is a standard 3D ray, starting at origin o
and heading in direction d
The min and max points along the ray can be specified with min_t
and max_t
depth
is the recursion depth of the ray
Fields
o: Point
Origin of the ray
d: Vector
Direction the ray is heading
min_t: f32
Point along the ray that the actual ray starts at, p = o + min_t * d
max_t: f32
Point along the ray at which it stops, will be inf if the ray is infinite
depth: u32
Recursion depth of the ray
time: f32
Time point sampled by this ray
Methods
impl Ray
[src]
pub fn new(o: &Point, d: &Vector, time: f32) -> Ray
[src]
Create a new ray from o
heading in d
with infinite length
pub fn segment(o: &Point, d: &Vector, min_t: f32, max_t: f32, time: f32) -> Ray
[src]
Create a new segment ray from o + min_t * d
to o + max_t * d
pub fn child(&self, o: &Point, d: &Vector) -> Ray
[src]
Create a child ray from the parent starting at o
and heading in d
pub fn child_segment(
&self,
o: &Point,
d: &Vector,
min_t: f32,
max_t: f32
) -> Ray
[src]
&self,
o: &Point,
d: &Vector,
min_t: f32,
max_t: f32
) -> Ray
Create a child ray segment from o + min_t * d
to o + max_t * d
pub fn at(&self, t: f32) -> Point
[src]
Evaulate the ray equation at some t value and return the point
returns result of self.o + t * self.d
Trait Implementations
impl Clone for Ray
[src]
impl Copy for Ray
[src]
impl PartialEq<Ray> for Ray
[src]
impl Debug for Ray
[src]
impl Mul<Ray> for Transform
[src]
type Output = Ray
The resulting type after applying the *
operator.
fn mul(self, ray: Ray) -> Ray
[src]
Multiply the ray by the transform to apply the transformation
impl StructuralPartialEq for Ray
[src]
Auto Trait Implementations
impl Send for Ray
impl Sync for Ray
impl Unpin for Ray
impl UnwindSafe for Ray
impl RefUnwindSafe for Ray
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,