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());
62 const Hair::Curve &curve = hair->get_curve(curve_index);
63 const int key = curve.
first_key + segment;
64 const float3 v1 = hair->get_curve_keys()[key],
v2 = hair->get_curve_keys()[key + 1];
87 const Hair *hair =
static_cast<const Hair *
>(
object->get_geometry());
88 const Hair::Curve &curve = hair->get_curve(curve_index);
90 segment, &hair->get_curve_keys()[0], &hair->get_curve_radius()[0], aligned_space,
bounds);
104 if (cent_bounds !=
NULL) {
107 for (
int i = range.start(); i < range.end(); ++i) {
111 if (cent_bounds !=
NULL) {
124 if (cent_bounds !=
NULL) {
127 for (
int i = range.start(); i < range.end(); ++i) {
131 if (cent_bounds !=
NULL) {
143 space.y.w -=
bounds.min.y;
144 space.z.w -=
bounds.min.z;
147 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
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
SIMD_FORCE_INLINE btScalar length() const
Return the length of the vector.
__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
BoundBox compute_aligned_boundbox(const BVHObjectBinning &range, const BVHReference *references, const Transform &aligned_space, BoundBox *cent_bounds=NULL) const
const vector< Object * > & objects_
BoundBox compute_aligned_prim_boundbox(const BVHReference &prim, const Transform &aligned_space) const
static Transform compute_node_transform(const BoundBox &bounds, const Transform &aligned_space)
#define CCL_NAMESPACE_END
#define PRIMITIVE_UNPACK_SEGMENT(type)
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