Blender V5.0
LeafNode Struct Reference

#include <node.h>

Inherits BVHNode.

Public Member Functions

 LeafNode (const BoundBox &bounds, const uint visibility, const int lo, const int hi)
 LeafNode (const LeafNode &other)=default
bool is_leaf () const override
int num_children () const override
BVHNodeget_child (int) const override
int num_triangles () const override
void print (const int depth) const override
Public Member Functions inherited from BVHNode
virtual ~BVHNode ()=default
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 lo
int hi
unsigned short edge_parity: 12
unsigned short primary_edge_intersections: 3
unsigned short in_process: 1
char signs
int minimizer_index
unsigned short flood_fill
float edge_intersections [0]
Public Attributes inherited from BVHNode
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

Additional Inherited Members

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

Detailed Description

Bits order

Leaf node: Byte 0,1(0-11): edge parity Byte 1(4,5,6): mask of primary edges intersections stored Byte 1(7): in flood fill mode, whether the cell is in process Byte 2(0-8): signs Byte 3,4: in coloring mode, the mask for edges Byte 5: edge intersections(4 bytes per inter, or 12 bytes if USE_HERMIT)

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

Constructor & Destructor Documentation

◆ LeafNode() [1/2]

LeafNode::LeafNode ( const BoundBox & bounds,
const uint visibility,
const int lo,
const int hi )
inline

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

References BVHNode::bounds, BVHNode::BVHNode(), hi, lo, and BVHNode::visibility.

Referenced by LeafNode().

◆ LeafNode() [2/2]

LeafNode::LeafNode ( const LeafNode & other)
default

References LeafNode().

Member Function Documentation

◆ get_child()

BVHNode * LeafNode::get_child ( int ) const
inlineoverridevirtual

Implements BVHNode.

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

References BVHNode::BVHNode().

◆ is_leaf()

bool LeafNode::is_leaf ( ) const
inlineoverridevirtual

Implements BVHNode.

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

◆ num_children()

int LeafNode::num_children ( ) const
inlineoverridevirtual

Implements BVHNode.

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

◆ num_triangles()

int LeafNode::num_triangles ( ) const
inlineoverridevirtual

Reimplemented from BVHNode.

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

References hi, and lo.

Referenced by BVH2::pack_leaf().

◆ print()

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

Implements BVHNode.

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

References hi, i, lo, and printf.

Member Data Documentation

◆ edge_intersections

float LeafNode::edge_intersections[0]

Definition at line 157 of file dualcon/intern/octree.h.

◆ edge_parity

unsigned short LeafNode::edge_parity

Definition at line 144 of file dualcon/intern/octree.h.

◆ flood_fill

unsigned short LeafNode::flood_fill

Definition at line 155 of file dualcon/intern/octree.h.

◆ hi

int LeafNode::hi

◆ in_process

unsigned short LeafNode::in_process

Definition at line 148 of file dualcon/intern/octree.h.

◆ lo

int LeafNode::lo

◆ minimizer_index

int LeafNode::minimizer_index

Definition at line 153 of file dualcon/intern/octree.h.

◆ primary_edge_intersections

unsigned short LeafNode::primary_edge_intersections

Definition at line 145 of file dualcon/intern/octree.h.

◆ signs

char LeafNode::signs

Definition at line 151 of file dualcon/intern/octree.h.


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