|
Blender V4.3
|
#include <split.h>
Public Member Functions | |
| BVHSpatialSplit () | |
| BVHSpatialSplit (const BVHBuild &builder, BVHSpatialStorage *storage, const BVHRange &range, vector< BVHReference > &references, float nodeSAH, const BVHUnaligned *unaligned_heuristic=NULL, const Transform *aligned_space=NULL) | |
| void | split (BVHBuild *builder, BVHRange &left, BVHRange &right, const BVHRange &range) |
| void | split_reference (const BVHBuild &builder, BVHReference &left, BVHReference &right, const BVHReference &ref, 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, int prim_index, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_curve_primitive (const Hair *hair, const Transform *tfm, int prim_index, int segment_index, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_point_primitive (const PointCloud *pointcloud, const Transform *tfm, int prim_index, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_triangle_reference (const BVHReference &ref, const Mesh *mesh, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_curve_reference (const BVHReference &ref, const Hair *hair, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_point_reference (const BVHReference &ref, const PointCloud *pointcloud, int dim, float pos, BoundBox &left_bounds, BoundBox &right_bounds) |
| void | split_object_reference (const Object *object, int dim, 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 62 of file bvh/split.h.
|
inline |
Definition at line 68 of file bvh/split.h.
| BVHSpatialSplit::BVHSpatialSplit | ( | const BVHBuild & | builder, |
| BVHSpatialStorage * | storage, | ||
| const BVHRange & | range, | ||
| vector< BVHReference > & | references, | ||
| float | nodeSAH, | ||
| const BVHUnaligned * | unaligned_heuristic = NULL, | ||
| const Transform * | aligned_space = NULL ) |
Definition at line 124 of file bvh/split.cpp.
References BVHSpatialStorage::bins, BVHReference::bounds(), BVHSpatialBin::bounds, clamp(), BVHUnaligned::compute_aligned_boundbox(), dim, BoundBox::empty, BVHSpatialBin::enter, BVHSpatialBin::exit, float, get_prim_bounds(), BoundBox::grow(), make_int3(), BoundBox::max, BoundBox::min, NULL, BVHParams::NUM_SPATIAL_BINS, BVHBuild::params, pos, BVHReference::prim_index(), BVHReference::prim_object(), BVHReference::prim_type(), BVHParams::primitive_cost(), references_, BVHSpatialStorage::right_bounds, BoundBox::safe_area(), sah, BoundBox::size(), split_reference(), storage_, float3::x, float3::y, and float3::z.
|
inlineprotected |
Definition at line 147 of file bvh/split.h.
References aligned_space_, BVHReference::bounds(), BVHUnaligned::compute_aligned_prim_boundbox(), NULL, and unaligned_heuristic_.
Referenced by BVHSpatialSplit(), and split().
|
inlineprotected |
Definition at line 157 of file bvh/split.h.
References aligned_space_, NULL, point, 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 227 of file bvh/split.cpp.
References aligned_space_, BVHReference::bounds(), dim, BoundBox::empty, get_prim_bounds(), BoundBox::grow(), BoundBox::max, BoundBox::min, min, BVHSpatialStorage::new_references, NULL, BVHBuild::params, pos, BVHParams::primitive_cost(), references_, BoundBox::safe_area(), split_reference(), storage_, and swap.
Referenced by BVHMixedSplit::split().
|
protected |
Definition at line 375 of file bvh/split.cpp.
References clamp(), dim, Hair::Curve::first_key, get_unaligned_point(), BoundBox::grow(), mix, NULL, pos, and transform_point().
Referenced by split_curve_reference(), and split_object_reference().
|
protected |
Definition at line 463 of file bvh/split.cpp.
References dim, NULL, pos, BVHReference::prim_index(), BVHReference::prim_type(), PRIMITIVE_UNPACK_SEGMENT, and split_curve_primitive().
Referenced by split_reference().
|
protected |
Definition at line 490 of file bvh/split.cpp.
References dim, Geometry::geometry_type, Geometry::HAIR, Geometry::MESH, PointCloud::num_points(), Geometry::POINTCLOUD, pos, split_curve_primitive(), split_point_primitive(), split_triangle_primitive(), and Geometry::VOLUME.
Referenced by split_reference().
|
protected |
Definition at line 426 of file bvh/split.cpp.
References dim, get_unaligned_point(), BoundBox::grow(), NULL, pos, and transform_point().
Referenced by split_object_reference(), and split_point_reference().
|
protected |
Definition at line 480 of file bvh/split.cpp.
References dim, NULL, 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, | ||
| int | dim, | ||
| float | pos ) |
Definition at line 521 of file bvh/split.cpp.
References BVHReference::bounds(), dim, BoundBox::empty, BoundBox::intersect(), 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 336 of file bvh/split.cpp.
References clamp(), dim, get_unaligned_point(), BoundBox::grow(), mix, pos, transform_point(), Mesh::Triangle::v, and verts.
Referenced by split_object_reference(), and split_triangle_reference().
|
protected |
Definition at line 453 of file bvh/split.cpp.
References dim, NULL, pos, BVHReference::prim_index(), and split_triangle_primitive().
Referenced by split_reference().
|
protected |
Definition at line 90 of file bvh/split.h.
Referenced by get_prim_bounds(), get_unaligned_point(), and split().
| int BVHSpatialSplit::dim |
Definition at line 65 of file bvh/split.h.
Referenced by 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 66 of file bvh/split.h.
Referenced by 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 88 of file bvh/split.h.
Referenced by BVHSpatialSplit(), and split().
| float BVHSpatialSplit::sah |
Definition at line 64 of file bvh/split.h.
Referenced by BVHMixedSplit::BVHMixedSplit(), BVHSpatialSplit(), and BVHMixedSplit::split().
|
protected |
Definition at line 87 of file bvh/split.h.
Referenced by BVHSpatialSplit(), and split().
|
protected |
Definition at line 89 of file bvh/split.h.
Referenced by get_prim_bounds().