Blender
V3.3
|
#include <bvh2.h>
Public Member Functions | |
void | build (Progress &progress, Stats *stats) |
void | refit (Progress &progress) |
![]() | |
virtual | ~BVH () |
virtual void | replace_geometry (const vector< Geometry * > &geometry, const vector< Object * > &objects) |
Public Attributes | |
PackedBVH | pack |
![]() | |
BVHParams | params |
vector< Geometry * > | geometry |
vector< Object * > | objects |
Protected Member Functions | |
BVH2 (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects) | |
virtual BVHNode * | widen_children_nodes (const BVHNode *root) |
void | pack_nodes (const BVHNode *root) |
void | pack_leaf (const BVHStackEntry &e, const LeafNode *leaf) |
void | pack_inner (const BVHStackEntry &e, const BVHStackEntry &e0, const BVHStackEntry &e1) |
void | pack_aligned_inner (const BVHStackEntry &e, const BVHStackEntry &e0, const BVHStackEntry &e1) |
void | pack_aligned_node (int idx, const BoundBox &b0, const BoundBox &b1, int c0, int c1, uint visibility0, uint visibility1) |
void | pack_unaligned_inner (const BVHStackEntry &e, const BVHStackEntry &e0, const BVHStackEntry &e1) |
void | pack_unaligned_node (int idx, const Transform &aligned_space0, const Transform &aligned_space1, const BoundBox &b0, const BoundBox &b1, int c0, int c1, uint visibility0, uint visibility1) |
void | refit_nodes () |
void | refit_node (int idx, bool leaf, BoundBox &bbox, uint &visibility) |
void | refit_primitives (int start, int end, BoundBox &bbox, uint &visibility) |
void | pack_primitives () |
void | pack_triangle (int idx, float4 storage[3]) |
void | pack_instances (size_t nodes_size, size_t leaf_nodes_size) |
![]() | |
BVH (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects) | |
Friends | |
class | BVH |
Additional Inherited Members | |
![]() | |
static BVH * | create (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects, Device *device) |
Definition at line 37 of file bvh2.cpp.
References BVHNode::deleteSubtree(), Progress::get_cancel(), NULL, BVH::objects, pack, pack_nodes(), pack_primitives(), BVH::params, PackedBVH::prim_index, PackedBVH::prim_object, PackedBVH::prim_time, PackedBVH::prim_type, BVHBuild::run(), Progress::set_substatus(), and widen_children_nodes().
Referenced by Device::build_bvh().
|
protected |
Definition at line 139 of file bvh2.cpp.
References BVHNode::bounds, e, BVHStackEntry::encodeIdx(), BVHStackEntry::node, pack_aligned_node(), and BVHNode::visibility.
Referenced by pack_inner().
|
protected |
Definition at line 152 of file bvh2.cpp.
References __float_as_int(), BVH_NODE_SIZE, data, make_int4, BoundBox::max, BoundBox::min, PackedBVH::nodes, pack, PATH_RAY_NODE_UNALIGNED, array< T, alignment >::size(), float3::x, float3::y, and float3::z.
Referenced by pack_aligned_inner(), and refit_node().
|
protected |
Definition at line 129 of file bvh2.cpp.
References e, BVHNode::is_unaligned, BVHStackEntry::node, pack_aligned_inner(), and pack_unaligned_inner().
Referenced by pack_nodes().
|
protected |
Definition at line 475 of file bvh2.cpp.
References Geometry::bvh, BVHParams::bvh_layout, BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, BVH_UNALIGNED_NODE_SIZE, array< T, alignment >::clear(), data, foreach, BVH::geometry, PackedBVH::leaf_nodes, Geometry::need_build_bvh(), PackedBVH::nodes, NULL, BVHParams::num_motion_curve_steps, BVHParams::num_motion_point_steps, BVHParams::num_motion_triangle_steps, PackedBVH::object_node, BVH::objects, pack, pack_nodes(), BVH::params, PATH_RAY_NODE_UNALIGNED, PackedBVH::prim_index, PackedBVH::prim_object, Geometry::prim_offset, PackedBVH::prim_time, PackedBVH::prim_type, PackedBVH::prim_visibility, array< T, alignment >::resize(), PackedBVH::root_index, array< T, alignment >::size(), and x.
Referenced by pack_nodes().
|
protected |
Definition at line 106 of file bvh2.cpp.
References __int_as_float(), __uint_as_float(), BVH_NODE_LEAF_SIZE, data, e, LeafNode::hi, PackedBVH::leaf_nodes, LeafNode::lo, LeafNode::num_triangles(), pack, PackedBVH::prim_index, PackedBVH::prim_type, array< T, alignment >::size(), and BVHNode::visibility.
Referenced by pack_nodes().
Definition at line 231 of file bvh2.cpp.
References BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, BVH_STAT_LEAF_COUNT, BVH_STAT_NODE_COUNT, BVH_STAT_UNALIGNED_INNER_COUNT, BVH_UNALIGNED_NODE_SIZE, array< T, alignment >::clear(), e, BVHNode::getSubtreeSize(), BVHNode::has_unaligned(), BVHNode::is_leaf(), PackedBVH::leaf_nodes, BVHParams::MAX_DEPTH, PackedBVH::nodes, pack, pack_inner(), pack_instances(), pack_leaf(), BVH::params, array< T, alignment >::resize(), PackedBVH::root_index, BVHParams::top_level, and BVHParams::use_unaligned_nodes.
Referenced by build(), and pack_instances().
|
protected |
Definition at line 454 of file bvh2.cpp.
References array< T, alignment >::clear(), BVH::objects, pack, PackedBVH::prim_index, PackedBVH::prim_object, PackedBVH::prim_visibility, array< T, alignment >::resize(), array< T, alignment >::size(), and Object::visibility_for_tracing().
|
protected |
Definition at line 184 of file bvh2.cpp.
References BVHNode::bounds, e, BVHStackEntry::encodeIdx(), BVHNode::get_aligned_space(), BVHStackEntry::node, pack_unaligned_node(), and BVHNode::visibility.
Referenced by pack_inner().
|
protected |
Definition at line 199 of file bvh2.cpp.
References __int_as_float(), BVH_UNALIGNED_NODE_SIZE, BVHUnaligned::compute_node_transform(), data, make_float4, PackedBVH::nodes, pack, PATH_RAY_NODE_UNALIGNED, array< T, alignment >::size(), Transform::x, Transform::y, and Transform::z.
Referenced by pack_unaligned_inner(), and refit_node().
Definition at line 89 of file bvh2.cpp.
References Progress::get_cancel(), pack_primitives(), refit_nodes(), and Progress::set_substatus().
Referenced by Device::build_bvh().
Definition at line 313 of file bvh2.cpp.
References __int_as_float(), __uint_as_float(), BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, data, BoundBox::empty, BoundBox::grow(), PackedBVH::leaf_nodes, PackedBVH::nodes, pack, pack_aligned_node(), pack_unaligned_node(), PATH_RAY_NODE_UNALIGNED, refit_primitives(), array< T, alignment >::size(), transform_identity(), and w().
Referenced by refit_nodes().
|
protected |
Definition at line 304 of file bvh2.cpp.
References BoundBox::empty, pack, BVH::params, refit_node(), PackedBVH::root_index, and BVHParams::top_level.
Referenced by refit().
Definition at line 363 of file bvh2.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Object::bounds, curve, Attribute::data_float3(), AttributeSet::find(), Hair::get_curve(), PointCloud::get_point(), Mesh::get_triangle(), BoundBox::grow(), mesh, BVH::objects, pack, BVH::params, point, PackedBVH::prim_index, PackedBVH::prim_object, Geometry::prim_offset, PackedBVH::prim_type, PRIMITIVE_CURVE, PRIMITIVE_POINT, PRIMITIVE_UNPACK_SEGMENT, Mesh::size, steps, BVHParams::top_level, and Object::visibility_for_tracing().
Referenced by refit_node().
PackedBVH BVH2::pack |
Definition at line 38 of file bvh2.h.
Referenced by build(), pack_aligned_node(), pack_instances(), pack_leaf(), pack_nodes(), pack_primitives(), pack_unaligned_node(), refit_node(), refit_nodes(), and refit_primitives().