OpenVDB: InternalNode< ChildT > Struct Template Reference

OpenVDB 11.0.0

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
InternalNode< ChildT > Struct Template Reference

`#include <nanovdb/util/GridBuilder.h>`

## Classes
class | ChildIterator
| Visits child nodes of this node only. More...
class | DenseIterator
| Visits all tile values and child nodes of this node. More...
struct | Tile
class | ValueIterator
| Visits all tile values in this node, i.e. both inactive and active tiles. More...
class | ValueOnIterator
| Visits active tile values of this node only. More...

## Public Types
using | ValueType = typename ChildT::ValueType
using | BuildType = typename ChildT::BuildType
using | ChildNodeType = ChildT
using | LeafNodeType = typename ChildT::LeafNodeType
using | MaskT = Mask<LOG2DIM>
template<bool On>
using | MaskIterT = typename MaskT::template Iterator<On>
using | NanoNodeT = typename NanoNode<BuildType, LEVEL>::Type

## Public Member Functions
ChildIterator | beginChild ()
ChildIterator | cbeginChildOn () const
ValueIterator | beginValue ()
ValueIterator | cbeginValueAll () const
ValueOnIterator | beginValueOn ()
ValueOnIterator | cbeginValueOn () const
DenseIterator | beginDense ()
DenseIterator | cbeginChildAll () const
| InternalNode (const Coord &origin, const ValueType &value, bool state)
| InternalNode (const InternalNode &)=delete
| InternalNode (InternalNode &&)=delete
InternalNode & | operator= (const InternalNode &)=delete
InternalNode & | operator= (InternalNode &&)=delete
| ~InternalNode ()
const MaskT & | getValueMask () const
const MaskT & | valueMask () const
const MaskT & | getChildMask () const
const MaskT & | childMask () const
const Coord & | origin () const
void | nodeCount (std::array< size_t, 3 > &count) const
void | localToGlobalCoord (Coord &ijk) const
Coord | offsetToGlobalCoord (uint32_t n) const
ValueType | getFirstValue () const
ValueType | getLastValue () const
template<typename OpT , typename... ArgsT>
auto | get (const Coord &ijk, ArgsT &&... args) const
template<typename OpT , typename... ArgsT>
auto | set (const Coord &ijk, ArgsT &&... args)
template<typename OpT , typename AccT , typename... ArgsT>
auto | getAndCache (const Coord &ijk, const AccT &acc, ArgsT &&... args) const
template<typename OpT , typename AccT , typename... ArgsT>
auto | setAndCache (const Coord &ijk, const AccT &acc, ArgsT &&... args)
ValueType | getValue (const Coord &ijk) const
void | setValue (const Coord &ijk, const ValueType &value)
template<typename AccT >
ValueType | getValueAndCache (const Coord &ijk, AccT &acc) const
template<typename AccT >
void | setValueAndCache (const Coord &ijk, const ValueType &value, AccT &acc)
template<typename AccT >
void | setValueOnAndCache (const Coord &ijk, AccT &acc)
template<typename AccT >
void | touchLeafAndCache (const Coord &ijk, AccT &acc)
template<typename AccT >
bool | isActiveAndCache (const Coord &ijk, AccT &acc) const
template<typename NodeT >
uint32_t | nodeCount () const
template<typename NodeT >
void | getNodes (std::vector< NodeT * > &array)
void | addChild (ChildT *&child)
template<uint32_t level>
void | addTile (const Coord &ijk, const ValueType &value, bool state)
| Add a tile containing voxel (i, j, k) at the specified tree level, creating a new branch if necessary. Delete any existing lower-level nodes that contain (x, y, z).
template<typename NodeT >
void | addNode (NodeT *&node)
void | merge (InternalNode &other)
template<typename T >
std::enable_if< std::is_floating_point< T >::value >::type | signedFloodFill (T outside)

## Static Public Member Functions
static uint32_t | CoordToOffset (const Coord &ijk)
static Coord | OffsetToLocalCoord (uint32_t n)

## Public Attributes
Coord | mOrigin
MaskT | mValueMask
MaskT | mChildMask
Tile | mTable [SIZE]
union { |
NanoNodeT * mDstNode |
uint64_t mDstOffset |
}; |  |

## Static Public Attributes
static constexpr uint32_t | LOG2DIM = ChildT::LOG2DIM + 1
static constexpr uint32_t | TOTAL = LOG2DIM + ChildT::TOTAL
static constexpr uint32_t | DIM = 1u << TOTAL
static constexpr uint32_t | SIZE = 1u << (3 * LOG2DIM)
static constexpr uint32_t | MASK = DIM - 1
static constexpr uint32_t | LEVEL = 1 + ChildT::LEVEL
static constexpr uint64_t | NUM_VALUES = uint64_t(1) << (3 * TOTAL)

