Skip to content

Commit 57ec495

Browse files
committed
Describe the floodfill algorithm.
Signed-off-by: Jeff Lait <jlait@andorra.sidefx.com>
1 parent 1bd822e commit 57ec495

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

openvdb/openvdb/tools/MeshToVolume.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3145,6 +3145,18 @@ template <typename T, Index Log2Dim, typename InteriorTest>
31453145
void
31463146
floodFillLeafNode(tree::LeafNode<T,Log2Dim>& leafNode, const InteriorTest& interiorTest) {
31473147

3148+
// Floods fills a single leaf node.
3149+
// Starts with all voxels in NOT_VISITED.
3150+
// Final result is voxels in either POSITIVE, NEGATIVE, or NOT_ASSIGNED.
3151+
// Voxels that were categorized as NEGATIVE are negated.
3152+
// The NOT_ASSIGNED is all voxels within 0.75 of the zero-crossing.
3153+
//
3154+
// NOT_VISITED voxels, if outside the 0.75 band, will query the oracle
3155+
// to get a POSITIVE Or NEGATIVE sign (with interior being POSITIVE!)
3156+
//
3157+
// After setting a NOT_VISITED to either POSITIVE or NEGATIVE, an 8-way
3158+
// depth-first floodfill is done, stopping at either the 0.75 boundary
3159+
// or visited voxels.
31483160
enum VoxelState {
31493161
NOT_VISITED = 0,
31503162
POSITIVE = 1,

0 commit comments

Comments
 (0)