OpenVDB  12.1.0
Classes | Namespaces | Functions
LevelSetTubesImpl.h File Reference

Generate a narrow-band level set of a capsule, tapered capsule, and tube complex. More...

#include "ConvexVoxelizer.h"
#include <openvdb/tools/PointPartitioner.h>
#include <openvdb/tools/Prune.h>
#include <openvdb/Grid.h>
#include <openvdb/Types.h>
#include <openvdb/math/Math.h>
#include <openvdb/util/NullInterrupter.h>
#include <tbb/parallel_sort.h>
#include <tbb/parallel_for.h>
#include <tbb/parallel_reduce.h>
#include <cmath>
#include <vector>
#include <type_traits>

Go to the source code of this file.

Classes

class  CapsuleVoxelizer< GridType, InterruptT >
 Class used to generate a grid of type GridType containing a narrow-band level set representation of a capsule. More...
 
class  TaperedCapsuleVoxelizer< GridType, InterruptT >
 Class used to generate a grid of type GridType containing a narrow-band level set representation of a tapered capsule. More...
 
class  TubeComplexVoxelizer< GridType, ScalarType, InterruptT, PerSegmentRadii >
 Class used to generate a grid of type GridType containing a narrow-band level set representation of a tube complex. More...
 

Namespaces

 openvdb
 
 openvdb::v12_1
 
 openvdb::v12_1::tools
 
 openvdb::v12_1::tools::lvlset
 

Functions

template<typename GridType , typename ScalarType , typename InterruptT = util::NullInterrupter>
GridType::Ptr createLevelSetTubeComplex (const std::vector< math::Vec3< ScalarType >> &vertices, const std::vector< Vec2I > &segments, ScalarType radius, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupter=nullptr)
 Return a grid of type GridType containing a narrow-band level set representation of a tube complex (a collection of capsules defined by endpoint coordinates and segment indices). More...
 
template<typename GridType , typename ScalarType , typename InterruptT = util::NullInterrupter>
GridType::Ptr createLevelSetTubeComplex (const std::vector< math::Vec3< ScalarType >> &vertices, const std::vector< Vec2I > &segments, const std::vector< ScalarType > &radii, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), TubeRadiiPolicy radii_policy=TUBE_AUTOMATIC, InterruptT *interrupter=nullptr)
 Return a grid of type GridType containing a narrow-band level set representation of a tube complex (a collection of tubes defined by endpoint coordinates, segment indices, and radii). More...
 
template<typename GridType , typename ScalarType , typename InterruptT >
GridType::Ptr createLevelSetCapsule (const math::Vec3< ScalarType > &pt1, const math::Vec3< ScalarType > &pt2, ScalarType radius, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupter=nullptr, bool threaded=true)
 Return a grid of type GridType containing a narrow-band level set representation of a capsule (tube with constant radius and sphere caps). More...
 
template<typename GridType , typename ScalarType >
GridType::Ptr createLevelSetCapsule (const math::Vec3< ScalarType > &pt1, const math::Vec3< ScalarType > &pt2, ScalarType radius, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), bool threaded=true)
 Return a grid of type GridType containing a narrow-band level set representation of a capsule (tube with constant radius and sphere caps). More...
 
template<typename GridType , typename ScalarType , typename InterruptT >
GridType::Ptr createLevelSetTaperedCapsule (const math::Vec3< ScalarType > &pt1, const math::Vec3< ScalarType > &pt2, ScalarType radius1, ScalarType radius2, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), InterruptT *interrupter=nullptr, bool threaded=true)
 Return a grid of type GridType containing a narrow-band level set representation of a tapered capsule (tube with sphere caps and different radii at both ends, or equivalently the convex hull of two spheres with possibly different centers and radii). More...
 
template<typename GridType , typename ScalarType >
GridType::Ptr createLevelSetTaperedCapsule (const math::Vec3< ScalarType > &pt1, const math::Vec3< ScalarType > &pt2, ScalarType radius1, ScalarType radius2, float voxelSize, float halfWidth=float(LEVEL_SET_HALF_WIDTH), bool threaded=true)
 Return a grid of type GridType containing a narrow-band level set representation of a tapered capsule (tube with sphere caps and different radii at both ends, or equivalently the convex hull of two spheres with possibly different centers and radii). More...
 

Detailed Description

Generate a narrow-band level set of a capsule, tapered capsule, and tube complex.

Author
Greg Hurst
Note
By definition a level set has a fixed narrow band width (the half width is defined by LEVEL_SET_HALF_WIDTH in Types.h), whereas an SDF can have a variable narrow band width.