Blender  V3.3
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
BVHNode Class Referenceabstract

#include <node.h>

Inheritance diagram for BVHNode:
InnerNode 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 63 of file BLI_kdopbvh.c.

Constructor & Destructor Documentation

◆ ~BVHNode()

virtual BVHNode::~BVHNode ( )
inlinevirtual

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

References aligned_space.

◆ BVHNode() [1/2]

BVHNode::BVHNode ( const BoundBox bounds)
inlineexplicitprotected

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

◆ BVHNode() [2/2]

BVHNode::BVHNode ( const BVHNode other)
inlineexplicitprotected

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

References aligned_space, is_unaligned, and NULL.

Member Function Documentation

◆ computeSubtreeSAHCost()

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

◆ deleteSubtree()

void BVHNode::deleteSubtree ( )

Definition at line 92 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 174 of file bvh/node.cpp.

References blender::compositor::context, and NULL.

◆ get_aligned_space()

Transform BVHNode::get_aligned_space ( ) const
inline

Definition at line 57 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()

CCL_NAMESPACE_BEGIN int BVHNode::getSubtreeSize ( BVH_STAT  stat = BVH_STAT_NODE_COUNT) const

◆ has_unaligned()

bool BVHNode::has_unaligned ( ) const
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().

◆ 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 40 of file bvh/node.h.

Referenced by computeSubtreeSAHCost(), and getSubtreeSize().

◆ print()

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

Implemented in LeafNode, and InnerNode.

Referenced by InnerNode::print().

◆ 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, is_unaligned, and NULL.

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

◆ update_time()

void BVHNode::update_time ( )

Definition at line 127 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 114 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 98 of file bvh/node.h.

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

◆ bounds

BoundBox BVHNode::bounds

◆ bv

float* BVHNode::bv

◆ children

struct BVHNode** BVHNode::children

◆ index

int BVHNode::index

◆ is_unaligned

bool BVHNode::is_unaligned

◆ main_axis

char BVHNode::main_axis

◆ node_num

char BVHNode::node_num

◆ parent

struct BVHNode* BVHNode::parent

◆ time_from

float BVHNode::time_from

◆ time_to

float BVHNode::time_to

◆ visibility

uint BVHNode::visibility

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