OpenVDB 12.1.0
Loading...
Searching...
No Matches
LevelSetTubes.h File Reference

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

#include <openvdb/Grid.h>
#include <openvdb/openvdb.h>
#include <openvdb/math/Math.h>
#include <openvdb/util/NullInterrupter.h>
#include <vector>
#include "impl/LevelSetTubesImpl.h"

Go to the source code of this file.

Namespaces

namespace  openvdb
namespace  openvdb::v12_1
namespace  openvdb::v12_1::tools

Enumerations

enum  TubeRadiiPolicy { TUBE_AUTOMATIC = 0 , TUBE_VERTEX_RADII , TUBE_SEGMENT_RADII }
 Different policies when creating a tube complex with varying radii. More...

Functions

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).
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).
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).
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).
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).
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).

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.