Add protected accessor to return patch index in Far::PatchTables

This commit is contained in:
manuelk 2015-01-28 15:50:23 -08:00
parent 222f95d6c3
commit 446aa492b7
2 changed files with 7 additions and 0 deletions

View File

@ -127,6 +127,12 @@ PatchTables::pushPatchArray(PatchDescriptor desc, int npatches,
}
}
Index
PatchTables::getPatchIndex(int arrayIndex, int patchIndex) const {
PatchArray const & pa = getPatchArray(arrayIndex);
assert(patchIndex<pa.numPatches);
return pa.patchIndex + patchIndex;
}
Index *
PatchTables::getSharpnessIndices(int arrayIndex) {
return &_sharpnessIndices[getPatchArray(arrayIndex).patchIndex];

View File

@ -441,6 +441,7 @@ protected:
Index findPatchArray(PatchDescriptor desc);
Index getPatchIndex(int array, int patch) const;
IndexArray getPatchArrayVertices(int arrayIndex);
PatchParamArray getPatchParams(int arrayIndex);