46 min = ccl::min(pt - shift,
min);
47 max = ccl::max(pt + shift,
max);
60 if (isfinite(pt.
x) && isfinite(pt.
y) && isfinite(pt.
z)) {
68 if (isfinite(pt.
x) && isfinite(pt.
y) && isfinite(pt.
z) && isfinite(border)) {
70 min = ccl::min(pt - shift,
min);
71 max = ccl::max(pt + shift,
max);
109 return (d.
x * d.
z + d.
y * d.
z + d.
x * d.
y);
114 return 0.5f * (
min +
max);
130 (isfinite(
min.x) && isfinite(
min.y) && isfinite(
min.z)) &&
131 (isfinite(
max.x) && isfinite(
max.y) && isfinite(
max.z));
144 for (
int i = 0;
i < 8;
i++) {
161 return fabsf(center_diff.
x) <= total_size.
x &&
fabsf(center_diff.
y) <= total_size.
y &&
162 fabsf(center_diff.
z) <= total_size.
z;
__forceinline BoundBox merge(const BoundBox &bbox, const float3 &pt)
__forceinline BoundBox intersect(const BoundBox &a, const BoundBox &b)
BoundBox2D clamp(const float mn=0.0f, const float mx=1.0f)
BoundBox2D make_relative_to(const BoundBox2D &other) const
BoundBox2D(const float2 radius)
BoundBox2D offset(const float2 offset) const
BoundBox2D operator*(float f) const
BoundBox2D subset(const BoundBox2D &other) const
bool operator==(const BoundBox2D &other) const
#define CCL_NAMESPACE_END
ccl_device_inline bool isfinite_safe(const float f)
__forceinline void grow(const BoundBox &bbox)
__forceinline void grow_safe(const float3 &pt, const float border)
__forceinline void grow(const float3 &pt, const float border)
__forceinline float half_area() const
__forceinline BoundBox(empty_t)
__forceinline void grow_safe(const BoundBox &bbox)
__forceinline BoundBox(const float3 &pt)
BoundBox transformed(const Transform *tfm) const
__forceinline BoundBox()=default
__forceinline bool valid() const
__forceinline float3 center() const
__forceinline BoundBox(const float3 &min_, const float3 &max_)
__forceinline float3 size() const
__forceinline void intersect(const BoundBox &bbox)
__forceinline void grow_safe(const float3 &pt)
__forceinline float safe_area() const
__forceinline bool intersects(const BoundBox &other)
__forceinline void grow(const float3 &pt)
__forceinline float area() const
__forceinline float3 center2() const