Blender  V3.3
Public Member Functions | Public Attributes | List of all members
LeafNode Struct Reference

#include <node.h>

Inheritance diagram for LeafNode:
BVHNode

Public Member Functions

 LeafNode (const BoundBox &bounds, uint visibility, int lo, int hi)
 
 LeafNode (const LeafNode &other)
 
bool is_leaf () const
 
int num_children () const
 
BVHNodeget_child (int) const
 
int num_triangles () const
 
void print (int depth) const
 
- Public Member Functions inherited from BVHNode
virtual ~BVHNode ()
 
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 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
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
 

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

Constructor & Destructor Documentation

◆ LeafNode() [1/2]

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

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

References BVHNode::bounds, and BVHNode::visibility.

◆ LeafNode() [2/2]

LeafNode::LeafNode ( const LeafNode other)
inline

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

Member Function Documentation

◆ get_child()

BVHNode* LeafNode::get_child ( int  ) const
inlinevirtual

Implements BVHNode.

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

References NULL.

◆ is_leaf()

bool LeafNode::is_leaf ( ) const
inlinevirtual

Implements BVHNode.

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

◆ num_children()

int LeafNode::num_children ( ) const
inlinevirtual

Implements BVHNode.

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

◆ num_triangles()

int LeafNode::num_triangles ( ) const
inlinevirtual

Reimplemented from BVHNode.

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

References hi, and lo.

Referenced by BVH2::pack_leaf().

◆ print()

void LeafNode::print ( int  depth) const
virtual

Implements BVHNode.

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

References hi, and lo.

Member Data Documentation

◆ edge_intersections

float LeafNode::edge_intersections[0]

Definition at line 157 of file octree.h.

◆ edge_parity

unsigned short LeafNode::edge_parity

Definition at line 144 of file octree.h.

◆ flood_fill

unsigned short LeafNode::flood_fill

Definition at line 155 of file octree.h.

◆ hi

int LeafNode::hi

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

Referenced by BVHBuild::create_leaf_node(), num_triangles(), BVH2::pack_leaf(), and print().

◆ in_process

unsigned short LeafNode::in_process

Definition at line 148 of file octree.h.

◆ lo

int LeafNode::lo

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

Referenced by BVHBuild::create_leaf_node(), num_triangles(), BVH2::pack_leaf(), and print().

◆ minimizer_index

int LeafNode::minimizer_index

Definition at line 153 of file octree.h.

◆ primary_edge_intersections

unsigned short LeafNode::primary_edge_intersections

Definition at line 145 of file octree.h.

◆ signs

char LeafNode::signs

Definition at line 151 of file octree.h.


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