Fixed naming inconsistencies in Far::PatchTable

The methods which return arrays of FVarPatchParam have
been made plural, e.g. GetFVarPatchParams(), for consistency
with the other methods in PatchTable.

Also fixed a missing doxygen tag.
This commit is contained in:
David G Yu 2016-10-11 17:07:14 -07:00
parent ffdb32cbac
commit df5d01ad3c
5 changed files with 11 additions and 9 deletions

View File

@ -213,7 +213,7 @@ struct FVarData
glDeleteBuffers(1, &buffer); glDeleteBuffers(1, &buffer);
Far::ConstPatchParamArray fvarParam = patchTable->GetFVarPatchParam(); Far::ConstPatchParamArray fvarParam = patchTable->GetFVarPatchParams();
glGenBuffers(1, &buffer); glGenBuffers(1, &buffer);
glBindBuffer(GL_ARRAY_BUFFER, buffer); glBindBuffer(GL_ARRAY_BUFFER, buffer);

View File

@ -538,18 +538,18 @@ PatchTable::GetPatchFVarPatchParam(int arrayIndex, int patchIndex, int channel)
return getPatchFVarPatchParam(getPatchIndex(arrayIndex, patchIndex), channel); return getPatchFVarPatchParam(getPatchIndex(arrayIndex, patchIndex), channel);
} }
ConstPatchParamArray ConstPatchParamArray
PatchTable::GetPatchArrayFVarPatchParam(int array, int channel) const { PatchTable::GetPatchArrayFVarPatchParams(int array, int channel) const {
PatchArray const & pa = getPatchArray(array); PatchArray const & pa = getPatchArray(array);
FVarPatchChannel const & c = getFVarPatchChannel(channel); FVarPatchChannel const & c = getFVarPatchChannel(channel);
return ConstPatchParamArray(&c.patchParam[pa.patchIndex], pa.numPatches); return ConstPatchParamArray(&c.patchParam[pa.patchIndex], pa.numPatches);
} }
ConstPatchParamArray ConstPatchParamArray
PatchTable::GetFVarPatchParam(int channel) const { PatchTable::GetFVarPatchParams(int channel) const {
FVarPatchChannel const & c = getFVarPatchChannel(channel); FVarPatchChannel const & c = getFVarPatchChannel(channel);
return ConstPatchParamArray(&c.patchParam[0], (int)c.patchParam.size()); return ConstPatchParamArray(&c.patchParam[0], (int)c.patchParam.size());
} }
PatchParamArray PatchParamArray
PatchTable::getFVarPatchParam(int channel) { PatchTable::getFVarPatchParams(int channel) {
FVarPatchChannel & c = getFVarPatchChannel(channel); FVarPatchChannel & c = getFVarPatchChannel(channel);
return PatchParamArray(&c.patchParam[0], (int)c.patchParam.size()); return PatchParamArray(&c.patchParam[0], (int)c.patchParam.size());
} }

View File

@ -208,6 +208,8 @@ public:
/// @param dst Destination buffer for the computed local point /// @param dst Destination buffer for the computed local point
/// face-varying values /// face-varying values
/// ///
/// @param channel face-varying channel
///
/// ///
template <class T> void template <class T> void
ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel = 0) const; ComputeLocalPointValuesFaceVarying(T const *src, T *dst, int channel = 0) const;
@ -321,10 +323,10 @@ public:
PatchParam GetPatchFVarPatchParam(int array, int patch, int channel = 0) const; PatchParam GetPatchFVarPatchParam(int array, int patch, int channel = 0) const;
/// \brief Returns the face-varying for a given patch in \p array in \p channel /// \brief Returns the face-varying for a given patch in \p array in \p channel
ConstPatchParamArray GetPatchArrayFVarPatchParam(int array, int channel = 0) const; ConstPatchParamArray GetPatchArrayFVarPatchParams(int array, int channel = 0) const;
/// \brief Returns an array of face-varying patch param for \p channel /// \brief Returns an array of face-varying patch param for \p channel
ConstPatchParamArray GetFVarPatchParam(int channel = 0) const; ConstPatchParamArray GetFVarPatchParams(int channel = 0) const;
//@} //@}
@ -513,7 +515,7 @@ private:
IndexArray getFVarValues(int channel); IndexArray getFVarValues(int channel);
ConstIndexArray getPatchFVarValues(int patch, int channel) const; ConstIndexArray getPatchFVarValues(int patch, int channel) const;
PatchParamArray getFVarPatchParam(int channel); PatchParamArray getFVarPatchParams(int channel);
PatchParam getPatchFVarPatchParam(int patch, int channel) const; PatchParam getPatchFVarPatchParam(int patch, int channel) const;
private: private:

View File

@ -1262,7 +1262,7 @@ PatchTableFactory::populateAdaptivePatches(
int ofs = pidx * desc.GetNumControlVertices(); int ofs = pidx * desc.GetNumControlVertices();
arrayBuilder.fptr[fvc] = &table->getFVarValues(fvc)[ofs]; arrayBuilder.fptr[fvc] = &table->getFVarValues(fvc)[ofs];
arrayBuilder.fpptr[fvc] = &table->getFVarPatchParam(fvc)[pidx]; arrayBuilder.fpptr[fvc] = &table->getFVarPatchParams(fvc)[pidx];
} }
} }
} }

View File

@ -96,7 +96,7 @@ CpuPatchTable::CpuPatchTable(const Far::PatchTable *farPatchTable) {
// face-varying param // face-varying param
Far::ConstPatchParamArray Far::ConstPatchParamArray
fvarParam = farPatchTable->GetPatchArrayFVarPatchParam(j, fvc); fvarParam = farPatchTable->GetPatchArrayFVarPatchParams(j, fvc);
for (int k = 0; k < numPatches; ++k) { for (int k = 0; k < numPatches; ++k) {
PatchParam param; PatchParam param;
//param.patchParam = patchParamTable[patchIndex]; //param.patchParam = patchParamTable[patchIndex];