|
Blender V4.3
|
#include <bvh2.h>
Inherits BVH.
Public Member Functions | |
| void | build (Progress &progress, Stats *stats) |
| void | refit (Progress &progress) |
| Public Member Functions inherited from BVH | |
| virtual | ~BVH () |
| 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 | |
| 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) |
| Protected Member Functions inherited from BVH | |
| BVH (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects) | |
Friends | |
| class | BVH |
Additional Inherited Members | |
| Static Public Member Functions inherited from BVH | |
| static BVH * | create (const BVHParams ¶ms, const vector< Geometry * > &geometry, const vector< Object * > &objects, Device *device) |
Definition at line 38 of file bvh2.cpp.
References BVHNode::deleteSubtree(), Progress::get_cancel(), NULL, 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 141 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 154 of file bvh2.cpp.
References __float_as_int, 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 131 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 480 of file bvh2.cpp.
References Geometry::bvh, BVH2(), BVH_NODE_LEAF_SIZE, BVH_NODE_SIZE, BVH_UNALIGNED_NODE_SIZE, data, BVH::geometry, PackedBVH::leaf_nodes, Geometry::need_build_bvh(), PackedBVH::nodes, NULL, 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 108 of file bvh2.cpp.
References __int_as_float, __uint_as_float, BVH_NODE_LEAF_SIZE, data, e, LeafNode::hi, LeafNode::lo, LeafNode::num_triangles(), pack, and BVHNode::visibility.
Referenced by pack_nodes().
|
protected |
Definition at line 233 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, e, BVHNode::getSubtreeSize(), BVHNode::has_unaligned(), 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 459 of file bvh2.cpp.
References BVH::objects, pack, and Object::visibility_for_tracing().
|
protected |
Definition at line 186 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 201 of file bvh2.cpp.
References __int_as_float, BVH_UNALIGNED_NODE_SIZE, BVHUnaligned::compute_node_transform(), data, make_float4(), 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 90 of file bvh2.cpp.
References Progress::get_cancel(), pack_primitives(), refit_nodes(), and Progress::set_substatus().
Referenced by Device::build_bvh().
Definition at line 315 of file bvh2.cpp.
References __int_as_float, __uint_as_float, 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(), and w().
Referenced by refit_node(), and refit_nodes().
|
protected |
Definition at line 306 of file bvh2.cpp.
References BoundBox::empty, pack, BVH::params, and refit_node().
Referenced by refit().
Definition at line 365 of file bvh2.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, Object::bounds, Hair::Curve::bounds_grow(), Mesh::Triangle::bounds_grow(), Attribute::data_float3(), AttributeSet::find(), Hair::get_curve(), PointCloud::get_point(), Mesh::get_triangle(), BoundBox::grow(), BVH::objects, pack, BVH::params, point, Geometry::prim_offset, PRIMITIVE_CURVE, PRIMITIVE_POINT, PRIMITIVE_UNPACK_SEGMENT, steps, and Object::visibility_for_tracing().
Referenced by refit_node().
|
friend |
Definition at line 45 of file bvh2.h.
References BVH, e, BVH::geometry, BVH::objects, and BVH::params.
| PackedBVH BVH2::pack |
Definition at line 41 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().