Blender V4.5
InnerNode Class Reference

#include <node.h>

Inherits BVHNode.

Public Member Functions

 InnerNode (const BoundBox &bounds, unique_ptr< BVHNode > &&child0, unique_ptr< BVHNode > &&child1)
 
 InnerNode (const BoundBox &bounds)
 
bool is_leaf () const override
 
int num_children () const override
 
BVHNodeget_child (const int i) const override
 
void print (const int depth) const override
 
- Public Member Functions inherited from BVHNode
virtual ~BVHNode ()=default
 
virtual int num_triangles () const
 
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

int num_children_
 
unique_ptr< BVHNodechildren [kNumMaxChildren]
 
- Public Attributes inherited from BVHNode
BVHNode ** children
 
BVHNodeparent
 
float * bv
 
int index
 
char node_num
 
char main_axis
 
BoundBox bounds
 
uint visibility = 0
 
bool is_unaligned = false
 
unique_ptr< Transformaligned_space
 
float time_from = 0.0f
 
float time_to = 1.0f
 

Static Public Attributes

static constexpr int kNumMaxChildren = 8
 

Additional Inherited Members

- Protected Member Functions inherited from BVHNode
 BVHNode (const BoundBox &bounds)
 
 BVHNode (const BVHNode &other)
 

Detailed Description

Definition at line 122 of file bvh/node.h.

Constructor & Destructor Documentation

◆ InnerNode() [1/2]

InnerNode::InnerNode ( const BoundBox & bounds,
unique_ptr< BVHNode > && child0,
unique_ptr< BVHNode > && child1 )
inline

Definition at line 126 of file bvh/node.h.

References children, and BVHNode::visibility.

◆ InnerNode() [2/2]

InnerNode::InnerNode ( const BoundBox & bounds)
inlineexplicit

Definition at line 144 of file bvh/node.h.

References num_children_, and BVHNode::visibility.

Member Function Documentation

◆ get_child()

BVHNode * InnerNode::get_child ( const int i) const
inlineoverridevirtual

Implements BVHNode.

Definition at line 158 of file bvh/node.h.

References assert, children, and num_children_.

◆ is_leaf()

bool InnerNode::is_leaf ( ) const
inlineoverridevirtual

Implements BVHNode.

Definition at line 150 of file bvh/node.h.

◆ num_children()

int InnerNode::num_children ( ) const
inlineoverridevirtual

Implements BVHNode.

Definition at line 154 of file bvh/node.h.

References num_children_.

◆ print()

void InnerNode::print ( const int depth) const
overridevirtual

Implements BVHNode.

Definition at line 186 of file bvh/node.cpp.

References children, and printf.

Member Data Documentation

◆ children

◆ kNumMaxChildren

int InnerNode::kNumMaxChildren = 8
staticconstexpr

Definition at line 124 of file bvh/node.h.

◆ num_children_

int InnerNode::num_children_

Definition at line 165 of file bvh/node.h.

Referenced by get_child(), InnerNode(), and num_children().


The documentation for this class was generated from the following files: