pub struct BVHAccel {
pub primitives: Vec<Arc<Primitive>>,
pub nodes: Vec<LinearBVHNode>,
/* private fields */
}
Fields
primitives: Vec<Arc<Primitive>>
nodes: Vec<LinearBVHNode>
Implementations
sourceimpl BVHAccel
impl BVHAccel
pub fn new(
p: Vec<Arc<Primitive>>,
max_prims_in_node: usize,
split_method: SplitMethod
) -> Self
pub fn create(prims: Vec<Arc<Primitive>>, ps: &ParamSet) -> Primitive
pub fn recursive_build<'a>(
bvh: Arc<BVHAccel>,
arena: &'a Arena<BVHBuildNode<'a>>,
primitive_info: &mut Vec<BVHPrimitiveInfo>,
start: usize,
end: usize,
total_nodes: &mut usize,
ordered_prims: &mut Vec<Arc<Primitive>>
) -> &'a BVHBuildNode<'a>
pub fn flatten_bvh_tree<'a>(
node: &BVHBuildNode<'a>,
nodes: &mut Vec<LinearBVHNode>,
offset: &mut usize
) -> usize
pub fn world_bound(&self) -> Bounds3f
pub fn intersect(&self, ray: &Ray, isect: &mut SurfaceInteraction<'_>) -> bool
pub fn intersect_p(&self, ray: &Ray) -> bool
pub fn get_material(&self) -> Option<Arc<Material>>
pub fn get_area_light(&self) -> Option<Arc<Light>>
Auto Trait Implementations
impl !RefUnwindSafe for BVHAccel
impl Send for BVHAccel
impl Sync for BVHAccel
impl Unpin for BVHAccel
impl !UnwindSafe for BVHAccel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more