Blender V5.0
BVHNode Class Referenceabstract

#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 BVHNodeget_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

BVHNode ** children
BVHNodeparent
floatbv
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

Protected Member Functions

 BVHNode (const BoundBox &bounds)
 BVHNode (const BVHNode &other)

Detailed Description

Definition at line 65 of file BLI_kdopbvh.cc.

Constructor & Destructor Documentation

◆ ~BVHNode()

virtual BVHNode::~BVHNode ( )
virtualdefault

◆ BVHNode() [1/2]

BVHNode::BVHNode ( const BoundBox & bounds)
inlineexplicitprotected

◆ BVHNode() [2/2]

BVHNode::BVHNode ( const BVHNode & other)
inlineexplicitprotected

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

References aligned_space, bounds, BVHNode(), is_unaligned, time_from, time_to, and visibility.

Member Function Documentation

◆ computeSubtreeSAHCost()

float BVHNode::computeSubtreeSAHCost ( const BVHParams & p,
const float probability = 1.0f ) const

◆ dump_graph()

void BVHNode::dump_graph ( const char * filename)

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

◆ get_aligned_space()

Transform BVHNode::get_aligned_space ( ) const
inline

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

References aligned_space, and transform_identity().

Referenced by BVH2::pack_unaligned_inner().

◆ get_child()

virtual BVHNode * BVHNode::get_child ( const int i) const
pure virtual

Implemented in InnerNode, and LeafNode.

References BVHNode(), and i.

Referenced by computeSubtreeSAHCost(), getSubtreeSize(), and has_unaligned().

◆ getSubtreeSize()

◆ has_unaligned()

bool BVHNode::has_unaligned ( ) const
inline

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

References get_child(), i, is_leaf(), is_unaligned, and num_children().

Referenced by getSubtreeSize(), and BVH2::pack_nodes().

◆ is_leaf()

virtual bool BVHNode::is_leaf ( ) const
pure virtual

◆ num_children()

virtual int BVHNode::num_children ( ) const
pure virtual

Implemented in InnerNode, and LeafNode.

Referenced by computeSubtreeSAHCost(), getSubtreeSize(), and has_unaligned().

◆ num_triangles()

virtual int BVHNode::num_triangles ( ) const
inlinevirtual

Reimplemented in LeafNode.

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

Referenced by computeSubtreeSAHCost(), and getSubtreeSize().

◆ print()

virtual void BVHNode::print ( const int depth = 0) const
pure virtual

Implemented in InnerNode, and LeafNode.

◆ set_aligned_space()

void BVHNode::set_aligned_space ( const Transform & aligned_space)
inline

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

References aligned_space, and is_unaligned.

◆ update_time()

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().

◆ update_visibility()

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().

Member Data Documentation

◆ aligned_space

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().

◆ bounds

◆ bv

◆ children

◆ index

◆ is_unaligned

bool BVHNode::is_unaligned = false

◆ main_axis

◆ node_num

◆ parent

BVHNode* BVHNode::parent

◆ time_from

float BVHNode::time_from = 0.0f

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

Referenced by BVHNode(), and update_time().

◆ time_to

float BVHNode::time_to = 1.0f

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

Referenced by BVHNode(), and update_time().

◆ visibility


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