44 virtual void print(
const int depth = 0)
const = 0;
49 if (this->aligned_space ==
nullptr) {
113 assert(other.is_unaligned);
114 aligned_space = make_unique<Transform>(*other.aligned_space);
117 assert(!other.is_unaligned);
129 if (child0 && child1) {
130 visibility = child0->visibility | child1->visibility;
163 void print(
const int depth)
const override;
196 void print(
const int depth)
const override;
@ BVH_STAT_TRIANGLE_COUNT
@ BVH_STAT_CHILDNODE_COUNT
@ BVH_STAT_ALIGNED_INNER_COUNT
@ BVH_STAT_ALIGNED_LEAF_COUNT
@ BVH_STAT_UNALIGNED_COUNT
@ BVH_STAT_UNALIGNED_LEAF_COUNT
@ BVH_STAT_UNALIGNED_INNER_COUNT
void print(const int depth) const override
InnerNode(const BoundBox &bounds)
InnerNode(const BoundBox &bounds, unique_ptr< BVHNode > &&child0, unique_ptr< BVHNode > &&child1)
bool is_leaf() const override
static constexpr int kNumMaxChildren
int num_children() const override
unique_ptr< BVHNode > children[kNumMaxChildren]
BVHNode * get_child(const int i) const override
bool is_leaf() const override
int num_triangles() const override
BVHNode * get_child(int) const override
int num_children() const override
void print(const int depth) const override
LeafNode(const LeafNode &other)=default
LeafNode(const BoundBox &bounds, const uint visibility, const int lo, const int hi)
#define CCL_NAMESPACE_END
#define assert(assertion)
float computeSubtreeSAHCost(const BVHParams &p, const float probability=1.0f) const
int getSubtreeSize(BVH_STAT stat=BVH_STAT_NODE_COUNT) const
virtual int num_children() const =0
unique_ptr< Transform > aligned_space
virtual ~BVHNode()=default
BVHNode(const BoundBox &bounds)
virtual bool is_leaf() const =0
void set_aligned_space(const Transform &aligned_space)
bool has_unaligned() const
virtual int num_triangles() const
virtual BVHNode * get_child(const int i) const =0
virtual void print(const int depth=0) const =0
Transform get_aligned_space() const
BVHNode(const BVHNode &other)
void dump_graph(const char *filename)