OpenVDB  2.1.0
Public Types | Public Member Functions | List of all members
LevelSetRayIntersector< GridT, SearchImplT, NodeLevel, RayT > Class Template Reference

This class provides the public API for intersecting a ray with a narrow-band level set. More...

#include <RayIntersector.h>

Public Types

typedef GridT GridType
 
typedef RayT RayType
 
typedef RayT::RealType RealType
 
typedef RayT::Vec3T Vec3Type
 
typedef GridT::ValueType ValueT
 
typedef GridT::TreeType TreeT
 

Public Member Functions

 BOOST_STATIC_ASSERT (NodeLevel >=-1 &&NodeLevel< int(TreeT::DEPTH)-1)
 
 BOOST_STATIC_ASSERT (boost::is_floating_point< ValueT >::value)
 
 LevelSetRayIntersector (const GridT &grid)
 Constructor. More...
 
bool intersectsIS (const RayType &iRay) const
 Return true if the index-space ray intersects the level set. More...
 
bool intersectsIS (const RayType &iRay, Vec3Type &xyz) const
 Return true if the index-space ray intersects the level set. More...
 
bool intersectsWS (const RayType &wRay) const
 Return true if the world-space ray intersects the level set. More...
 
bool intersectsWS (const RayType &wRay, Vec3Type &world) const
 Return true if the world-space ray intersects the level set. More...
 
bool intersectsWS (const RayType &wRay, Vec3Type &world, Vec3Type &normal) const
 Return true if the world-space ray intersects the level set. More...
 

Detailed Description

template<typename GridT, typename SearchImplT = LinearSearchImpl<GridT>, int NodeLevel = GridT::TreeType::RootNodeType::ChildNodeType::LEVEL, typename RayT = math::Ray<Real>>
class openvdb::v2_1_0::tools::LevelSetRayIntersector< GridT, SearchImplT, NodeLevel, RayT >

This class provides the public API for intersecting a ray with a narrow-band level set.

It wraps an SearchImplT with a simple public API and performs the actual hierarchical tree node and voxel traversal.

Warning
Use the (default) copy-constructor to make sure each computational thread has their own instance of this class. This is important since the SearchImplT contains a ValueAccessor that is not thread-safe. However copying is very efficient.
See Also
tools/RayTracer.h for examples of intended usage.

Member Typedef Documentation

typedef GridT GridType
typedef RayT RayType
typedef RayT::RealType RealType
typedef GridT::TreeType TreeT
typedef GridT::ValueType ValueT
typedef RayT::Vec3T Vec3Type

Constructor & Destructor Documentation

LevelSetRayIntersector ( const GridT &  grid)
inline

Constructor.

Parameters
gridlevel set grid to intersect rays against

Member Function Documentation

BOOST_STATIC_ASSERT ( )
BOOST_STATIC_ASSERT ( boost::is_floating_point< ValueT >::value  )
bool intersectsIS ( const RayType iRay) const
inline

Return true if the index-space ray intersects the level set.

Parameters
iRayray represented in index space
bool intersectsIS ( const RayType iRay,
Vec3Type xyz 
) const
inline

Return true if the index-space ray intersects the level set.

Parameters
iRayray represented in index space.
xyzif an intersection was found it is assigned the intersection point in index space, otherwise it is unchanged.
bool intersectsWS ( const RayType wRay) const
inline

Return true if the world-space ray intersects the level set.

Parameters
wRayray represented in world space.
bool intersectsWS ( const RayType wRay,
Vec3Type world 
) const
inline

Return true if the world-space ray intersects the level set.

Parameters
wRayray represented in world space.
worldif an intersection was found it is assigned the intersection point in world space, otherwise it is unchanged
bool intersectsWS ( const RayType wRay,
Vec3Type world,
Vec3Type normal 
) const
inline

Return true if the world-space ray intersects the level set.

Parameters
wRayray represented in world space.
worldif an intersection was found it is assigned the intersection point in world space, otherwise it is unchanged.
normalif an intersection was found it is assigned the normal of the level set surface in world space, otherwise it is unchanged.

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