|
Blender V4.3
|
#include <build.h>
Public Member Functions | |
| BVHBuild (const vector< Object * > &objects, array< int > &prim_type, array< int > &prim_index, array< int > &prim_object, array< float2 > &prim_time, const BVHParams ¶ms, Progress &progress) | |
| ~BVHBuild () | |
| BVHNode * | run () |
Protected Types | |
| enum | { THREAD_TASK_SIZE = 4096 } |
Protected Attributes | |
| thread_mutex | build_mutex |
| vector< Object * > | objects |
| vector< BVHReference > | references |
| int | num_original_references |
| array< int > & | prim_type |
| array< int > & | prim_index |
| array< int > & | prim_object |
| array< float2 > & | prim_time |
| bool | need_prim_time |
| BVHParams | params |
| Progress & | progress |
| double | progress_start_time |
| size_t | progress_count |
| size_t | progress_total |
| size_t | progress_original_total |
| float | spatial_min_overlap |
| enumerable_thread_specific< BVHSpatialStorage > | spatial_storage |
| size_t | spatial_free_index |
| thread_spin_lock | spatial_spin_lock |
| TaskPool | task_pool |
| BVHUnaligned | unaligned_heuristic |
Friends | |
| class | BVHMixedSplit |
| class | BVHObjectSplit |
| class | BVHSpatialSplit |
| class | BVHBuildTask |
| class | BVHSpatialSplitBuildTask |
| class | BVHObjectBinning |
| CCL_NAMESPACE_BEGIN BVHBuild::BVHBuild | ( | const vector< Object * > & | objects, |
| array< int > & | prim_type, | ||
| array< int > & | prim_index, | ||
| array< int > & | prim_object, | ||
| array< float2 > & | prim_time, | ||
| const BVHParams & | params, | ||
| Progress & | progress ) |
Definition at line 35 of file build.cpp.
References spatial_min_overlap.
|
protected |
Definition at line 149 of file build.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, bounds(), Attribute::data_float4(), BoundBox::empty, float, BoundBox::grow(), NULL, BVHParams::num_motion_curve_steps, params, PRIMITIVE_PACK_SEGMENT, references, and BVHParams::use_spatial_split.
Referenced by add_reference_geometry().
|
protected |
Definition at line 356 of file build.cpp.
References add_reference_curves(), add_reference_points(), add_reference_triangles(), Geometry::geometry_type, Geometry::HAIR, Geometry::MESH, Geometry::POINTCLOUD, and Geometry::VOLUME.
Referenced by add_references().
|
protected |
Definition at line 375 of file build.cpp.
References Object::bounds, BoundBox::center2(), BoundBox::grow(), and references.
Referenced by add_references().
|
protected |
Definition at line 261 of file build.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, bounds(), Attribute::data_float4(), BoundBox::empty, AttributeSet::find(), float, PointCloud::get_point(), BoundBox::grow(), Geometry::has_motion_blur(), NULL, BVHParams::num_motion_point_steps, PointCloud::num_points(), params, PRIMITIVE_MOTION_POINT, PRIMITIVE_POINT, references, and BVHParams::use_spatial_split.
Referenced by add_reference_geometry().
|
protected |
Definition at line 59 of file build.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, bounds(), Mesh::Triangle::bounds_grow(), Attribute::data_float3(), BoundBox::empty, float, BoundBox::grow(), Mesh::Triangle::motion_verts(), NULL, BVHParams::num_motion_triangle_steps, params, references, BVHParams::use_spatial_split, Mesh::Triangle::valid(), and verts.
Referenced by add_reference_geometry().
|
protected |
Definition at line 411 of file build.cpp.
References add_reference_geometry(), add_reference_object(), bounds(), count_primitives(), BoundBox::empty, Progress::get_cancel(), Object::is_traceable(), params, progress, references, BVHParams::top_level, and zero_float3().
Referenced by run().
|
protected |
Definition at line 692 of file build.cpp.
References bounds(), build_node(), BVHObjectBinning, BVHUnaligned::compute_aligned_boundbox(), BVHUnaligned::compute_aligned_space(), create_leaf_node(), FLT_MAX, BoundBox::half_area(), BVHObjectBinning::leafSAH, left, params, TaskPool::push(), range_within_max_leaf_size(), references, BVHParams::sah_node_cost, BVHParams::sah_primitive_cost, BVHNode::set_aligned_space(), BVHParams::small_enough_for_leaf(), BVHObjectBinning::split(), BVHObjectBinning::splitSAH, task_pool, thread_build_node(), THREAD_TASK_SIZE, BVHParams::top_level, BVHObjectBinning::unaligned_bounds(), unaligned_heuristic, BVHParams::unaligned_split_threshold, and BVHParams::use_unaligned_nodes.
|
protected |
Definition at line 778 of file build.cpp.
References bounds(), BVHMixedSplit::bounds, build_node(), BVHMixedSplit, BVHUnaligned::compute_aligned_boundbox(), BVHUnaligned::compute_aligned_space(), create_leaf_node(), FLT_MAX, Progress::get_cancel(), BoundBox::half_area(), left, BVHMixedSplit::nodeSAH, NULL, params, progress, progress_count, progress_total, progress_update(), TaskPool::push(), references, BVHParams::sah_node_cost, BVHParams::sah_primitive_cost, BVHNode::set_aligned_space(), BVHParams::small_enough_for_leaf(), BVHMixedSplit::split(), split(), task_pool, thread_build_spatial_split_node(), THREAD_TASK_SIZE, BVHParams::top_level, unaligned_heuristic, BVHParams::unaligned_split_threshold, and BVHParams::use_unaligned_nodes.
Referenced by build_node(), build_node(), run(), thread_build_node(), and thread_build_spatial_split_node().
|
protected |
Definition at line 936 of file build.cpp.
References bounds(), BVHNode::bounds, BVHReference::bounds(), array< T, alignment >::capacity(), BVHUnaligned::compute_aligned_prim_boundbox(), BVHUnaligned::compute_aligned_space(), create_object_leaf_nodes(), BoundBox::empty, float, BoundBox::grow(), LeafNode::hi, int, LeafNode::lo, make_float2(), max, merge(), min, need_prim_time, NULL, params, prim_index, BVHReference::prim_index(), prim_object, BVHReference::prim_object(), prim_time, prim_type, BVHReference::prim_type(), PRIMITIVE_ALL, PRIMITIVE_INDEX, PRIMITIVE_NUM, progress, progress_count, progress_total, references, array< T, alignment >::reserve(), array< T, alignment >::resize(), BVHNode::set_aligned_space(), array< T, alignment >::size(), size(), spatial_free_index, spatial_spin_lock, BVHNode::time_from, BVHReference::time_from(), BVHNode::time_to, BVHReference::time_to(), unaligned_heuristic, BVHParams::use_spatial_split, and BVHParams::use_unaligned_nodes.
Referenced by build_node(), and build_node().
|
protected |
Definition at line 899 of file build.cpp.
References bounds(), BVHNode::bounds, BVHReference::bounds(), create_object_leaf_nodes(), BoundBox::empty, make_float2(), max, min, need_prim_time, prim_index, BVHReference::prim_index(), prim_object, BVHReference::prim_object(), prim_time, prim_type, BVHReference::prim_type(), array< T, alignment >::size(), BVHNode::time_from, BVHReference::time_from(), BVHNode::time_to, and BVHReference::time_to().
Referenced by create_leaf_node(), and create_object_leaf_nodes().
|
protected |
Definition at line 574 of file build.cpp.
References double(), progress, progress_count, progress_original_total, progress_start_time, progress_total, Progress::set_substatus(), string_printf(), and time_dt().
Referenced by build_node(), and thread_build_node().
|
protected |
Definition at line 636 of file build.cpp.
References max, BVHParams::max_curve_leaf_size, BVHParams::max_motion_curve_leaf_size, BVHParams::max_motion_point_leaf_size, BVHParams::max_motion_triangle_leaf_size, BVHParams::max_point_leaf_size, BVHParams::max_triangle_leaf_size, params, BVHReference::prim_type(), PRIMITIVE_CURVE, PRIMITIVE_MOTION, PRIMITIVE_POINT, PRIMITIVE_TRIANGLE, references, and size().
Referenced by build_node(), and BVHMixedSplit::BVHMixedSplit().
Definition at line 1194 of file build.cpp.
References BVHNode::bounds, InnerNode::children, FLT_MAX, BoundBox::half_area(), int, BVHNode::is_leaf(), make_float4(), merge(), min, rotate(), and swap.
| BVHNode * BVHBuild::run | ( | ) |
Definition at line 473 of file build.cpp.
References add_references(), BVHRange::bounds(), build_node(), BVH_STAT_DEPTH, BVH_STAT_INNER_COUNT, BVH_STAT_LEAF_COUNT, BVH_STAT_NODE_COUNT, BVH_STAT_UNALIGNED_COUNT, array< T, alignment >::capacity(), BVHNode::deleteSubtree(), Progress::get_cancel(), BVHNode::getSubtreeSize(), need_prim_time, NULL, params, prim_index, prim_object, prim_time, prim_type, progress, progress_count, progress_original_total, progress_start_time, progress_total, references, array< T, alignment >::resize(), BoundBox::safe_area(), array< T, alignment >::size(), spatial_free_index, spatial_min_overlap, BVHParams::spatial_split_alpha, spatial_storage, string_human_readable_number(), task_pool, time_dt(), BVHParams::top_level, BVHNode::update_time(), BVHNode::update_visibility(), BVHParams::use_motion_steps(), BVHParams::use_spatial_split, VLOG_WORK, and TaskPool::wait_work().
Referenced by BVH2::build().
|
protected |
Definition at line 590 of file build.cpp.
References build_mutex, build_node(), InnerNode::children, Progress::get_cancel(), lock, node, progress, progress_count, progress_update(), and THREAD_TASK_SIZE.
Referenced by build_node().
|
protected |
Definition at line 616 of file build.cpp.
References build_node(), InnerNode::children, Progress::get_cancel(), node, progress, references, and spatial_storage.
Referenced by build_node().
|
friend |
Definition at line 52 of file build.h.
Referenced by build_node().
|
friend |
Definition at line 57 of file build.h.
Referenced by build_node().
|
friend |
|
friend |
|
protected |
Definition at line 87 of file build.h.
Referenced by thread_build_node().
|
protected |
Definition at line 107 of file build.h.
Referenced by create_leaf_node(), create_object_leaf_nodes(), and run().
Definition at line 97 of file build.h.
Referenced by BVHSpatialSplit::split_reference().
|
protected |
Definition at line 110 of file build.h.
Referenced by add_reference_curves(), add_reference_points(), add_reference_triangles(), add_references(), build_node(), build_node(), BVHMixedSplit::BVHMixedSplit(), BVHObjectSplit::BVHObjectSplit(), BVHSpatialSplit::BVHSpatialSplit(), create_leaf_node(), range_within_max_leaf_size(), run(), BVHMixedSplit::split(), and BVHSpatialSplit::split().
Definition at line 103 of file build.h.
Referenced by create_leaf_node(), create_object_leaf_nodes(), and run().
Definition at line 104 of file build.h.
Referenced by create_leaf_node(), create_object_leaf_nodes(), and run().
Definition at line 105 of file build.h.
Referenced by create_leaf_node(), create_object_leaf_nodes(), and run().
Definition at line 102 of file build.h.
Referenced by create_leaf_node(), create_object_leaf_nodes(), and run().
|
protected |
Definition at line 113 of file build.h.
Referenced by add_references(), build_node(), create_leaf_node(), progress_update(), run(), thread_build_node(), and thread_build_spatial_split_node().
|
protected |
Definition at line 115 of file build.h.
Referenced by build_node(), create_leaf_node(), progress_update(), run(), and thread_build_node().
|
protected |
Definition at line 117 of file build.h.
Referenced by progress_update(), and run().
|
protected |
Definition at line 114 of file build.h.
Referenced by progress_update(), and run().
|
protected |
Definition at line 116 of file build.h.
Referenced by build_node(), create_leaf_node(), progress_update(), and run().
|
protected |
Definition at line 98 of file build.h.
Referenced by add_reference_curves(), add_reference_object(), add_reference_points(), add_reference_triangles(), add_references(), build_node(), build_node(), create_leaf_node(), range_within_max_leaf_size(), run(), and thread_build_spatial_split_node().
|
protected |
Definition at line 122 of file build.h.
Referenced by create_leaf_node(), and run().
|
protected |
Definition at line 120 of file build.h.
Referenced by BVHBuild(), BVHMixedSplit::BVHMixedSplit(), and run().
|
protected |
Definition at line 123 of file build.h.
Referenced by create_leaf_node().
|
protected |
Definition at line 121 of file build.h.
Referenced by run(), and thread_build_spatial_split_node().
|
protected |
Definition at line 126 of file build.h.
Referenced by build_node(), build_node(), and run().
|
protected |
Definition at line 129 of file build.h.
Referenced by build_node(), build_node(), and create_leaf_node().