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

#include <octree.h>

Public Member Functions

int is_child_leaf (int index) const
 
int has_child (int index) const
 
Nodeget_child (int count)
 
const Nodeget_child (int count) const
 
int get_num_children () const
 
int get_child_count (int index) const
 
int get_child_index (int count)
 
const int * get_child_counts () const
 
void fill_children (Node *children[8], int leaf[8])
 
void set_child (int count, Node *chd)
 
void set_internal_child (int index, int count, InternalNode *chd)
 
void set_leaf_child (int index, int count, LeafNode *chd)
 

Public Attributes

unsigned char has_child_bitfield
 
unsigned char child_is_leaf_bitfield
 
Nodechildren [0]
 

Static Public Attributes

static int numChildrenTable [256]
 
static int childrenCountTable [256][8]
 
static int childrenIndexTable [256][8]
 

Detailed Description

Definition at line 40 of file octree.h.

Member Function Documentation

◆ fill_children()

void InternalNode::fill_children ( Node children[8],
int  leaf[8] 
)
inline

Get all children

Definition at line 98 of file octree.h.

References children, count, get_child(), has_child(), is_child_leaf(), and NULL.

◆ get_child() [1/2]

Node* InternalNode::get_child ( int  count)
inline

Get the pointer to child index

Definition at line 67 of file octree.h.

References children, and count.

Referenced by fill_children().

◆ get_child() [2/2]

const Node* InternalNode::get_child ( int  count) const
inline

Definition at line 72 of file octree.h.

References children, and count.

◆ get_child_count()

int InternalNode::get_child_count ( int  index) const
inline

Get the count of children

Definition at line 84 of file octree.h.

References childrenCountTable, and has_child_bitfield.

◆ get_child_counts()

const int* InternalNode::get_child_counts ( ) const
inline

Definition at line 92 of file octree.h.

References childrenCountTable, and has_child_bitfield.

◆ get_child_index()

int InternalNode::get_child_index ( int  count)
inline

Definition at line 88 of file octree.h.

References childrenIndexTable, count, and has_child_bitfield.

◆ get_num_children()

int InternalNode::get_num_children ( ) const
inline

Get total number of children

Definition at line 78 of file octree.h.

References has_child_bitfield, and numChildrenTable.

◆ has_child()

int InternalNode::has_child ( int  index) const
inline

If child index exists

Definition at line 61 of file octree.h.

References has_child_bitfield.

Referenced by fill_children().

◆ is_child_leaf()

int InternalNode::is_child_leaf ( int  index) const
inline

Test if child is leaf

Definition at line 55 of file octree.h.

References child_is_leaf_bitfield.

Referenced by fill_children().

◆ set_child()

void InternalNode::set_child ( int  count,
Node chd 
)
inline

Sets the child pointer

Definition at line 115 of file octree.h.

References children, and count.

Referenced by set_internal_child(), and set_leaf_child().

◆ set_internal_child()

void InternalNode::set_internal_child ( int  index,
int  count,
InternalNode chd 
)
inline

Definition at line 119 of file octree.h.

References count, has_child_bitfield, and set_child().

◆ set_leaf_child()

void InternalNode::set_leaf_child ( int  index,
int  count,
LeafNode chd 
)
inline

Definition at line 124 of file octree.h.

References child_is_leaf_bitfield, count, has_child_bitfield, and set_child().

Member Data Documentation

◆ child_is_leaf_bitfield

unsigned char InternalNode::child_is_leaf_bitfield

Definition at line 49 of file octree.h.

Referenced by is_child_leaf(), and set_leaf_child().

◆ children

Node* InternalNode::children[0]

Definition at line 52 of file octree.h.

Referenced by fill_children(), get_child(), and set_child().

◆ childrenCountTable

int InternalNode::childrenCountTable
static

Definition at line 43 of file octree.h.

Referenced by get_child_count(), and get_child_counts().

◆ childrenIndexTable

int InternalNode::childrenIndexTable
static

Definition at line 44 of file octree.h.

Referenced by get_child_index().

◆ has_child_bitfield

unsigned char InternalNode::has_child_bitfield

◆ numChildrenTable

int InternalNode::numChildrenTable
static

Definition at line 42 of file octree.h.

Referenced by get_num_children().


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