## Member Typedef Documentation

## ◆ BuildType

template<typename ChildT >

using BuildType = typename ChildT::BuildType

## ◆ ChildNodeType

template<typename ChildT >

using ChildNodeType = ChildT

## ◆ LeafNodeType

template<typename ChildT >

using LeafNodeType = typename ChildT::LeafNodeType

## ◆ MaskIterT

template<typename ChildT >
template<bool On>

using MaskIterT = typename MaskT::template Iterator<On>

## ◆ MaskT

template<typename ChildT >

using MaskT = Mask<LOG2DIM>

## ◆ NanoNodeT

template<typename ChildT >

using NanoNodeT = typename NanoNode<BuildType, LEVEL>::Type

## ◆ ValueType

template<typename ChildT >

using ValueType = typename ChildT::ValueType

## Constructor & Destructor Documentation

## ◆ InternalNode() [1/3]

template<typename ChildT >

InternalNode | ( | const Coord & | origin,
|  | const ValueType & | value,
|  | bool | state )
| inline

## ◆ InternalNode() [2/3]

template<typename ChildT >

InternalNode | ( | const InternalNode< ChildT > & |  | ) |
| delete

## ◆ InternalNode() [3/3]

template<typename ChildT >

InternalNode | ( | InternalNode< ChildT > && |  | ) |
| delete

## ◆ ~InternalNode()

template<typename ChildT >

~InternalNode | ( |  | ) |
| inline

## Member Function Documentation

## ◆ addChild()

template<typename ChildT >

void addChild | ( | ChildT *& | child | ) |
| inline

## ◆ addNode()

template<typename ChildT >
template<typename NodeT >

void addNode | ( | NodeT *& | node | ) |
| inline

## ◆ addTile()

template<typename ChildT >
template<uint32_t level>

void addTile | ( | const Coord & | ijk,
|  | const ValueType & | value,
|  | bool | state )
| inline

Add a tile containing voxel (i, j, k) at the specified tree level, creating a new branch if necessary. Delete any existing lower-level nodes that contain (x, y, z).

Template Parameters

  level | tree level at which the tile is inserted. Must be 1 or 2.

Parameters

  ijk | Index coordinate that map to the tile being inserted
  value | Value of the tile
  state | Binary state of the tile

## ◆ beginChild()

template<typename ChildT >

ChildIterator beginChild | ( |  | ) |
| inline

## ◆ beginDense()

template<typename ChildT >

DenseIterator beginDense | ( |  | ) |
| inline

## ◆ beginValue()

template<typename ChildT >

ValueIterator beginValue | ( |  | ) |
| inline

## ◆ beginValueOn()

template<typename ChildT >

ValueOnIterator beginValueOn | ( |  | ) |
| inline

## ◆ cbeginChildAll()

template<typename ChildT >

DenseIterator cbeginChildAll | ( |  | ) | const
| inline

## ◆ cbeginChildOn()

template<typename ChildT >

ChildIterator cbeginChildOn | ( |  | ) | const
| inline

## ◆ cbeginValueAll()

template<typename ChildT >

ValueIterator cbeginValueAll | ( |  | ) | const
| inline

## ◆ cbeginValueOn()

template<typename ChildT >

ValueOnIterator cbeginValueOn | ( |  | ) | const
| inline

## ◆ childMask()

template<typename ChildT >

const MaskT & childMask | ( |  | ) | const
| inline

## ◆ CoordToOffset()

template<typename ChildT >

static uint32_t CoordToOffset | ( | const Coord & | ijk | ) |
| inlinestatic

## ◆ get()

template<typename ChildT >
template<typename OpT , typename... ArgsT>

auto get | ( | const Coord & | ijk,
|  | ArgsT &&... | args ) const
| inline

## ◆ getAndCache()

template<typename ChildT >
template<typename OpT , typename AccT , typename... ArgsT>

auto getAndCache | ( | const Coord & | ijk,
|  | const AccT & | acc,
|  | ArgsT &&... | args ) const
| inline

## ◆ getChildMask()

template<typename ChildT >

const MaskT & getChildMask | ( |  | ) | const
| inline

## ◆ getFirstValue()

template<typename ChildT >

ValueType getFirstValue | ( |  | ) | const
| inline

## ◆ getLastValue()

template<typename ChildT >

ValueType getLastValue | ( |  | ) | const
| inline

## ◆ getNodes()

template<typename ChildT >
template<typename NodeT >

void getNodes | ( | std::vector< NodeT * > & | array | ) |
| inline

## ◆ getValue()

template<typename ChildT >

ValueType getValue | ( | const Coord & | ijk | ) | const
| inline

## ◆ getValueAndCache()

template<typename ChildT >
template<typename AccT >

