OpenVDB: openvdb::v3_1_0::tools::internal Namespace Reference

OpenVDB 3.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Classes | Enumerations | Functions | Variables
openvdb::v3_1_0::tools::internal Namespace Reference

## Classes
struct | AdaptivePrimBuilder
class | ClosestPointDist
class | CountPoints
| Counts the total number of points per leaf, accounts for cells with multiple points. More...
class | CountRegions
| Counts the total number of points per collapsed region. More...
class | FlagUsedPoints
class | GenBoundaryMask
class | GenPoints
class | GenPolygons
class | GenSeamMask
class | GenTileMask
class | GenTopologyMask
class | LeafBS
class | MapPoints
| Computes the point list indices for the index tree. More...
struct | MaskEdges
class | MergeVoxelRegions
class | MinMaxVoxel
class | MovePoints
class | NodeBS
class | PartGen
struct | PartOp
struct | PointAccessor
class | PointListCopy
class | PointListTransform
class | PrimCpy
class | RemapIndices
class | SeamWeights
class | SignData
class | TagSeamEdges
class | TileSampler
| A TileSampler wraps a grid sampler of another type (BoxSampler, QuadraticSampler, etc.), and for samples that fall within a given tile of the grid, it returns a cached tile value instead of accessing the grid. More...
class | TileSampler< PointSampler, TreeT >
| For point sampling, tree traversal is less expensive than testing bounding box membership. More...
class | TileSampler< StaggeredPointSampler, TreeT >
| For point sampling, tree traversal is less expensive than testing bounding box membership. More...
struct | UniformPrimBuilder
struct | UniquePtr
class | UpdatePoints

## Enumerations
enum | { SIGNS = 0xFF, EDGES = 0xE00, INSIDE = 0x100, XEDGE = 0x200, YEDGE = 0x400, ZEDGE = 0x800, SEAM = 0x1000 }
| Bit-flags used to classify cells. More...

