[][src]Struct rpt::KdTree

pub struct KdTree<T> { /* fields omitted */ }

A kd-tree based on bounding boxes, used to accelerate ray intersections

This is a simple implementation; we don't care about slight performance optimizations from things like cache locality and packing structs into 8 bytes (such as what's given in the PBRT book).

The tree construction & ray intersection code was largely adapted from fogleman/pt. Parts of the construction algorithm were also taken from PBRT, which helped optimize the code by a few orders of magnitude.

Implementations

impl<T: Bounded> KdTree<T>[src]

pub fn new(objects: Vec<T>) -> Self[src]

Construct a new kd-tree from a collection of objects

Trait Implementations

impl<T: Bounded> Bounded for KdTree<T>[src]

impl<T: Bounded> Shape for KdTree<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for KdTree<T> where
    T: RefUnwindSafe

impl<T> Send for KdTree<T> where
    T: Send

impl<T> Sync for KdTree<T> where
    T: Sync

impl<T> Unpin for KdTree<T> where
    T: Unpin

impl<T> UnwindSafe for KdTree<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,