Blender
V3.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 61 of file bvh/split.h.
|
inline |
Definition at line 67 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 121 of file bvh/split.cpp.
References BVHSpatialStorage::bins, BVHReference::bounds(), BVHRange::bounds(), BVHSpatialBin::bounds, blender::math::clamp(), BVHUnaligned::compute_aligned_boundbox(), dim, BoundBox::empty, BVHRange::end(), 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, BVHRange::size(), split_reference(), BVHRange::start(), storage_, float3::x, float3::y, and float3::z.
|
inlineprotected |
Definition at line 148 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 158 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 224 of file bvh/split.cpp.
References aligned_space_, BVHReference::bounds(), dim, BoundBox::empty, BVHRange::end(), get_prim_bounds(), BoundBox::grow(), left, BoundBox::max, BoundBox::min, min, BVHSpatialStorage::new_references, NULL, BVHBuild::params, pos, BVHParams::primitive_cost(), references_, right, BoundBox::safe_area(), split_reference(), BVHRange::start(), storage_, and swap().
Referenced by BVHMixedSplit::split().
|
protected |
Definition at line 370 of file bvh/split.cpp.
References blender::math::clamp(), curve, dim, Hair::get_curve(), get_unaligned_point(), BoundBox::grow(), lerp(), NULL, pos, t, transform_point(), and v1.
Referenced by split_curve_reference(), and split_object_reference().
|
protected |
Definition at line 453 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 480 of file bvh/split.cpp.
References curve, dim, Geometry::geometry_type, Hair::get_curve(), Geometry::HAIR, Geometry::MESH, mesh, Hair::num_curves(), PointCloud::num_points(), Mesh::num_triangles(), Geometry::POINTCLOUD, pos, split_curve_primitive(), split_point_primitive(), split_triangle_primitive(), and Geometry::VOLUME.
Referenced by split_reference().
|
protected |
Definition at line 417 of file bvh/split.cpp.
References dim, get_unaligned_point(), BoundBox::grow(), NULL, point, pos, and transform_point().
Referenced by split_object_reference(), and split_point_reference().
|
protected |
Definition at line 470 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 511 of file bvh/split.cpp.
References BVHReference::bounds(), dim, BoundBox::empty, BoundBox::intersect(), left, BoundBox::max, mesh, BoundBox::min, BVHBuild::objects, pos, BVHReference::prim_index(), BVHReference::prim_object(), BVHReference::prim_type(), PRIMITIVE_CURVE, PRIMITIVE_POINT, PRIMITIVE_TRIANGLE, right, split_curve_reference(), split_object_reference(), split_point_reference(), and split_triangle_reference().
Referenced by BVHSpatialSplit(), and split().
|
protected |
Definition at line 333 of file bvh/split.cpp.
References blender::math::clamp(), dim, Mesh::get_triangle(), get_unaligned_point(), BoundBox::grow(), lerp(), mesh, pos, t, transform_point(), v1, and verts.
Referenced by split_object_reference(), and split_triangle_reference().
|
protected |
Definition at line 443 of file bvh/split.cpp.
References dim, mesh, NULL, pos, BVHReference::prim_index(), and split_triangle_primitive().
Referenced by split_reference().
|
protected |
Definition at line 91 of file bvh/split.h.
Referenced by get_prim_bounds(), get_unaligned_point(), and split().
int BVHSpatialSplit::dim |
Definition at line 64 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 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().
|
protected |
Definition at line 89 of file bvh/split.h.
Referenced by BVHSpatialSplit(), and split().
float BVHSpatialSplit::sah |
Definition at line 63 of file bvh/split.h.
Referenced by BVHMixedSplit::BVHMixedSplit(), BVHSpatialSplit(), and BVHMixedSplit::split().
|
protected |
Definition at line 88 of file bvh/split.h.
Referenced by BVHSpatialSplit(), and split().
|
protected |
Definition at line 90 of file bvh/split.h.
Referenced by get_prim_bounds().