mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-23 20:20:09 +00:00
Merge pull request #932 from barfowl/wshadow_far
Removed shadowing warnings from source for core libraries
This commit is contained in:
commit
8e426be369
@ -360,14 +360,14 @@ EndCapBSplineBasisPatchFactory::getPatchPoints(
|
||||
int intFaceInVFaces = (thisFaceInVFaces + 2) & 0x3;
|
||||
Index intFace = vFaces[intFaceInVFaces];
|
||||
int vInIntFace = vInFaces[intFaceInVFaces];
|
||||
ConstIndexArray facePoints = level->getFaceVertices(intFace);
|
||||
ConstIndexArray intFacePoints = level->getFaceVertices(intFace);
|
||||
|
||||
patchPoints[pointIndex++] =
|
||||
facePoints[(vInIntFace + 1)&3] + levelVertOffset;
|
||||
intFacePoints[(vInIntFace + 1)&3] + levelVertOffset;
|
||||
patchPoints[pointIndex++] =
|
||||
facePoints[(vInIntFace + 2)&3] + levelVertOffset;
|
||||
intFacePoints[(vInIntFace + 2)&3] + levelVertOffset;
|
||||
patchPoints[pointIndex++] =
|
||||
facePoints[(vInIntFace + 3)&3] + levelVertOffset;
|
||||
intFacePoints[(vInIntFace + 3)&3] + levelVertOffset;
|
||||
} else {
|
||||
// irregular corner
|
||||
int thisFaceInVFaces = vFaces.FindIndex(thisFace);
|
||||
@ -377,9 +377,9 @@ EndCapBSplineBasisPatchFactory::getPatchPoints(
|
||||
int intFaceInVFaces = (thisFaceInVFaces + 1) % valence;
|
||||
Index intFace = vFaces[intFaceInVFaces];
|
||||
int vInIntFace = vInFaces[intFaceInVFaces];
|
||||
ConstIndexArray facePoints = level->getFaceVertices(intFace);
|
||||
ConstIndexArray intFacePoints = level->getFaceVertices(intFace);
|
||||
patchPoints[pointIndex++] =
|
||||
facePoints[(vInIntFace+3)&3] + levelVertOffset;
|
||||
intFacePoints[(vInIntFace+3)&3] + levelVertOffset;
|
||||
}
|
||||
{
|
||||
// middle: (n-vertices) needs a limit stencil. skip for now
|
||||
@ -390,9 +390,9 @@ EndCapBSplineBasisPatchFactory::getPatchPoints(
|
||||
int intFaceInVFaces = (thisFaceInVFaces + (valence-1)) %valence;
|
||||
Index intFace = vFaces[intFaceInVFaces];
|
||||
int vInIntFace = vInFaces[intFaceInVFaces];
|
||||
ConstIndexArray facePoints = level->getFaceVertices(intFace);
|
||||
ConstIndexArray intFacePoints = level->getFaceVertices(intFace);
|
||||
patchPoints[pointIndex++] =
|
||||
facePoints[(vInIntFace+1)&3] + levelVertOffset;
|
||||
intFacePoints[(vInIntFace+1)&3] + levelVertOffset;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -144,8 +144,8 @@ EndCapGregoryBasisPatchFactory::GetPatchPoints(
|
||||
// Simple struct with encoding of <level,face> index as an unsigned int and a
|
||||
// comparison method for use with std::bsearch
|
||||
struct LevelAndFaceIndex {
|
||||
static inline unsigned int create(unsigned int levelIndex, Index faceIndex) {
|
||||
return (levelIndex << 28) | (unsigned int) faceIndex;
|
||||
static inline unsigned int create(unsigned int levelIndexArg, Index faceIndexArg) {
|
||||
return (levelIndexArg << 28) | (unsigned int) faceIndexArg;
|
||||
}
|
||||
static int compare(void const * a, void const * b) {
|
||||
return *(unsigned int const*)a - *(unsigned int const*)b;
|
||||
|
@ -235,8 +235,8 @@ public:
|
||||
: faceIndex(Vtr::INDEX_INVALID), levelIndex(-1) { }
|
||||
PatchTuple(PatchTuple const & p)
|
||||
: faceIndex(p.faceIndex), levelIndex(p.levelIndex) { }
|
||||
PatchTuple(Index faceIndex, int levelIndex)
|
||||
: faceIndex(faceIndex), levelIndex(levelIndex) { }
|
||||
PatchTuple(Index faceIndexArg, int levelIndexArg)
|
||||
: faceIndex(faceIndexArg), levelIndex(levelIndexArg) { }
|
||||
|
||||
Index faceIndex;
|
||||
int levelIndex;
|
||||
|
@ -417,15 +417,15 @@ LimitStencilTableFactory::Create(TopologyRefiner const & refiner,
|
||||
// regular patches, such as in a torus)
|
||||
// note: the control vertices of the mesh are added as single-index
|
||||
// stencils of weight 1.0f
|
||||
StencilTableFactory::Options options;
|
||||
options.generateIntermediateLevels = uniform ? false :true;
|
||||
options.generateControlVerts = true;
|
||||
options.generateOffsets = true;
|
||||
StencilTableFactory::Options stencilTableOptions;
|
||||
stencilTableOptions.generateIntermediateLevels = uniform ? false :true;
|
||||
stencilTableOptions.generateControlVerts = true;
|
||||
stencilTableOptions.generateOffsets = true;
|
||||
|
||||
// PERFORMANCE: We could potentially save some mem-copies by not
|
||||
// instantiating the stencil tables and work directly off the source
|
||||
// data.
|
||||
cvstencils = StencilTableFactory::Create(refiner, options);
|
||||
cvstencils = StencilTableFactory::Create(refiner, stencilTableOptions);
|
||||
} else {
|
||||
// Sanity checks
|
||||
//
|
||||
@ -447,13 +447,13 @@ LimitStencilTableFactory::Create(TopologyRefiner const & refiner,
|
||||
// have been added to the refiner, maybe we can remove the need for the
|
||||
// patch table.
|
||||
|
||||
PatchTableFactory::Options options;
|
||||
options.SetEndCapType(
|
||||
PatchTableFactory::Options patchTableOptions;
|
||||
patchTableOptions.SetEndCapType(
|
||||
Far::PatchTableFactory::Options::ENDCAP_GREGORY_BASIS);
|
||||
options.useInfSharpPatch = !uniform &&
|
||||
patchTableOptions.useInfSharpPatch = !uniform &&
|
||||
refiner.GetAdaptiveOptions().useInfSharpPatch;
|
||||
|
||||
patchtable = PatchTableFactory::Create(refiner, options);
|
||||
patchtable = PatchTableFactory::Create(refiner, patchTableOptions);
|
||||
|
||||
if (! cvStencilsIn) {
|
||||
// if cvstencils is just created above, append endcap stencils
|
||||
|
Loading…
Reference in New Issue
Block a user