61 const Hair *hair =
static_cast<const Hair *
>(
object->get_geometry());
63 const int key = curve.
first_key + segment;
64 const float3 v1 = hair->get_curve_keys()[key];
65 const float3 v2 = hair->get_curve_keys()[key + 1];
88 const Hair *hair =
static_cast<const Hair *
>(
object->get_geometry());
91 hair->get_curve_keys().data(),
92 hair->get_curve_radius().data(),
108 if (cent_bounds !=
nullptr) {
111 for (
int i = range.
start();
i < range.
end(); ++
i) {
114 bounds.
grow(ref_bounds);
115 if (cent_bounds !=
nullptr) {
128 if (cent_bounds !=
nullptr) {
131 for (
int i = range.
start();
i < range.
end(); ++
i) {
134 bounds.
grow(ref_bounds);
135 if (cent_bounds !=
nullptr) {
146 space.
x.w -= bounds.
min.
x;
147 space.
y.w -= bounds.
min.
y;
148 space.
z.w -= bounds.
min.
z;
151 1.0f /
max(1e-18f, dim.
x), 1.0f /
max(1e-18f, dim.
y), 1.0f /
max(1e-18f, dim.
z)) *
ATTR_WARN_UNUSED_RESULT const BMVert * v2
__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)
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)
BoundBox transformed(const Transform *tfm) const
__forceinline void grow(const float3 &pt)
__forceinline float3 center2() const
void bounds_grow(const int k, const float3 *curve_keys, const float *curve_radius, BoundBox &bounds) const