## Functions
template<typename GridType , typename InterruptType >
std::vector< typename GridType::Ptr > | segment (GridType &grid, InterruptType *interrupter=NULL)
| Segmentation scheme, splits disjoint fragments into separate grids. More...
bool | isPlanarQuad (const Vec3d &p0, const Vec3d &p1, const Vec3d &p2, const Vec3d &p3, double epsilon=0.001)
template<typename AccessorT >
unsigned char | evalCellSigns (const AccessorT &accessor, const Coord &ijk, typename AccessorT::ValueType iso)
| General method that computes the cell-sign configuration at the given `ijk` coordinate. More...
template<typename LeafT >
unsigned char | evalCellSigns (const LeafT &leaf, const Index offset, typename LeafT::ValueType iso)
| Leaf node optimized method that computes the cell-sign configuration at the given local `offset`. More...
template<class AccessorT >
void | correctCellSigns (unsigned char &signs, unsigned char face, const AccessorT &acc, Coord ijk, typename AccessorT::ValueType iso)
| Used to correct topological ambiguities related to two adjacent cells that share an ambiguous face. More...
template<class AccessorT >
bool | isNonManifold (const AccessorT &accessor, const Coord &ijk, typename AccessorT::ValueType isovalue, const int dim)
template<class LeafType >
void | mergeVoxels (LeafType &leaf, const Coord &start, int dim, int regionId)
template<class LeafType >
bool | isMergable (LeafType &leaf, const Coord &start, int dim, typename LeafType::ValueType::value_type adaptivity)
double | evalRoot (double v0, double v1, double iso)
template<typename LeafT >
void | collectCornerValues (const LeafT &leaf, const Index offset, std::vector< double > &values)
| Extracts the eight corner values for leaf inclusive cells. More...
template<typename AccessorT >
void | collectCornerValues (const AccessorT &acc, const Coord &ijk, std::vector< double > &values)
| Extracts the eight corner values for a cell starting at the given coordinate. More...
Vec3d | computePoint (const std::vector< double > &values, unsigned char signs, unsigned char edgeGroup, double iso)
| Computes the average cell point for a given edge group. More...
int | computeMaskedPoint (Vec3d &avg, const std::vector< double > &values, unsigned char signs, unsigned char signsMask, unsigned char edgeGroup, double iso)
| Computes the average cell point for a given edge group, ignoring edge samples present in the `signsMask` configuration. More...
Vec3d | computeWeightedPoint (const Vec3d &p, const std::vector< double > &values, unsigned char signs, unsigned char edgeGroup, double iso)
| Computes the average cell point for a given edge group, by computing convex weights based on the distance from the sample point `p`. More...
void | computeCellPoints (std::vector< Vec3d > &points, const std::vector< double > &values, unsigned char signs, double iso)
| Computes the average cell points defined by the sign configuration `signs` and the given corner values `values`. More...
int | matchEdgeGroup (unsigned char groupId, unsigned char lhsSigns, unsigned char rhsSigns)
| Given a sign configuration `lhsSigns` and an edge group `groupId`, finds the corresponding edge group in a different sign configuration `rhsSigns`. Returns -1 if no match is found. More...
void | computeCellPoints (std::vector< Vec3d > &points, std::vector< bool > &weightedPointMask, const std::vector< double > &lhsValues, const std::vector< double > &rhsValues, unsigned char lhsSigns, unsigned char rhsSigns, double iso, size_t pointIdx, const boost::scoped_array< uint32_t > &seamPoints)
| Computes the average cell points defined by the sign configuration `signs` and the given corner values `values`. Combines data from two different level sets to eliminate seam lines when meshing fractured segments. More...
template<typename SignAccT , typename IdxAccT , typename PrimBuilder >
void | constructPolygons (Int16 flags, Int16 refFlags, const Vec4i &offsets, const Coord &ijk, const SignAccT &signAcc, const IdxAccT &idxAcc, PrimBuilder &mesher, Index32 pointListSize)
template<class DistTreeT , class SignTreeT , class IdxTreeT >
void | tileData (const DistTreeT &distTree, SignTreeT &signTree, IdxTreeT &idxTree, double iso)
template<typename LeafManagerT >
bool | needsActiveVoxePadding (const LeafManagerT &leafs, double iso, double voxelSize)

## Variables
const bool | sAdaptable [256]
| Used to quickly determine if a given cell is adaptable. More...
const unsigned char | sAmbiguousFace [256]
| Contains the ambiguous face index for certain cell configuration. More...
const unsigned char | sEdgeGroupTable [256][13]
| Lookup table for different cell sign configurations. The first entry specifies the total number of points that need to be generated inside a cell and the remaining 12 entries indicate different edge groups. More...
enum | { MASK_FIRST_10_BITS = 0x000003FF, MASK_DIRTY_BIT = 0x80000000, MASK_INVALID_BIT = 0x40000000 }
| Utility methods for point quantization. More...
uint32_t | packPoint (const Vec3d &v)
| Utility methods for point quantization. More...
Vec3d | unpackPoint (uint32_t data)
| Utility methods for point quantization. More...

## Enumeration Type Documentation

anonymous enum

Bit-flags used to classify cells.

Enumerator
SIGNS |
EDGES |
INSIDE |
XEDGE |
YEDGE |
ZEDGE |
SEAM |

anonymous enum

Utility methods for point quantization.

Enumerator
MASK_FIRST_10_BITS |
MASK_DIRTY_BIT |
MASK_INVALID_BIT |

## Function Documentation

void openvdb::v3_1_0::tools::internal::collectCornerValues | ( | const LeafT & | leaf,
|  | const Index | offset,
|  | std::vector< double > & | values
| ) |  |
| inline

Extracts the eight corner values for leaf inclusive cells.

