HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::DDA< RayT, CoordT, Dim > Class Template Reference

A Digital Differential Analyzer. Unlike HDDA (defined above) this DDA uses a fixed step-size defined by the template parameter Dim! More...

#include <HDDA.h>

Public Types

using RealType = typename RayT::RealType
 
using RealT = RealType
 
using Vec3Type = typename RayT::Vec3Type
 
using Vec3T = Vec3Type
 
using CoordType = CoordT
 

Public Member Functions

 DDA ()=default
 Default ctor. More...
 
__hostdev__ DDA (const RayT &ray)
 ctor from ray and dimension at which the DDA marches More...
 
__hostdev__ void init (const RayT &ray, RealT startTime, RealT maxTime)
 Re-initializes the DDA. More...
 
__hostdev__ void init (const RayT &ray)
 Simular to init above except it uses the bounds of the input ray. More...
 
__hostdev__ bool step ()
 Increment the voxel index to next intersected voxel or node and returns true if the step in time does not exceed maxTime. More...
 
__hostdev__ const CoordT & voxel () const
 Return the index coordinates of the next node or voxel intersected by the ray. If Log2Dim = 0 the return value is the actual signed coordinate of the voxel, else it is the origin of the corresponding VDB tree node or tile. More...
 
__hostdev__ RealType time () const
 Return the time (parameterized along the Ray) of the first hit of a tree node of size 2^Log2Dim. More...
 
__hostdev__ RealType maxTime () const
 Return the maximum time (parameterized along the Ray). More...
 
__hostdev__ RealType next () const
 Return the time (parameterized along the Ray) of the second (i.e. next) hit of a tree node of size 2^Log2Dim. More...
 
__hostdev__ int nextAxis () const
 

Detailed Description

template<typename RayT, typename CoordT = Coord, int Dim = 1>
class nanovdb::DDA< RayT, CoordT, Dim >

A Digital Differential Analyzer. Unlike HDDA (defined above) this DDA uses a fixed step-size defined by the template parameter Dim!

Note
The Ray template class is expected to have the following methods: test(time), t0(), t1(), invDir(), and operator()(time). See the example Ray class above for their definition.

Definition at line 210 of file HDDA.h.

Member Typedef Documentation

template<typename RayT, typename CoordT = Coord, int Dim = 1>
using nanovdb::DDA< RayT, CoordT, Dim >::CoordType = CoordT

Definition at line 219 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
using nanovdb::DDA< RayT, CoordT, Dim >::RealT = RealType

Definition at line 216 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
using nanovdb::DDA< RayT, CoordT, Dim >::RealType = typename RayT::RealType

Definition at line 215 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
using nanovdb::DDA< RayT, CoordT, Dim >::Vec3T = Vec3Type

Definition at line 218 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
using nanovdb::DDA< RayT, CoordT, Dim >::Vec3Type = typename RayT::Vec3Type

Definition at line 217 of file HDDA.h.

Constructor & Destructor Documentation

template<typename RayT, typename CoordT = Coord, int Dim = 1>
nanovdb::DDA< RayT, CoordT, Dim >::DDA ( )
default

Default ctor.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ nanovdb::DDA< RayT, CoordT, Dim >::DDA ( const RayT &  ray)
inline

ctor from ray and dimension at which the DDA marches

Definition at line 225 of file HDDA.h.

Member Function Documentation

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ void nanovdb::DDA< RayT, CoordT, Dim >::init ( const RayT &  ray,
RealT  startTime,
RealT  maxTime 
)
inline

Re-initializes the DDA.

Definition at line 228 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ void nanovdb::DDA< RayT, CoordT, Dim >::init ( const RayT &  ray)
inline

Simular to init above except it uses the bounds of the input ray.

Definition at line 252 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ RealType nanovdb::DDA< RayT, CoordT, Dim >::maxTime ( ) const
inline

Return the maximum time (parameterized along the Ray).

Definition at line 296 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ RealType nanovdb::DDA< RayT, CoordT, Dim >::next ( ) const
inline

Return the time (parameterized along the Ray) of the second (i.e. next) hit of a tree node of size 2^Log2Dim.

Note
Incurs a (small) computational overhead.

Definition at line 301 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ int nanovdb::DDA< RayT, CoordT, Dim >::nextAxis ( ) const
inline

Definition at line 306 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ bool nanovdb::DDA< RayT, CoordT, Dim >::step ( )
inline

Increment the voxel index to next intersected voxel or node and returns true if the step in time does not exceed maxTime.

Definition at line 256 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ RealType nanovdb::DDA< RayT, CoordT, Dim >::time ( ) const
inline

Return the time (parameterized along the Ray) of the first hit of a tree node of size 2^Log2Dim.

This value is initialized to startTime or ray.t0() depending on the constructor used.

Note
Incurs no computational overhead.

Definition at line 293 of file HDDA.h.

template<typename RayT, typename CoordT = Coord, int Dim = 1>
__hostdev__ const CoordT& nanovdb::DDA< RayT, CoordT, Dim >::voxel ( ) const
inline

Return the index coordinates of the next node or voxel intersected by the ray. If Log2Dim = 0 the return value is the actual signed coordinate of the voxel, else it is the origin of the corresponding VDB tree node or tile.

Note
Incurs no computational overhead.

Definition at line 286 of file HDDA.h.


The documentation for this class was generated from the following file: