[][src]Struct pbrt::accelerators::kdtreeaccel::KdTreeAccel

pub struct KdTreeAccel {
    pub isect_cost: i32,
    pub traversal_cost: i32,
    pub max_prims: i32,
    pub empty_bonus: Float,
    pub primitives: Vec<Arc<Primitive>>,
    pub primitive_indices: Vec<i32>,
    pub nodes: Vec<KdAccelNode>,
    pub n_alloced_nodes: i32,
    pub next_free_node: i32,
    pub bounds: Bounds3f,
}

Fields

isect_cost: i32traversal_cost: i32max_prims: i32empty_bonus: Floatprimitives: Vec<Arc<Primitive>>primitive_indices: Vec<i32>nodes: Vec<KdAccelNode>n_alloced_nodes: i32next_free_node: i32bounds: Bounds3f

Implementations

impl KdTreeAccel[src]

pub fn new(
    p: Vec<Arc<Primitive>>,
    isect_cost: i32,
    traversal_cost: i32,
    empty_bonus: Float,
    max_prims: i32,
    max_depth: i32
) -> Self
[src]

pub fn create(prims: Vec<Arc<Primitive>>, ps: &ParamSet) -> Primitive[src]

pub fn build_tree(
    &mut self,
    node_num: i32,
    node_bounds: &Bounds3f,
    all_prim_bounds: &[Bounds3f],
    prim_nums: &[usize],
    n_primitives: usize,
    depth: i32,
    edges: &mut [Vec<BoundEdge>; 3],
    prims0: &mut [usize],
    prims1: &mut [usize],
    bad_refines: i32
)
[src]

pub fn world_bound(&self) -> Bounds3f[src]

pub fn intersect(&self, ray: &Ray, isect: &mut SurfaceInteraction<'_>) -> bool[src]

pub fn intersect_p(&self, ray: &Ray) -> bool[src]

pub fn get_material(&self) -> Option<Arc<Material>>[src]

pub fn get_area_light(&self) -> Option<Arc<Light>>[src]

Auto Trait Implementations

impl !RefUnwindSafe for KdTreeAccel

impl Send for KdTreeAccel

impl Sync for KdTreeAccel

impl Unpin for KdTreeAccel

impl !UnwindSafe for KdTreeAccel

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, 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.