Fix a bug in limit stencil table creation

LimitStencilTableFactory::Create was returning fewer number of
stencils, off by the number of coarse vertices.
This commit is contained in:
Takahito Tejima 2015-06-09 17:07:18 -07:00
parent e7e1accade
commit 5bf1c3a396
2 changed files with 2 additions and 4 deletions

View File

@ -69,7 +69,7 @@ namespace {
for ( size_t i=start; i<offsets->size(); i++ ) {
// Once we've copied out all the control verts, jump to the offset
// where the actual stencils begin.
if ((int)i == numControlVerts)
if (includeCoarseVerts and (int)i == numControlVerts)
i = firstOffset;
// Copy the stencil.

View File

@ -453,8 +453,6 @@ LimitStencilTableFactory::Create(TopologyRefiner const & refiner,
//
// Copy the proto-stencils into the limit stencil table
//
size_t firstOffset = refiner.GetLevel(0).GetNumVertices();
LimitStencilTable * result = new LimitStencilTable(
refiner.GetLevel(0).GetNumVertices(),
builder.GetStencilOffsets(),
@ -464,7 +462,7 @@ LimitStencilTableFactory::Create(TopologyRefiner const & refiner,
builder.GetStencilDuWeights(),
builder.GetStencilDvWeights(),
/*ctrlVerts*/false,
firstOffset);
/*fristOffset*/0);
return result;
}