38 const Transform *aligned_space =
nullptr);
72 const Transform *aligned_space =
nullptr);
104 const int prim_index,
105 const int segment_index,
112 const int prim_index,
187 const Transform *aligned_space =
nullptr)
189 if (aligned_space ==
nullptr) {
193 bounds = unaligned_heuristic->compute_aligned_boundbox(
194 range, &references.at(0), *aligned_space);
197 const float area =
bounds.safe_area();
203 builder, storage, range, references,
nodeSAH, unaligned_heuristic, aligned_space);
206 BoundBox overlap =
object.left_bounds;
211 *builder, storage, range, references,
nodeSAH, unaligned_heuristic, aligned_space);
228 if (!
left.size() || !right.
size()) {
229 object.split(
left, right, range);
bool range_within_max_leaf_size(const BVHRange &range, const vector< BVHReference > &references) const
float spatial_min_overlap
__forceinline void split(BVHBuild *builder, BVHRange &left, BVHRange &right, const BVHRange &range)
__forceinline BVHMixedSplit(BVHBuild *builder, BVHSpatialStorage *storage, const BVHRange &range, vector< BVHReference > &references, const int level, const BVHUnaligned *unaligned_heuristic=nullptr, const Transform *aligned_space=nullptr)
BVHSpatialStorage * storage_
vector< BVHReference > * references_
__forceinline BoundBox get_prim_bounds(const BVHReference &prim) const
void split(BVHRange &left, BVHRange &right, const BVHRange &range)
const Transform * aligned_space_
const BVHUnaligned * unaligned_heuristic_
__forceinline float primitive_cost(const int n) const
__forceinline float node_cost(const int n) const
__forceinline int size() const
__forceinline const BoundBox & bounds() const
__forceinline const BoundBox & bounds() const
const BVHUnaligned * unaligned_heuristic_
void split_curve_reference(const BVHReference &ref, const Hair *hair, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
__forceinline float3 get_unaligned_point(const float3 &point) const
__forceinline BoundBox get_prim_bounds(const BVHReference &prim) const
void split_reference(const BVHBuild &builder, BVHReference &left, BVHReference &right, const BVHReference &ref, const int dim, float pos)
void split_triangle_reference(const BVHReference &ref, const Mesh *mesh, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
BVHSpatialStorage * storage_
const Transform * aligned_space_
vector< BVHReference > * references_
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_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_object_reference(const Object *object, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
void split(BVHBuild *builder, BVHRange &left, BVHRange &right, const BVHRange &range)
void split_point_reference(const BVHReference &ref, const PointCloud *pointcloud, const int dim, const float pos, BoundBox &left_bounds, BoundBox &right_bounds)
#define CCL_NAMESPACE_END
__forceinline void intersect(const BoundBox &bbox)
__forceinline float safe_area() const