|
Blender V5.0
|
#include <bvh2.h>
Inherits BVH.
Public Member Functions | |
| BVH2 (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects) | |
| void | build (Progress &progress, Stats *stats) |
| void | refit (Progress &progress) |
| Public Member Functions inherited from BVH | |
| virtual | ~BVH ()=default |
| virtual void | replace_geometry (const vector< Geometry * > &geometry, const vector< Object * > &objects) |
Public Attributes | |
| PackedBVH | pack |
| Public Attributes inherited from BVH | |
| BVHParams | params |
| vector< Geometry * > | geometry |
| vector< Object * > | objects |
Protected Member Functions | |
| virtual unique_ptr< BVHNode > | widen_children_nodes (unique_ptr< 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 (const 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 (const 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 (const int idx, bool leaf, BoundBox &bbox, uint &visibility) |
| void | refit_primitives (const int start, const int end, BoundBox &bbox, uint &visibility) |
| void | pack_primitives () |
| void | pack_triangle (const int idx, const float4 storage[3]) |
| void | pack_instances (const size_t nodes_size, const size_t leaf_nodes_size) |
| Protected Member Functions inherited from BVH | |
| BVH (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects) | |
Additional Inherited Members | |
| Static Public Member Functions inherited from BVH | |
| static unique_ptr< BVH > | create (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects, Device *device) |
Definition at line 39 of file bvh2.cpp.
References Progress::get_cancel(), BVH::objects, pack, pack_nodes(), pack_primitives(), BVH::params, BVHBuild::run(), Progress::set_substatus(), and widen_children_nodes().
Referenced by Device::build_bvh().
|
protected |
Definition at line 129 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 142 of file bvh2.cpp.
References __float_as_int, assert, BVH_NODE_SIZE, data, make_int4(), BoundBox::max, BoundBox::min, pack, PATH_RAY_NODE_UNALIGNED, float3::x, float3::y, and float3::z.
Referenced by pack_aligned_inner(), and refit_node().
|
protected |
Definition at line 119 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 470 of file bvh2.cpp.
References Geometry::bvh, BVH2(), BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, BVH_UNALIGNED_NODE_SIZE, array< T, alignment >::data(), data, BVH::geometry, i, PackedBVH::leaf_nodes, Geometry::need_build_bvh(), PackedBVH::nodes, BVH::objects, pack, pack_nodes(), BVH::params, PATH_RAY_NODE_UNALIGNED, PackedBVH::prim_index, Geometry::prim_offset, PackedBVH::prim_time, PackedBVH::prim_type, PackedBVH::prim_visibility, PackedBVH::root_index, array< T, alignment >::size(), and x.
Referenced by pack_nodes().
|
protected |
Definition at line 96 of file bvh2.cpp.
References assert, BVH_NODE_LEAF_SIZE, data, e, LeafNode::hi, LeafNode::lo, LeafNode::num_triangles(), pack, BVHNode::visibility, and zero_int4().
Referenced by pack_nodes().
|
protected |
Definition at line 219 of file bvh2.cpp.
References assert, BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, BVH_STAT_LEAF_COUNT, BVH_STAT_NODE_COUNT, BVH_STAT_UNALIGNED_INNER_COUNT, BVH_UNALIGNED_NODE_SIZE, e, BVHNode::getSubtreeSize(), BVHNode::has_unaligned(), i, BVHNode::is_leaf(), BVHParams::MAX_DEPTH, pack, pack_inner(), pack_instances(), pack_leaf(), and BVH::params.
Referenced by build(), and pack_instances().
|
protected |
Definition at line 449 of file bvh2.cpp.
References i, BVH::objects, pack, and Object::visibility_for_tracing().
|
protected |
|
protected |
Definition at line 174 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 189 of file bvh2.cpp.
References __float4_as_int4(), assert, BVH_UNALIGNED_NODE_SIZE, BVHUnaligned::compute_node_transform(), data, make_int4(), pack, PATH_RAY_NODE_UNALIGNED, Transform::x, Transform::y, and Transform::z.
Referenced by pack_unaligned_inner(), and refit_node().
| void BVH2::refit | ( | Progress & | progress | ) |
Definition at line 78 of file bvh2.cpp.
References Progress::get_cancel(), pack_primitives(), refit_nodes(), and Progress::set_substatus().
Referenced by Device::build_bvh().
Definition at line 302 of file bvh2.cpp.
References assert, BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, data, BoundBox::empty, BoundBox::grow(), pack, pack_aligned_node(), pack_unaligned_node(), PATH_RAY_NODE_UNALIGNED, refit_node(), refit_primitives(), transform_identity(), int4::w, int4::x, int4::y, and int4::z.
Referenced by refit_node(), and refit_nodes().
|
protected |
Definition at line 293 of file bvh2.cpp.
References assert, BoundBox::empty, pack, BVH::params, and refit_node().
Referenced by refit().
|
protected |
Definition at line 354 of file bvh2.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Object::bounds, Hair::Curve::bounds_grow(), Mesh::Triangle::bounds_grow(), PointCloud::Point::bounds_grow(), Attribute::data_float3(), AttributeSet::find(), Hair::get_curve(), PointCloud::get_point(), Mesh::get_triangle(), BoundBox::grow(), i, BVH::objects, pack, BVH::params, Geometry::prim_offset, PRIMITIVE_CURVE, PRIMITIVE_POINT, PRIMITIVE_UNPACK_SEGMENT, and Object::visibility_for_tracing().
Referenced by refit_node().
|
protectedvirtual |
| PackedBVH BVH2::pack |
Definition at line 47 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().