OpenVDB 13.0.1
Loading...
Searching...
No Matches
PolySoupToLevelSet.h File Reference

Generates a LOD family of watertight shrink wrap level set surfaces (or meshes) from a soup of polygons. More...

#include <openvdb/Types.h>
#include <openvdb/Grid.h>
#include <openvdb/math/Math.h>
#include <openvdb/util/Assert.h>
#include "Composite.h"
#include "ValueTransformer.h"
#include "GridTransformer.h"
#include "MeshToVolume.h"
#include "VolumeToMesh.h"
#include "LevelSetDilatedMesh.h"
#include "LevelSetFilter.h"
#include "LevelSetMeasure.h"
#include "FastSweeping.h"
#include "LevelSetUtil.h"
#include <iostream>
#include <vector>

Go to the source code of this file.

Classes

struct  PolySoup
 Simple structure for a polygon soup. More...
class  PolySoupToLevelSet< GridType >
 Class that implements the actual shrink wrap algorithm. More...
class  ShrinkWrapLimit

Namespaces

namespace  openvdb
namespace  openvdb::v13_0
namespace  openvdb::v13_0::tools

Functions

template<typename GridType, class ShrinkWrapT = ShrinkWrapLimit, class ProgressT = void>
GridType::Ptr polySoupToLevelSet (PolySoup &&poly, int dim=256, float voxelSize=0.0, const ShrinkWrapT &D=ShrinkWrapT(), float halfWidth=float(LEVEL_SET_HALF_WIDTH), ProgressT *progress=nullptr, int offset_mode=0)
 Convert a soup of polygons to a shrink wrapped level set volume. This version takes a PolySoup struct and optional voxel dimension and/or voxel size. If the voxel size is invalid, i.e. not positive, the dimension and bbox of the PolySoup is used to derive the voxel size.
template<typename GridType, class ShrinkWrapT = ShrinkWrapLimit, class ProgressT = void>
std::vector< typename GridType::Ptr > polySoupToLevelSet (int dim, const math::BBox< Vec3f > &bbox, std::vector< Vec3s > &vtx, std::vector< Vec3I > &tri, std::vector< Vec4I > &quad, const ShrinkWrapT &D=ShrinkWrapT(), float halfWidth=float(LEVEL_SET_HALF_WIDTH), ProgressT *progress=nullptr, int offset_mode=0)
 Convert a soup of polygons to a LOD sequence of shrink wrapped level set volumes.
template<typename GridType, class ShrinkWrapT = ShrinkWrapLimit, class ProgressT = void>
std::vector< typename GridType::Ptr > polySoupToLevelSet (float minVoxelSize, const math::BBox< Vec3f > &bbox, std::vector< Vec3s > &vtx, std::vector< Vec3I > &tri, std::vector< Vec4I > &quad, const ShrinkWrapT &D=ShrinkWrapT(), float halfWidth=float(LEVEL_SET_HALF_WIDTH), ProgressT *progress=nullptr, int offset_mode=0)
 Convert a soup of polygons to a LOD sequence of shrink wrapped level set volumes.

Detailed Description

Generates a LOD family of watertight shrink wrap level set surfaces (or meshes) from a soup of polygons.

Author
Ken Museth

Details of this algorithm are given in an upcoming publication.