5#ifndef __UTIL_BOUNDBOX_H__
6#define __UTIL_BOUNDBOX_H__
47 min = ccl::min(pt - shift,
min);
48 max = ccl::max(pt + shift,
max);
61 if (isfinite(pt.
x) && isfinite(pt.
y) && isfinite(pt.
z)) {
69 if (isfinite(pt.
x) && isfinite(pt.
y) && isfinite(pt.
z) && isfinite(border)) {
71 min = ccl::min(pt - shift,
min);
72 max = ccl::max(pt + shift,
max);
110 return (d.
x * d.
z + d.
y * d.
z + d.
x * d.
y);
115 return 0.5f * (
min +
max);
131 (isfinite(
min.x) && isfinite(
min.y) && isfinite(
min.z)) &&
132 (isfinite(
max.x) && isfinite(
max.y) && isfinite(
max.z));
139 for (
int i = 0; i < 8; i++) {
155 return fabsf(center_diff.
x) <= total_size.
x &&
fabsf(center_diff.
y) <= total_size.y &&
156 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(float mn=0.0f, float mx=1.0f)
BoundBox2D make_relative_to(const BoundBox2D &other) const
BoundBox2D operator*(float f) const
BoundBox2D subset(const BoundBox2D &other) const
bool operator==(const BoundBox2D &other) const
local_group_size(16, 16) .push_constant(Type b
#define CCL_NAMESPACE_END
__forceinline void grow(const BoundBox &bbox)
__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 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 void grow(const float3 &pt, float border)
__forceinline void grow_safe(const float3 &pt, float border)
__forceinline float3 center2() const
ccl_device_inline bool isfinite_safe(float f)