ValueType getValueAndCache | ( | const Coord & | ijk,
|  | AccT & | acc ) const
| inline

## ◆ getValueMask()

template<typename ChildT >

const MaskT & getValueMask | ( |  | ) | const
| inline

## ◆ isActiveAndCache()

template<typename ChildT >
template<typename AccT >

bool isActiveAndCache | ( | const Coord & | ijk,
|  | AccT & | acc ) const
| inline

## ◆ localToGlobalCoord()

template<typename ChildT >

void localToGlobalCoord | ( | Coord & | ijk | ) | const
| inline

## ◆ merge()

template<typename ChildT >

void merge | ( | InternalNode< ChildT > & | other | ) |
| inline

## ◆ nodeCount() [1/2]

template<typename ChildT >
template<typename NodeT >

uint32_t nodeCount | ( |  | ) | const
| inline

## ◆ nodeCount() [2/2]

template<typename ChildT >

void nodeCount | ( | std::array< size_t, 3 > & | count | ) | const
| inline

## ◆ offsetToGlobalCoord()

template<typename ChildT >

Coord offsetToGlobalCoord | ( | uint32_t | n | ) | const
| inline

## ◆ OffsetToLocalCoord()

template<typename ChildT >

static Coord OffsetToLocalCoord | ( | uint32_t | n | ) |
| inlinestatic

## ◆ operator=() [1/2]

template<typename ChildT >

InternalNode & operator= | ( | const InternalNode< ChildT > & |  | ) |
| delete

## ◆ operator=() [2/2]

template<typename ChildT >

InternalNode & operator= | ( | InternalNode< ChildT > && |  | ) |
| delete

## ◆ origin()

template<typename ChildT >

const Coord & origin | ( |  | ) | const
| inline

## ◆ set()

template<typename ChildT >
template<typename OpT , typename... ArgsT>

auto set | ( | const Coord & | ijk,
|  | ArgsT &&... | args )
| inline

## ◆ setAndCache()

template<typename ChildT >
template<typename OpT , typename AccT , typename... ArgsT>

auto setAndCache | ( | const Coord & | ijk,
|  | const AccT & | acc,
|  | ArgsT &&... | args )
| inline

## ◆ setValue()

template<typename ChildT >

void setValue | ( | const Coord & | ijk,
|  | const ValueType & | value )
| inline

## ◆ setValueAndCache()

template<typename ChildT >
template<typename AccT >

void setValueAndCache | ( | const Coord & | ijk,
|  | const ValueType & | value,
|  | AccT & | acc )
| inline

## ◆ setValueOnAndCache()

template<typename ChildT >
template<typename AccT >

void setValueOnAndCache | ( | const Coord & | ijk,
|  | AccT & | acc )
| inline

## ◆ signedFloodFill()

template<typename ChildT >
template<typename T >

std::enable_if< std::is_floating_point< T >::value >::type signedFloodFill | ( | T | outside | ) |
| inline

## ◆ touchLeafAndCache()

template<typename ChildT >
template<typename AccT >

void touchLeafAndCache | ( | const Coord & | ijk,
|  | AccT & | acc )
| inline

## ◆ valueMask()

template<typename ChildT >

const MaskT & valueMask | ( |  | ) | const
| inline

## Member Data Documentation

## ◆ [union]

union { ... }

## ◆ DIM

template<typename ChildT >

uint32_t DIM = 1u << TOTAL
| staticconstexpr

## ◆ LEVEL

template<typename ChildT >

uint32_t LEVEL = 1 + ChildT::LEVEL
| staticconstexpr

## ◆ LOG2DIM

template<typename ChildT >

uint32_t LOG2DIM = ChildT::LOG2DIM + 1
| staticconstexpr

## ◆ MASK

template<typename ChildT >

uint32_t MASK = DIM - 1
| staticconstexpr

## ◆ mChildMask

template<typename ChildT >

MaskT mChildMask

## ◆ mDstNode

template<typename ChildT >

NanoNodeT* mDstNode

## ◆ mDstOffset

template<typename ChildT >

uint64_t mDstOffset

## ◆ mOrigin

template<typename ChildT >

Coord mOrigin

## ◆ mTable

template<typename ChildT >

Tile mTable[SIZE]

## ◆ mValueMask

template<typename ChildT >

MaskT mValueMask

## ◆ NUM_VALUES

template<typename ChildT >

uint64_t NUM_VALUES = uint64_t(1) << (3 * TOTAL)
| staticconstexpr

## ◆ SIZE

template<typename ChildT >

uint32_t SIZE = 1u << (3 * LOG2DIM)
| staticconstexpr

## ◆ TOTAL

template<typename ChildT >

uint32_t TOTAL = LOG2DIM + ChildT::TOTAL
| staticconstexpr