23 for (
int i = range.
start(); i < range.
end(); ++i) {
39 for (
int i = range.
start(); i < range.
end(); ++i) {
61 const Hair *hair =
static_cast<const Hair *
>(
object->get_geometry());
63 const int key = curve.
first_key + segment;
65 const float3 v1 = curve_keys[key];
66 const float3 v2 = curve_keys[key + 1];
89 const Hair *hair =
static_cast<const Hair *
>(
object->get_geometry());
105 if (cent_bounds !=
nullptr) {
108 for (
int i = range.
start(); i < range.
end(); ++i) {
111 bounds.
grow(ref_bounds);
112 if (cent_bounds !=
nullptr) {
125 if (cent_bounds !=
nullptr) {
128 for (
int i = range.
start(); i < range.
end(); ++i) {
131 bounds.
grow(ref_bounds);
132 if (cent_bounds !=
nullptr) {
143 space.
x.
w -= bounds.
min.
x;
144 space.
y.
w -= bounds.
min.
y;
145 space.
z.
w -= bounds.
min.
z;
148 1.0f /
max(1e-18f, dim.
x), 1.0f /
max(1e-18f, dim.
y), 1.0f /
max(1e-18f, dim.
z)) *
__forceinline int start() const
__forceinline int end() const
__forceinline int prim_type() const
__forceinline int prim_object() const
__forceinline const BoundBox & bounds() const
__forceinline int prim_index() const
BVHUnaligned(const vector< Object * > &objects)
Transform compute_aligned_space(const BVHObjectBinning &range, const BVHReference *references) const
const vector< Object * > & objects_
BoundBox compute_aligned_prim_boundbox(const BVHReference &prim, const Transform &aligned_space) const
BoundBox compute_aligned_boundbox(const BVHObjectBinning &range, const BVHReference *references, const Transform &aligned_space, BoundBox *cent_bounds=nullptr) const
static Transform compute_node_transform(const BoundBox &bounds, const Transform &aligned_space)
BoundBox transformed(const Transform *tfm) const
__forceinline void grow(const float3 &pt)
__forceinline float3 center2() const
const packed_float3 * get_position() const
const float * get_radius() const
Curve get_curve(const size_t i) const
#define PRIMITIVE_UNPACK_SEGMENT(type)
#define CCL_NAMESPACE_END
float length(VecOp< float, D >) RET
ccl_device_inline float2 normalize_len(const float2 a, ccl_private float *t)
void bounds_grow(const int k, const packed_float3 *curve_keys, const float *curve_radius, BoundBox &bounds) const