Blender V4.3
BVHNode Class Referenceabstract

#include <node.h>

Inherited by InnerNode, and LeafNode.

Public Member Functions

virtual ~BVHNode ()
 
virtual bool is_leaf () const =0
 
virtual int num_children () const =0
 
virtual BVHNodeget_child (int i) const =0
 
virtual int num_triangles () const
 
virtual void print (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, float probability=1.0f) const
 
void deleteSubtree ()
 
uint update_visibility ()
 
void update_time ()
 
void dump_graph (const char *filename)
 

Public Attributes

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
 

Protected Member Functions

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

Detailed Description

Definition at line 64 of file BLI_kdopbvh.c.

Constructor & Destructor Documentation

◆ ~BVHNode()

virtual BVHNode::~BVHNode ( )
inlinevirtual

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

References aligned_space.

◆ BVHNode() [1/2]

BVHNode::BVHNode ( const BoundBox & bounds)
inlineexplicitprotected

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

◆ BVHNode() [2/2]

BVHNode::BVHNode ( const BVHNode & other)
inlineexplicitprotected

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

References aligned_space, and NULL.

Member Function Documentation

◆ computeSubtreeSAHCost()

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

◆ deleteSubtree()

void BVHNode::deleteSubtree ( )

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

References deleteSubtree(), get_child(), and num_children().

Referenced by BVH2::build(), deleteSubtree(), and BVHBuild::run().

◆ dump_graph()

void BVHNode::dump_graph ( const char * filename)

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

References NULL.

◆ get_aligned_space()

Transform BVHNode::get_aligned_space ( ) const
inline

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

References aligned_space, NULL, and transform_identity().

Referenced by BVH2::pack_unaligned_inner().

◆ get_child()

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

◆ getSubtreeSize()

◆ has_unaligned()

bool BVHNode::has_unaligned ( ) const
inline

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

References get_child(), 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

◆ num_triangles()

virtual int BVHNode::num_triangles ( ) const
inlinevirtual

Reimplemented in LeafNode.

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

Referenced by computeSubtreeSAHCost(), and getSubtreeSize().

◆ print()

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

Implemented in InnerNode, and LeafNode.

Referenced by InnerNode::print().

◆ set_aligned_space()

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

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

References aligned_space, is_unaligned, and NULL.

Referenced by BVHBuild::build_node(), BVHBuild::build_node(), and BVHBuild::create_leaf_node().

◆ update_time()

void BVHNode::update_time ( )

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

References InnerNode::children, is_leaf(), max, min, time_from, time_to, and update_time().

Referenced by BVHBuild::run(), and update_time().

◆ update_visibility()

uint BVHNode::update_visibility ( )

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

References InnerNode::children, is_leaf(), update_visibility(), and visibility.

Referenced by BVHBuild::run(), and update_visibility().

Member Data Documentation

◆ aligned_space

Transform* BVHNode::aligned_space

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

Referenced by BVHNode(), get_aligned_space(), set_aligned_space(), and ~BVHNode().

◆ bounds

◆ bv

◆ children

◆ index

◆ is_unaligned

bool BVHNode::is_unaligned

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

Referenced by getSubtreeSize(), has_unaligned(), BVH2::pack_inner(), and set_aligned_space().

◆ main_axis

char BVHNode::main_axis

◆ node_num

◆ parent

struct BVHNode* BVHNode::parent

◆ time_from

◆ time_to

◆ visibility


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