47 float cb = rb_bounds.min[
dim] + rb_bounds.max[
dim];
96 int start = job_start, end = job_end;
97 bool have_work = (start < end);
99 const int count = job_end - job_start;
110 int left = start, right = end;
111 int center = (
left + right) >> 1;
135 }
while (
left <= right);
169 const int count = end - start;
static DBVT_INLINE btDbvtNode * sort(btDbvtNode *n, btDbvtNode *&r)
__forceinline int prim_type() const
__forceinline int prim_object() const
__forceinline const BoundBox & bounds() const
__forceinline int prim_index() const
#define CCL_NAMESPACE_END
void bvh_reference_sort(int start, int end, BVHReference *data, int dim, const BVHUnaligned *unaligned_heuristic, const Transform *aligned_space)
static CCL_NAMESPACE_BEGIN const int BVH_SORT_THRESHOLD
static void bvh_reference_sort_threaded(TaskPool *task_pool, BVHReference *data, const int job_start, const int job_end, const BVHReferenceCompare &compare)
const Transform * aligned_space
const BVHUnaligned * unaligned_heuristic
__forceinline BoundBox get_prim_bounds(const BVHReference &prim) const
__forceinline int compare(const BVHReference &ra, const BVHReference &rb) const
bool operator()(const BVHReference &ra, const BVHReference &rb)
BVHReferenceCompare(int dim, const BVHUnaligned *unaligned_heuristic, const Transform *aligned_space)