|
Blender V5.0
|
#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 () | |
| unique_ptr< BVHNode > | run () |
Protected Types | |
| enum | { THREAD_TASK_SIZE = 4096 } |
Protected Member Functions | |
| void | add_reference_triangles (BoundBox &root, BoundBox ¢er, Mesh *mesh, const int object_index) |
| void | add_reference_curves (BoundBox &root, BoundBox ¢er, Hair *hair, const int object_index) |
| void | add_reference_points (BoundBox &root, BoundBox ¢er, PointCloud *pointcloud, const int i) |
| void | add_reference_geometry (BoundBox &root, BoundBox ¢er, Geometry *geom, const int object_index) |
| void | add_reference_object (BoundBox &root, BoundBox ¢er, Object *ob, const int i) |
| void | add_references (BVHRange &root) |
| unique_ptr< BVHNode > | build_node (const BVHRange &range, vector< BVHReference > &references, const int level, BVHSpatialStorage *storage) |
| unique_ptr< BVHNode > | build_node (const BVHObjectBinning &range, const int level) |
| unique_ptr< BVHNode > | create_leaf_node (const BVHRange &range, const vector< BVHReference > &references) |
| unique_ptr< BVHNode > | create_object_leaf_nodes (const BVHReference *ref, const int start, const int num) |
| bool | range_within_max_leaf_size (const BVHRange &range, const vector< BVHReference > &references) const |
| void | thread_build_node (InnerNode *inner, const int child, const BVHObjectBinning &range, const int level) |
| void | thread_build_spatial_split_node (InnerNode *inner, const int child, const BVHRange &range, vector< BVHReference > &references, int level) |
| void | progress_update () |
| void | rotate (BVHNode *node, const int max_depth) |
| void | rotate (BVHNode *node, const int max_depth, const int iterations) |
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 33 of file build.cpp.
References objects, params, prim_index, prim_object, prim_time, prim_type, progress, progress_start_time, spatial_min_overlap, and unaligned_heuristic.
|
default |
|
protected |
Definition at line 147 of file build.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, bounds(), Hair::Curve::bounds_grow(), Hair::Curve::cardinal_motion_keys(), Attribute::data_float4(), BoundBox::empty, AttributeSet::find(), float, Hair::get_curve(), BoundBox::grow(), Geometry::has_motion_blur(), Hair::num_curves(), Hair::Curve::num_keys, params, PRIMITIVE_PACK_SEGMENT, Hair::primitive_type(), references, and step.
Referenced by add_reference_geometry().
|
protected |
Definition at line 357 of file build.cpp.
References add_reference_curves(), add_reference_points(), add_reference_triangles(), Geometry::is_hair(), Geometry::is_mesh(), Geometry::is_pointcloud(), and Geometry::is_volume().
Referenced by add_references().
|
protected |
Definition at line 376 of file build.cpp.
References Object::bounds, BoundBox::center2(), BoundBox::grow(), i, and references.
Referenced by add_references().
|
protected |
Definition at line 262 of file build.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, bounds(), PointCloud::Point::bounds_grow(), Attribute::data_float4(), BoundBox::empty, AttributeSet::find(), float, PointCloud::get_point(), BoundBox::grow(), Geometry::has_motion_blur(), i, PointCloud::Point::motion_key(), PointCloud::num_points(), params, PRIMITIVE_MOTION_POINT, PRIMITIVE_POINT, references, and step.
Referenced by add_reference_geometry().
|
protected |
Definition at line 57 of file build.cpp.
References ATTR_STD_MOTION_VERTEX_POSITION, Geometry::attributes, bounds(), Mesh::Triangle::bounds_grow(), Attribute::data_float3(), BoundBox::empty, AttributeSet::find(), float, Mesh::get_triangle(), BoundBox::grow(), Mesh::has_motion_blur(), Mesh::Triangle::motion_verts(), Mesh::num_triangles(), params, Mesh::primitive_type(), references, step, Mesh::Triangle::valid(), and verts.
Referenced by add_reference_geometry().
|
protected |
Definition at line 413 of file build.cpp.
References add_reference_geometry(), add_reference_object(), bounds(), count_primitives(), BoundBox::empty, i, objects, params, progress, references, and zero_float3().
Referenced by run().
|
protected |
Definition at line 712 of file build.cpp.
References bounds(), BVHRange::bounds(), build_node(), BVHObjectBinning, create_leaf_node(), FLT_MAX, BoundBox::half_area(), BVHObjectBinning::leafSAH, left, params, range_within_max_leaf_size(), references, BVHRange::size(), size(), BVHObjectBinning::split(), BVHObjectBinning::splitSAH, task_pool, thread_build_node(), THREAD_TASK_SIZE, BVHObjectBinning::unaligned_bounds(), and unaligned_heuristic.
|
protected |
Definition at line 802 of file build.cpp.
References bounds(), BVHMixedSplit::bounds, BVHRange::bounds(), build_node(), BVHMixedSplit, create_leaf_node(), BVHRange::end(), FLT_MAX, BoundBox::half_area(), left, BVHMixedSplit::nodeSAH, params, progress, progress_count, progress_total, progress_update(), references, BVHRange::set_start(), BVHRange::size(), BVHMixedSplit::split(), split(), BVHRange::start(), task_pool, thread_build_spatial_split_node(), THREAD_TASK_SIZE, and unaligned_heuristic.
Referenced by build_node(), build_node(), run(), thread_build_node(), and thread_build_spatial_split_node().
|
protected |
Definition at line 969 of file build.cpp.
References assert, bounds(), BVHRange::bounds(), BVHReference::bounds(), create_object_leaf_nodes(), BoundBox::empty, float, LeafNode::hi, i, LeafNode::lo, make_float2, max, merge(), min, need_prim_time, num, objects, 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, BVHRange::size(), size(), spatial_free_index, spatial_spin_lock, BVHRange::start(), BVHReference::time_from(), BVHReference::time_to(), and unaligned_heuristic.
Referenced by build_node(), and build_node().
|
protected |
Definition at line 926 of file build.cpp.
References assert, bounds(), BVHReference::bounds(), create_object_leaf_nodes(), BoundBox::empty, make_float2, max, min, need_prim_time, num, objects, prim_index, BVHReference::prim_index(), prim_object, BVHReference::prim_object(), prim_time, prim_type, BVHReference::prim_type(), BVHReference::time_from(), and BVHReference::time_to().
Referenced by create_leaf_node(), and create_object_leaf_nodes().
|
protected |
Definition at line 593 of file build.cpp.
References progress, progress_count, progress_original_total, progress_start_time, progress_total, string_printf(), and time_dt().
Referenced by build_node(), and thread_build_node().
|
protected |
Definition at line 656 of file build.cpp.
References i, max, params, BVHReference::prim_type(), PRIMITIVE_CURVE, PRIMITIVE_MOTION, PRIMITIVE_POINT, PRIMITIVE_TRIANGLE, references, BVHRange::size(), size(), and BVHRange::start().
Referenced by build_node(), and BVHMixedSplit::BVHMixedSplit().
|
protected |
Definition at line 1237 of file build.cpp.
References assert, BVHNode::bounds, InnerNode::children, FLT_MAX, BoundBox::half_area(), BVHNode::is_leaf(), make_float4, merge(), min, rotate(), and swap.
|
protected |
| unique_ptr< BVHNode > BVHBuild::run | ( | ) |
Definition at line 476 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, BVHObjectBinning, LOG_DEBUG, need_prim_time, params, prim_index, prim_object, prim_time, prim_type, PRIMITIVE_CURVE, progress, progress_count, progress_original_total, progress_start_time, progress_total, references, BoundBox::safe_area(), spatial_free_index, spatial_min_overlap, spatial_storage, string_human_readable_number(), task_pool, and time_dt().
Referenced by BVH2::build().
|
protected |
Definition at line 610 of file build.cpp.
References build_mutex, build_node(), BVHObjectBinning, InnerNode::children, lock, progress, progress_count, progress_update(), BVHRange::size(), and THREAD_TASK_SIZE.
Referenced by build_node().
|
protected |
Definition at line 636 of file build.cpp.
References build_node(), InnerNode::children, progress, references, and spatial_storage.
Referenced by build_node().
|
friend |
|
friend |
Definition at line 52 of file build.h.
References BVHMixedSplit.
Referenced by build_node(), and BVHMixedSplit.
|
friend |
Definition at line 57 of file build.h.
References BVHObjectBinning, i, num, and references.
Referenced by build_node(), BVHObjectBinning, run(), and thread_build_node().
|
friend |
|
friend |
|
friend |
Definition at line 56 of file build.h.
References BVHSpatialSplitBuildTask.
Referenced by BVHSpatialSplitBuildTask.
|
protected |
Definition at line 99 of file build.h.
Referenced by thread_build_node().
|
protected |
Definition at line 119 of file build.h.
Referenced by create_leaf_node(), create_object_leaf_nodes(), and run().
Definition at line 109 of file build.h.
Referenced by add_references(), BVHBuild(), create_leaf_node(), create_object_leaf_nodes(), and BVHSpatialSplit::split_reference().
|
protected |
Definition at line 122 of file build.h.
Referenced by add_reference_curves(), add_reference_points(), add_reference_triangles(), add_references(), build_node(), build_node(), BVHBuild(), BVHMixedSplit::BVHMixedSplit(), BVHObjectSplit::BVHObjectSplit(), BVHSpatialSplit::BVHSpatialSplit(), create_leaf_node(), range_within_max_leaf_size(), run(), BVHMixedSplit::split(), and BVHSpatialSplit::split().
|
protected |
Definition at line 115 of file build.h.
Referenced by BVHBuild(), create_leaf_node(), create_object_leaf_nodes(), and run().
|
protected |
Definition at line 116 of file build.h.
Referenced by BVHBuild(), create_leaf_node(), create_object_leaf_nodes(), and run().
Definition at line 117 of file build.h.
Referenced by BVHBuild(), create_leaf_node(), create_object_leaf_nodes(), and run().
|
protected |
Definition at line 114 of file build.h.
Referenced by BVHBuild(), create_leaf_node(), create_object_leaf_nodes(), and run().
|
protected |
Definition at line 125 of file build.h.
Referenced by add_references(), build_node(), BVHBuild(), create_leaf_node(), progress_update(), run(), thread_build_node(), and thread_build_spatial_split_node().
|
protected |
Definition at line 127 of file build.h.
Referenced by build_node(), create_leaf_node(), progress_update(), run(), and thread_build_node().
|
protected |
Definition at line 129 of file build.h.
Referenced by progress_update(), and run().
|
protected |
Definition at line 126 of file build.h.
Referenced by BVHBuild(), progress_update(), and run().
|
protected |
Definition at line 128 of file build.h.
Referenced by build_node(), create_leaf_node(), progress_update(), and run().
|
protected |
Definition at line 110 of file build.h.
Referenced by add_reference_curves(), add_reference_object(), add_reference_points(), add_reference_triangles(), add_references(), build_node(), build_node(), BVHObjectBinning, create_leaf_node(), range_within_max_leaf_size(), run(), and thread_build_spatial_split_node().
|
protected |
Definition at line 134 of file build.h.
Referenced by create_leaf_node(), and run().
|
protected |
Definition at line 132 of file build.h.
Referenced by BVHBuild(), BVHMixedSplit::BVHMixedSplit(), and run().
|
protected |
Definition at line 135 of file build.h.
Referenced by create_leaf_node().
|
protected |
Definition at line 133 of file build.h.
Referenced by run(), and thread_build_spatial_split_node().
|
protected |
Definition at line 138 of file build.h.
Referenced by build_node(), build_node(), and run().
|
protected |
Definition at line 141 of file build.h.
Referenced by build_node(), build_node(), BVHBuild(), and create_leaf_node().