OpenVDB: PointTreeMarcher< AccT, RayT, CoordT > Class Template Reference

OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
PointTreeMarcher< AccT, RayT, CoordT > Class Template Reference

A Tree Marcher for Point Grids. More...

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

Inheritance diagram for PointTreeMarcher< AccT, RayT, CoordT >:

## Public Types
using | ChildT = typename NodeT::ChildNodeType
using | RealType = typename RayT::RealType
using | RealT = RealType
using | CoordType = CoordT

## Public Member Functions
__hostdev__ | PointTreeMarcher (AccT &acc)
__hostdev__ bool | init (RayT ray)
| Initiates this instance with a ray in index space.
__hostdev__ bool | init (const RayT &indexRay)
| Initialize the TreeMarcher with an index-space ray.
__hostdev__ bool | step (const NodeT **node, float &t0, float &t1)
| step the ray through the tree. If the ray hits a node then populate t0 & t1, and the node.
__hostdev__ const RayT & | ray () const
__hostdev__ RayT & | ray ()

## Detailed Description

template<typename AccT, typename RayT, typename CoordT = Coord>
class nanovdb::PointTreeMarcher< AccT, RayT, CoordT >

A Tree Marcher for Point Grids.

Note
  This class will handle correctly offseting the ray by 0.5 to ensure that the underlying HDDA will intersect with the grid-cells. See details below.

## Member Typedef Documentation

## ◆ ChildT

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

using ChildT = typename NodeT::ChildNodeType
| inherited

## ◆ CoordType

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

using CoordType = CoordT
| inherited

## ◆ RealT

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

using RealT = RealType
| inherited

## ◆ RealType

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

using RealType = typename RayT::RealType
| inherited

## Constructor & Destructor Documentation

## ◆ PointTreeMarcher()

template<typename AccT , typename RayT , typename CoordT = Coord>

__hostdev__ PointTreeMarcher | ( | AccT & | acc | ) |
| inline

## Member Function Documentation

## ◆ init() [1/2]

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

__hostdev__ bool init | ( | const RayT & | indexRay | ) |
| inlineinherited

Initialize the TreeMarcher with an index-space ray.

## ◆ init() [2/2]

template<typename AccT , typename RayT , typename CoordT = Coord>

__hostdev__ bool init | ( | RayT | ray | ) |
| inline

Initiates this instance with a ray in index space.

An offset by 0.5 is applied to the ray to account for the fact that points in vdb grids are bucketed into so-called grid cell, which are centered round grid voxels, whereas the DDA is based on so-called grid nodes, which are coincident with grid voxels. So, rather than offsettting the points by 0.5 to bring them into a grid node representation this method offsets the eye of the ray by 0.5, which effectively ensures that the DDA operates on grid cells as oppose to grid nodes. This subtle but important offset by 0.5 is explined in more details in our online documentation.

## ◆ ray() [1/2]

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

__hostdev__ RayT & ray | ( |  | ) |
| inlineinherited

## ◆ ray() [2/2]

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

__hostdev__ const RayT & ray | ( |  | ) | const
| inlineinherited

## ◆ step()

template<typename NodeT , typename RayT , typename AccT , typename CoordT = Coord>

__hostdev__ bool step | ( | const NodeT ** | node,
|  | float & | t0,
|  | float & | t1
| ) |  |
| inlineinherited

step the ray through the tree. If the ray hits a node then populate t0 & t1, and the node.

Returns
  true when a node of type NodeT is intersected, false otherwise.