Blender  V3.3
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
InnerNode Class Reference

#include <node.h>

Inheritance diagram for InnerNode:
BVHNode

Public Member Functions

 InnerNode (const BoundBox &bounds, BVHNode *child0, BVHNode *child1)
 
 InnerNode (const BoundBox &bounds, BVHNode **children, const int num_children)
 
 InnerNode (const BoundBox &bounds)
 
bool is_leaf () const
 
int num_children () const
 
BVHNodeget_child (int i) const
 
void print (int depth) const
 
- Public Member Functions inherited from BVHNode
virtual ~BVHNode ()
 
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, float probability=1.0f) const
 
void deleteSubtree ()
 
uint update_visibility ()
 
void update_time ()
 
void dump_graph (const char *filename)
 

Public Attributes

int num_children_
 
BVHNodechildren [kNumMaxChildren]
 
- Public Attributes inherited from BVHNode
struct BVHNode ** children
 
struct BVHNodeparent
 
floatbv
 
int index
 
char node_num
 
char main_axis
 
BoundBox bounds
 
uint visibility
 
bool is_unaligned
 
Transformaligned_space
 
float time_from
 
float time_to
 

Static Public Attributes

static constexpr int kNumMaxChildren = 8
 

Protected Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

◆ InnerNode() [1/3]

InnerNode::InnerNode ( const BoundBox bounds,
BVHNode child0,
BVHNode child1 
)
inline

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

References children, reset_unused_children(), and BVHNode::visibility.

◆ InnerNode() [2/3]

InnerNode::InnerNode ( const BoundBox bounds,
BVHNode **  children,
const int  num_children 
)
inline

◆ InnerNode() [3/3]

InnerNode::InnerNode ( const BoundBox bounds)
inlineexplicit

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

References num_children_, reset_unused_children(), and BVHNode::visibility.

Member Function Documentation

◆ get_child()

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

Implements BVHNode.

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

References children, and num_children_.

◆ is_leaf()

bool InnerNode::is_leaf ( ) const
inlinevirtual

Implements BVHNode.

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

◆ num_children()

int InnerNode::num_children ( ) const
inlinevirtual

Implements BVHNode.

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

References num_children_.

Referenced by InnerNode().

◆ print()

void InnerNode::print ( int  depth) const
virtual

Implements BVHNode.

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

References children, and BVHNode::print().

◆ reset_unused_children()

void InnerNode::reset_unused_children ( )
inlineprotected

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

References children, kNumMaxChildren, NULL, and num_children_.

Referenced by InnerNode().

Member Data Documentation

◆ children

BVHNode* InnerNode::children[kNumMaxChildren]

◆ kNumMaxChildren

constexpr int InnerNode::kNumMaxChildren = 8
staticconstexpr

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

Referenced by reset_unused_children().

◆ num_children_

int InnerNode::num_children_

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

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


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