OpenVDB: openvdb/tools/RayIntersector.h File Reference

OpenVDB 13.0.0

Loading...
Searching...
No Matches
RayIntersector.h File Reference

Accelerated intersection of a ray with a narrow-band level set or a generic (e.g. density) volume. This will of course be useful for respectively surface and volume rendering. More...

`#include <openvdb/math/DDA.h>`
`#include <openvdb/math/Math.h>`
`#include <openvdb/math/Ray.h>`
`#include <openvdb/math/Stencils.h>`
`#include <openvdb/Grid.h>`
`#include <openvdb/Types.h>`
`#include <openvdb/util/Assert.h>`
`#include "Morphology.h"`
`#include <iostream>`
`#include <type_traits>`

Go to the source code of this file.

## Classes
class | LevelSetRayIntersector< GridT, SearchImplT, NodeLevel, RayT >
| This class provides the public API for intersecting a ray with a narrow-band level set. More...
class | VolumeRayIntersector< GridT, NodeLevel, RayT >
| This class provides the public API for intersecting a ray with a generic (e.g. density) volume. More...
class | LinearSearchImpl< GridT, Iterations, RealT >
| Implements linear iterative search for an iso-value of the level set along the direction of the ray. More...

## Namespaces
namespace | openvdb
namespace | openvdb::v13_0
namespace | openvdb::v13_0::tools

## Detailed Description

Accelerated intersection of a ray with a narrow-band level set or a generic (e.g. density) volume. This will of course be useful for respectively surface and volume rendering.

Author
  Ken Museth

This file defines two main classes, LevelSetRayIntersector and VolumeRayIntersector, as well as the three support classes LevelSetHDDA, VolumeHDDA and LinearSearchImpl. The LevelSetRayIntersector is templated on the LinearSearchImpl class and calls instances of the LevelSetHDDA class. The reason to split level set ray intersection into three classes is twofold. First LevelSetRayIntersector defines the public API for client code and LinearSearchImpl defines the actual algorithm used for the ray level-set intersection. In other words this design will allow for the public API to be fixed while the intersection algorithm can change without resolving to (slow) virtual methods. Second, LevelSetHDDA, which implements a hierarchical Differential Digital Analyzer, relies on partial template specialization, so it has to be a standalone class (as opposed to a member class of LevelSetRayIntersector). The VolumeRayIntersector is conceptually much simpler than the LevelSetRayIntersector, and hence it only depends on VolumeHDDA that implements the hierarchical Differential Digital Analyzer.