|
Blender V5.0
|
#include <split.h>
Public Member Functions | |
| BVHSpatialSplit () | |
| BVHSpatialSplit (const BVHBuild &builder, BVHSpatialStorage *storage, const BVHRange &range, vector< BVHReference > &references, const float nodeSAH, const BVHUnaligned *unaligned_heuristic=nullptr, const Transform *aligned_space=nullptr) | |
| void | split (BVHBuild *builder, BVHRange &left, BVHRange &right, const BVHRange &range) |
| void | split_reference (const BVHBuild &builder, BVHReference &left, BVHReference &right, const BVHReference &ref, const int dim, float pos) |
Public Attributes | |
| float | sah |
| int | dim |
| float | pos |
Protected Member Functions | |
| void | split_triangle_primitive (const Mesh *mesh, const Transform *tfm, const int prim_index, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_curve_primitive (const Hair *hair, const Transform *tfm, const int prim_index, const int segment_index, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_point_primitive (const PointCloud *pointcloud, const Transform *tfm, const int prim_index, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_triangle_reference (const BVHReference &ref, const Mesh *mesh, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_curve_reference (const BVHReference &ref, const Hair *hair, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_point_reference (const BVHReference &ref, const PointCloud *pointcloud, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_object_reference (const Object *object, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| __forceinline BoundBox | get_prim_bounds (const BVHReference &prim) const |
| __forceinline float3 | get_unaligned_point (const float3 &point) const |
Protected Attributes | |
| BVHSpatialStorage * | storage_ |
| vector< BVHReference > * | references_ |
| const BVHUnaligned * | unaligned_heuristic_ |
| const Transform * | aligned_space_ |
Definition at line 59 of file bvh/split.h.
|
inline |
Definition at line 65 of file bvh/split.h.
References dim, FLT_MAX, nullptr, pos, references_, sah, and storage_.
| BVHSpatialSplit::BVHSpatialSplit | ( | const BVHBuild & | builder, |
| BVHSpatialStorage * | storage, | ||
| const BVHRange & | range, | ||
| vector< BVHReference > & | references, | ||
| const float | nodeSAH, | ||
| const BVHUnaligned * | unaligned_heuristic = nullptr, | ||
| const Transform * | aligned_space = nullptr ) |
Definition at line 129 of file bvh/split.cpp.
References aligned_space_, BVHRange::bounds(), BVHReference::bounds(), BVHSpatialBin::bounds, clamp(), BVHUnaligned::compute_aligned_boundbox(), dim, BoundBox::empty, BVHRange::end(), BVHSpatialBin::enter, BVHSpatialBin::exit, float, FLT_MAX, get_prim_bounds(), BoundBox::grow(), i, make_float3(), make_int3(), BoundBox::max, BoundBox::min, BVHParams::NUM_SPATIAL_BINS, BVHBuild::params, pos, BVHReference::prim_index(), BVHReference::prim_object(), BVHReference::prim_type(), BVHParams::primitive_cost(), references_, BoundBox::safe_area(), safe_divide(), sah, BVHRange::size(), split_reference(), BVHRange::start(), storage_, unaligned_heuristic_, float3::x, float3::y, and float3::z.
|
inlineprotected |
Definition at line 147 of file bvh/split.h.
References __forceinline, aligned_space_, BVHReference::bounds(), and unaligned_heuristic_.
Referenced by BVHSpatialSplit(), and split().
|
inlineprotected |
Definition at line 155 of file bvh/split.h.
References __forceinline, aligned_space_, and transform_point().
Referenced by split_curve_primitive(), split_point_primitive(), and split_triangle_primitive().
| void BVHSpatialSplit::split | ( | BVHBuild * | builder, |
| BVHRange & | left, | ||
| BVHRange & | right, | ||
| const BVHRange & | range ) |
Definition at line 234 of file bvh/split.cpp.
References aligned_space_, BVHReference::bounds(), dim, BoundBox::empty, BVHRange::end(), get_prim_bounds(), BoundBox::grow(), i, left, BoundBox::max, BoundBox::min, min, BVHBuild::params, pos, BVHParams::primitive_cost(), references_, BoundBox::safe_area(), split_reference(), BVHRange::start(), storage_, and swap.
|
protected |
Definition at line 383 of file bvh/split.cpp.
References clamp(), dim, Hair::Curve::first_key, Hair::get_curve(), get_unaligned_point(), BoundBox::grow(), mix, pos, and transform_point().
Referenced by split_curve_reference(), and split_object_reference().
|
protected |
Definition at line 471 of file bvh/split.cpp.
References dim, pos, BVHReference::prim_index(), BVHReference::prim_type(), PRIMITIVE_UNPACK_SEGMENT, and split_curve_primitive().
Referenced by split_reference().
|
protected |
Definition at line 499 of file bvh/split.cpp.
References dim, Hair::get_curve(), Geometry::is_hair(), Geometry::is_mesh(), Geometry::is_pointcloud(), Geometry::is_volume(), Hair::num_curves(), Hair::Curve::num_keys, PointCloud::num_points(), Mesh::num_triangles(), pos, split_curve_primitive(), split_point_primitive(), and split_triangle_primitive().
Referenced by split_reference().
|
protected |
Definition at line 434 of file bvh/split.cpp.
References dim, get_unaligned_point(), BoundBox::grow(), pos, and transform_point().
Referenced by split_object_reference(), and split_point_reference().
|
protected |
Definition at line 488 of file bvh/split.cpp.
References dim, pos, BVHReference::prim_index(), and split_point_primitive().
Referenced by split_reference().
| void BVHSpatialSplit::split_reference | ( | const BVHBuild & | builder, |
| BVHReference & | left, | ||
| BVHReference & | right, | ||
| const BVHReference & | ref, | ||
| const int | dim, | ||
| float | pos ) |
Definition at line 533 of file bvh/split.cpp.
References BVHReference::bounds(), dim, BoundBox::empty, BoundBox::intersect(), left, BoundBox::max, BoundBox::min, BVHBuild::objects, pos, BVHReference::prim_index(), BVHReference::prim_object(), BVHReference::prim_type(), PRIMITIVE_CURVE, PRIMITIVE_POINT, PRIMITIVE_TRIANGLE, split_curve_reference(), split_object_reference(), split_point_reference(), and split_triangle_reference().
Referenced by BVHSpatialSplit(), and split().
|
protected |
Definition at line 344 of file bvh/split.cpp.
References clamp(), dim, Mesh::get_triangle(), get_unaligned_point(), BoundBox::grow(), i, mix, pos, transform_point(), Mesh::Triangle::v, and verts.
Referenced by split_object_reference(), and split_triangle_reference().
|
protected |
Definition at line 461 of file bvh/split.cpp.
References dim, pos, BVHReference::prim_index(), and split_triangle_primitive().
Referenced by split_reference().
|
protected |
Definition at line 87 of file bvh/split.h.
Referenced by BVHSpatialSplit(), get_prim_bounds(), get_unaligned_point(), and split().
| int BVHSpatialSplit::dim |
Definition at line 62 of file bvh/split.h.
Referenced by BVHSpatialSplit(), BVHSpatialSplit(), split(), split_curve_primitive(), split_curve_reference(), split_object_reference(), split_point_primitive(), split_point_reference(), split_reference(), split_triangle_primitive(), and split_triangle_reference().
| float BVHSpatialSplit::pos |
Definition at line 63 of file bvh/split.h.
Referenced by BVHSpatialSplit(), BVHSpatialSplit(), split(), split_curve_primitive(), split_curve_reference(), split_object_reference(), split_point_primitive(), split_point_reference(), split_reference(), split_triangle_primitive(), and split_triangle_reference().
|
protected |
Definition at line 85 of file bvh/split.h.
Referenced by BVHSpatialSplit(), BVHSpatialSplit(), and split().
| float BVHSpatialSplit::sah |
Definition at line 61 of file bvh/split.h.
Referenced by BVHSpatialSplit(), and BVHSpatialSplit().
|
protected |
Definition at line 84 of file bvh/split.h.
Referenced by BVHSpatialSplit(), BVHSpatialSplit(), and split().
|
protected |
Definition at line 86 of file bvh/split.h.
Referenced by BVHSpatialSplit(), and get_prim_bounds().