void openvdb::v3_1_0::tools::internal::collectCornerValues | ( | const AccessorT & | acc,
|  | const Coord & | ijk,
|  | std::vector< double > & | values
| ) |  |
| inline

Extracts the eight corner values for a cell starting at the given coordinate.

void openvdb::v3_1_0::tools::internal::computeCellPoints | ( | std::vector< Vec3d > & | points,
|  | const std::vector< double > & | values,
|  | unsigned char | signs,
|  | double | iso
| ) |  |
| inline

Computes the average cell points defined by the sign configuration `signs` and the given corner values `values`.

void openvdb::v3_1_0::tools::internal::computeCellPoints | ( | std::vector< Vec3d > & | points,
|  | std::vector< bool > & | weightedPointMask,
|  | const std::vector< double > & | lhsValues,
|  | const std::vector< double > & | rhsValues,
|  | unsigned char | lhsSigns,
|  | unsigned char | rhsSigns,
|  | double | iso,
|  | size_t | pointIdx,
|  | const boost::scoped_array< uint32_t > & | seamPoints
| ) |  |
| inline

Computes the average cell points defined by the sign configuration `signs` and the given corner values `values`. Combines data from two different level sets to eliminate seam lines when meshing fractured segments.

int openvdb::v3_1_0::tools::internal::computeMaskedPoint | ( | Vec3d & | avg,
|  | const std::vector< double > & | values,
|  | unsigned char | signs,
|  | unsigned char | signsMask,
|  | unsigned char | edgeGroup,
|  | double | iso
| ) |  |
| inline

Computes the average cell point for a given edge group, ignoring edge samples present in the `signsMask` configuration.

Vec3d openvdb::v3_1_0::tools::internal::computePoint | ( | const std::vector< double > & | values,
|  | unsigned char | signs,
|  | unsigned char | edgeGroup,
|  | double | iso
| ) |  |
| inline

Computes the average cell point for a given edge group.

Vec3d openvdb::v3_1_0::tools::internal::computeWeightedPoint | ( | const Vec3d & | p,
|  | const std::vector< double > & | values,
|  | unsigned char | signs,
|  | unsigned char | edgeGroup,
|  | double | iso
| ) |  |
| inline

Computes the average cell point for a given edge group, by computing convex weights based on the distance from the sample point `p`.

void openvdb::v3_1_0::tools::internal::constructPolygons | ( | Int16 | flags,
|  | Int16 | refFlags,
|  | const Vec4i & | offsets,
|  | const Coord & | ijk,
|  | const SignAccT & | signAcc,
|  | const IdxAccT & | idxAcc,
|  | PrimBuilder & | mesher,
|  | Index32 | pointListSize
| ) |  |
| inline

void openvdb::v3_1_0::tools::internal::correctCellSigns | ( | unsigned char & | signs,
|  | unsigned char | face,
|  | const AccessorT & | acc,
|  | Coord | ijk,
|  | typename AccessorT::ValueType | iso
| ) |  |
| inline

Used to correct topological ambiguities related to two adjacent cells that share an ambiguous face.

unsigned char openvdb::v3_1_0::tools::internal::evalCellSigns | ( | const AccessorT & | accessor,
|  | const Coord & | ijk,
|  | typename AccessorT::ValueType | iso
| ) |  |
| inline

General method that computes the cell-sign configuration at the given `ijk` coordinate.

unsigned char openvdb::v3_1_0::tools::internal::evalCellSigns | ( | const LeafT & | leaf,
|  | const Index | offset,
|  | typename LeafT::ValueType | iso
| ) |  |
| inline

Leaf node optimized method that computes the cell-sign configuration at the given local `offset`.

double openvdb::v3_1_0::tools::internal::evalRoot | ( | double | v0,
|  | double | v1,
|  | double | iso
| ) |  |
| inline

bool openvdb::v3_1_0::tools::internal::isMergable | ( | LeafType & | leaf,
|  | const Coord & | start,
|  | int | dim,
|  | typename LeafType::ValueType::value_type | adaptivity
| ) |  |
| inline

