|
Blender V5.3
|
#include <node.h>
Inherited by InnerNode, and LeafNode.
Public Member Functions | |
| virtual | ~BVHNode ()=default |
| virtual bool | is_leaf () const =0 |
| virtual int | num_children () const =0 |
| virtual BVHNode * | get_child (const int i) const =0 |
| virtual int | num_triangles () const |
| virtual void | print (const int depth=0) const =0 |
| void | set_aligned_space (const Transform &aligned_space) |
| Transform | get_aligned_space () const |
| bool | has_unaligned () const |
| int | getSubtreeSize (BVH_STAT stat=BVH_STAT_NODE_COUNT) const |
| float | computeSubtreeSAHCost (const BVHParams &p, const float probability=1.0f) const |
| uint | update_visibility () |
| void | update_time () |
| void | dump_graph (const char *filename) |
Public Attributes | |
| BoundBox | bounds |
| uint | visibility = 0 |
| bool | is_unaligned = false |
| unique_ptr< Transform > | aligned_space |
| float | time_from = 0.0f |
| float | time_to = 1.0f |
Protected Member Functions | |
| BVHNode (const BoundBox &bounds) | |
| BVHNode (const BVHNode &other) | |
Definition at line 33 of file bvh/node.h.
|
virtualdefault |
|
inlineexplicitprotected |
Definition at line 102 of file bvh/node.h.
References bounds.
Referenced by BVHNode(), computeSubtreeSAHCost(), get_child(), InnerNode::get_child(), LeafNode::get_child(), InnerNode::InnerNode(), InnerNode::InnerNode(), LeafNode::LeafNode(), update_time(), and update_visibility().
|
inlineexplicitprotected |
Definition at line 104 of file bvh/node.h.
References aligned_space, bounds, BVHNode(), is_unaligned, time_from, time_to, and visibility.
Definition at line 95 of file bvh/node.cpp.
References bounds, BVHNode(), computeSubtreeSAHCost(), BVHParams::cost(), get_child(), num_children(), num_triangles(), and BoundBox::safe_area().
Referenced by computeSubtreeSAHCost().
| void BVHNode::dump_graph | ( | const char * | filename | ) |
Definition at line 170 of file bvh/node.cpp.
|
inline |
Definition at line 57 of file bvh/node.h.
References aligned_space, and transform_identity().
Referenced by BVH2::pack_unaligned_inner().
|
pure virtual |
Implemented in InnerNode, and LeafNode.
References BVHNode().
Referenced by computeSubtreeSAHCost(), getSubtreeSize(), and has_unaligned().
| CCL_NAMESPACE_BEGIN int BVHNode::getSubtreeSize | ( | BVH_STAT | stat = BVH_STAT_NODE_COUNT | ) | const |
Definition at line 17 of file bvh/node.cpp.
References assert, BVH_STAT_ALIGNED_COUNT, BVH_STAT_ALIGNED_INNER_COUNT, BVH_STAT_ALIGNED_LEAF_COUNT, BVH_STAT_CHILDNODE_COUNT, BVH_STAT_DEPTH, BVH_STAT_INNER_COUNT, BVH_STAT_LEAF_COUNT, BVH_STAT_NODE_COUNT, BVH_STAT_TRIANGLE_COUNT, BVH_STAT_UNALIGNED_COUNT, BVH_STAT_UNALIGNED_INNER_COUNT, BVH_STAT_UNALIGNED_LEAF_COUNT, get_child(), getSubtreeSize(), has_unaligned(), is_leaf(), is_unaligned, max, num_children(), and num_triangles().
Referenced by getSubtreeSize(), and BVH2::pack_nodes().
|
inline |
Definition at line 65 of file bvh/node.h.
References get_child(), is_leaf(), is_unaligned, and num_children().
Referenced by getSubtreeSize(), and BVH2::pack_nodes().
|
pure virtual |
Implemented in InnerNode, and LeafNode.
Referenced by BVHStackEntry::encodeIdx(), getSubtreeSize(), has_unaligned(), BVH2::pack_nodes(), update_time(), and update_visibility().
|
pure virtual |
Implemented in InnerNode, and LeafNode.
Referenced by computeSubtreeSAHCost(), getSubtreeSize(), and has_unaligned().
|
inlinevirtual |
Reimplemented in LeafNode.
Definition at line 40 of file bvh/node.h.
Referenced by computeSubtreeSAHCost(), and getSubtreeSize().
|
pure virtual |
|
inline |
Definition at line 46 of file bvh/node.h.
References aligned_space, and is_unaligned.
| void BVHNode::update_time | ( | ) |
Definition at line 121 of file bvh/node.cpp.
References BVHNode(), InnerNode::children, is_leaf(), max, min, time_from, time_to, and update_time().
Referenced by update_time().
| uint BVHNode::update_visibility | ( | ) |
Definition at line 108 of file bvh/node.cpp.
References BVHNode(), InnerNode::children, is_leaf(), update_visibility(), and visibility.
Referenced by update_visibility().
| unique_ptr<Transform> BVHNode::aligned_space |
Definition at line 97 of file bvh/node.h.
Referenced by BVHNode(), get_aligned_space(), and set_aligned_space().
| BoundBox BVHNode::bounds |
Definition at line 89 of file bvh/node.h.
Referenced by BVHNode(), BVHNode(), computeSubtreeSAHCost(), InnerNode::InnerNode(), InnerNode::InnerNode(), LeafNode::LeafNode(), BVH2::pack_aligned_inner(), BVH2::pack_unaligned_inner(), and BVHBuild::rotate().
| bool BVHNode::is_unaligned = false |
Definition at line 92 of file bvh/node.h.
Referenced by BVHNode(), getSubtreeSize(), has_unaligned(), BVH2::pack_inner(), and set_aligned_space().
| float BVHNode::time_from = 0.0f |
Definition at line 99 of file bvh/node.h.
Referenced by BVHNode(), and update_time().
| float BVHNode::time_to = 1.0f |
Definition at line 99 of file bvh/node.h.
Referenced by BVHNode(), and update_time().
| uint BVHNode::visibility = 0 |
Definition at line 90 of file bvh/node.h.
Referenced by BVHNode(), InnerNode::InnerNode(), InnerNode::InnerNode(), LeafNode::LeafNode(), BVH2::pack_aligned_inner(), BVH2::pack_leaf(), BVH2::pack_unaligned_inner(), and update_visibility().