Skip to content

Commit 7501b4d

Browse files
Version 2.0.0 prerelease
1 parent a042e4f commit 7501b4d

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

openvdb/tools/VolumeToMesh.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ struct AdaptivePrimBuilder
24492449
template<typename SignAccT, typename IdxAccT, typename PrimBuilder>
24502450
inline void
24512451
constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord& ijk,
2452-
const SignAccT& signAcc, const IdxAccT& idxAcc, PrimBuilder& mesher, size_t pointListSize)
2452+
const SignAccT& signAcc, const IdxAccT& idxAcc, PrimBuilder& mesher, Index32 pointListSize)
24532453
{
24542454
char tag[2];
24552455
tag[0] = (flags & SEAM) ? POLYFLAG_FRACTURE_SEAM : 0;
@@ -2460,7 +2460,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
24602460
Coord coord;
24612461
openvdb::Vec4I quad;
24622462
unsigned char cell;
2463-
int tmpIdx = 0;
2463+
Index32 tmpIdx = 0;
24642464

24652465
if (flags & XEDGE) {
24662466

@@ -2470,7 +2470,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
24702470

24712471
cell = SIGNS & signAcc.getValue(coord);
24722472
if (sEdgeGroupTable[cell][0] > 1) {
2473-
tmpIdx = quad[1] + (sEdgeGroupTable[cell][5] - 1);
2473+
tmpIdx = quad[1] + Index32(sEdgeGroupTable[cell][5] - 1);
24742474
if (tmpIdx < pointListSize) quad[1] = tmpIdx;
24752475
}
24762476

@@ -2479,7 +2479,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
24792479

24802480
cell = SIGNS & signAcc.getValue(coord);
24812481
if (sEdgeGroupTable[cell][0] > 1) {
2482-
tmpIdx = quad[2] + (sEdgeGroupTable[cell][7] - 1);
2482+
tmpIdx = quad[2] + Index32(sEdgeGroupTable[cell][7] - 1);
24832483
if (tmpIdx < pointListSize) quad[2] = tmpIdx;
24842484
}
24852485

@@ -2488,7 +2488,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
24882488

24892489
cell = SIGNS & signAcc.getValue(coord);
24902490
if (sEdgeGroupTable[cell][0] > 1) {
2491-
tmpIdx = quad[3] + (sEdgeGroupTable[cell][3] - 1);
2491+
tmpIdx = quad[3] + Index32(sEdgeGroupTable[cell][3] - 1);
24922492
if (tmpIdx < pointListSize) quad[3] = tmpIdx;
24932493
}
24942494

@@ -2504,7 +2504,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
25042504

25052505
cell = SIGNS & signAcc.getValue(coord);
25062506
if (sEdgeGroupTable[cell][0] > 1) {
2507-
tmpIdx = quad[1] + (sEdgeGroupTable[cell][12] - 1);
2507+
tmpIdx = quad[1] + Index32(sEdgeGroupTable[cell][12] - 1);
25082508
if (tmpIdx < pointListSize) quad[1] = tmpIdx;
25092509
}
25102510

@@ -2513,7 +2513,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
25132513

25142514
cell = SIGNS & signAcc.getValue(coord);
25152515
if (sEdgeGroupTable[cell][0] > 1) {
2516-
tmpIdx = quad[2] + (sEdgeGroupTable[cell][11] - 1);
2516+
tmpIdx = quad[2] + Index32(sEdgeGroupTable[cell][11] - 1);
25172517
if (tmpIdx < pointListSize) quad[2] = tmpIdx;
25182518
}
25192519

@@ -2522,7 +2522,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
25222522

25232523
cell = SIGNS & signAcc.getValue(coord);
25242524
if (sEdgeGroupTable[cell][0] > 1) {
2525-
tmpIdx = quad[3] + (sEdgeGroupTable[cell][10] - 1);
2525+
tmpIdx = quad[3] + Index32(sEdgeGroupTable[cell][10] - 1);
25262526
if (tmpIdx < pointListSize) quad[3] = tmpIdx;
25272527
}
25282528

@@ -2538,7 +2538,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
25382538

25392539
cell = SIGNS & signAcc.getValue(coord);
25402540
if (sEdgeGroupTable[cell][0] > 1) {
2541-
tmpIdx = quad[1] + (sEdgeGroupTable[cell][8] - 1);
2541+
tmpIdx = quad[1] + Index32(sEdgeGroupTable[cell][8] - 1);
25422542
if (tmpIdx < pointListSize) quad[1] = tmpIdx;
25432543
}
25442544

@@ -2547,7 +2547,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
25472547

25482548
cell = SIGNS & signAcc.getValue(coord);
25492549
if (sEdgeGroupTable[cell][0] > 1) {
2550-
tmpIdx = quad[2] + (sEdgeGroupTable[cell][6] - 1);
2550+
tmpIdx = quad[2] + Index32(sEdgeGroupTable[cell][6] - 1);
25512551
if (tmpIdx < pointListSize) quad[2] = tmpIdx;
25522552
}
25532553

@@ -2556,7 +2556,7 @@ constructPolygons(Int16 flags, Int16 refFlags, const Vec4i& offsets, const Coord
25562556

25572557
cell = SIGNS & signAcc.getValue(coord);
25582558
if (sEdgeGroupTable[cell][0] > 1) {
2559-
tmpIdx = quad[3] + (sEdgeGroupTable[cell][2] - 1);
2559+
tmpIdx = quad[3] + Index32(sEdgeGroupTable[cell][2] - 1);
25602560
if (tmpIdx < pointListSize) quad[3] = tmpIdx;
25612561
}
25622562

@@ -2582,7 +2582,7 @@ class GenPolygons
25822582

25832583

25842584
GenPolygons(const LeafManagerT& signLeafs, const Int16TreeT& signTree,
2585-
const IntTreeT& idxTree, PolygonPoolList& polygons, size_t pointListSize);
2585+
const IntTreeT& idxTree, PolygonPoolList& polygons, Index32 pointListSize);
25862586

25872587
void run(bool threaded = true);
25882588

@@ -2599,7 +2599,7 @@ class GenPolygons
25992599
const Int16TreeT& mSignTree;
26002600
const IntTreeT& mIdxTree;
26012601
const PolygonPoolList& mPolygonPoolList;
2602-
const size_t mPointListSize;
2602+
const Index32 mPointListSize;
26032603

26042604
const Int16TreeT *mRefSignTree;
26052605
};
@@ -2608,7 +2608,7 @@ class GenPolygons
26082608
template<typename LeafManagerT, typename PrimBuilder>
26092609
GenPolygons<LeafManagerT, PrimBuilder>::GenPolygons(const LeafManagerT& signLeafs,
26102610
const Int16TreeT& signTree, const IntTreeT& idxTree, PolygonPoolList& polygons,
2611-
size_t pointListSize)
2611+
Index32 pointListSize)
26122612
: mSignLeafs(signLeafs)
26132613
, mSignTree(signTree)
26142614
, mIdxTree(idxTree)
@@ -4275,15 +4275,15 @@ VolumeToMesh::operator()(const GridT& distGrid)
42754275
if (adaptive) {
42764276

42774277
internal::GenPolygons<Int16LeafManagerT, internal::AdaptivePrimBuilder>
4278-
mesher(signLeafs, *signTreePt, *idxTreePt, mPolygons, mPointListSize);
4278+
mesher(signLeafs, *signTreePt, *idxTreePt, mPolygons, Index32(mPointListSize));
42794279

42804280
mesher.setRefSignTree(refSignTreePt);
42814281
mesher.run();
42824282

42834283
} else {
42844284

42854285
internal::GenPolygons<Int16LeafManagerT, internal::UniformPrimBuilder>
4286-
mesher(signLeafs, *signTreePt, *idxTreePt, mPolygons, mPointListSize);
4286+
mesher(signLeafs, *signTreePt, *idxTreePt, mPolygons, Index32(mPointListSize));
42874287

42884288
mesher.setRefSignTree(refSignTreePt);
42894289
mesher.run();

0 commit comments

Comments
 (0)