bool openvdb::v3_1_0::tools::internal::isNonManifold | ( | const AccessorT & | accessor,
|  | const Coord & | ijk,
|  | typename AccessorT::ValueType | isovalue,
|  | const int | dim
| ) |  |
| inline

bool openvdb::v3_1_0::tools::internal::isPlanarQuad | ( | const Vec3d & | p0,
|  | const Vec3d & | p1,
|  | const Vec3d & | p2,
|  | const Vec3d & | p3,
|  | double | epsilon = `0.001`
| ) |  |
| inline

int openvdb::v3_1_0::tools::internal::matchEdgeGroup | ( | unsigned char | groupId,
|  | unsigned char | lhsSigns,
|  | unsigned char | rhsSigns
| ) |  |
| inline

Given a sign configuration `lhsSigns` and an edge group `groupId`, finds the corresponding edge group in a different sign configuration `rhsSigns`. Returns -1 if no match is found.

void openvdb::v3_1_0::tools::internal::mergeVoxels | ( | LeafType & | leaf,
|  | const Coord & | start,
|  | int | dim,
|  | int | regionId
| ) |  |
| inline

bool openvdb::v3_1_0::tools::internal::needsActiveVoxePadding | ( | const LeafManagerT & | leafs,
|  | double | iso,
|  | double | voxelSize
| ) |  |
| inline

uint32_t openvdb::v3_1_0::tools::internal::packPoint | ( | const Vec3d & | v | ) |
| inline

Utility methods for point quantization.

std::vector<typename GridType::Ptr> openvdb::v3_1_0::tools::internal::segment | ( | GridType & | grid,
|  | InterruptType * | interrupter = `NULL`
| ) |  |
| inline

Segmentation scheme, splits disjoint fragments into separate grids.

Note
  This is a temporary solution and it will be replaced soon.

void openvdb::v3_1_0::tools::internal::tileData | ( | const DistTreeT & | distTree,
|  | SignTreeT & | signTree,
|  | IdxTreeT & | idxTree,
|  | double | iso
| ) |  |
| inline

Vec3d openvdb::v3_1_0::tools::internal::unpackPoint | ( | uint32_t | data | ) |
| inline

Utility methods for point quantization.

## Variable Documentation

const bool sAdaptable[256]

Initial value:
= {
1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,
1,0,1,1,0,0,1,1,0,0,0,1,0,0,1,1,1,1,1,1,0,0,1,1,0,1,0,1,0,0,0,1,
1,0,0,0,1,0,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,0,1,1,1,0,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,1,
1,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1,1,0,1,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,0,1,0,0,0,1,
1,0,0,0,1,0,1,0,1,1,0,0,1,1,1,1,1,1,0,0,1,0,0,0,1,1,0,0,1,1,0,1,
1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,1,1,1,1,1}

Used to quickly determine if a given cell is adaptable.

const unsigned char sAmbiguousFace[256]

Initial value:
= {
0,0,0,0,0,5,0,0,0,0,5,0,0,0,0,0,0,0,1,0,0,5,1,0,4,0,0,0,4,0,0,0,
0,1,0,0,2,0,0,0,0,1,5,0,2,0,0,0,0,0,0,0,2,0,0,0,4,0,0,0,0,0,0,0,
0,0,2,2,0,5,0,0,3,3,0,0,0,0,0,0,6,6,0,0,6,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,4,0,4,3,0,3,0,0,0,5,0,0,0,0,0,0,0,1,0,3,0,0,0,0,0,0,0,0,0,0,0,
6,0,6,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,4,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}

Contains the ambiguous face index for certain cell configuration.

const unsigned char sEdgeGroupTable[256][13]

Lookup table for different cell sign configurations. The first entry specifies the total number of points that need to be generated inside a cell and the remaining 12 entries indicate different edge groups.