diff --git a/examples/glEvalLimit/particles.cpp b/examples/glEvalLimit/particles.cpp index 3e706ac1..2f8904a0 100644 --- a/examples/glEvalLimit/particles.cpp +++ b/examples/glEvalLimit/particles.cpp @@ -33,7 +33,7 @@ STParticles::STParticles(Refiner const & refiner, int nparticles, bool centered) OpenSubdiv::Far::PtexIndices ptexIndices(refiner); - int nptexfaces = ptexIndices.GetNumPtexFaces(), + int nptexfaces = ptexIndices.GetNumFaces(), nsamples = nptexfaces * nparticles; srand(static_cast(2147483647)); @@ -80,12 +80,12 @@ STParticles::STParticles(Refiner const & refiner, int nparticles, bool centered) refiner.GetFaceVertices(0, face); if (fverts.size()==4) { - ptexIndices.GetPtexAdjacency(refiner, face, 0, adjfaces, adjedges); + ptexIndices.GetAdjacency(refiner, face, 0, adjfaces, adjedges); _adjacency[ptexface] = FaceInfo(adjfaces, adjedges, false); ++ptexface; } else { for (int vert=0; vert ptexIndexToFaceMapping(numPtexFaces); diff --git a/examples/glStencilViewer/glStencilViewer.cpp b/examples/glStencilViewer/glStencilViewer.cpp index 950275ee..63fdeca0 100644 --- a/examples/glStencilViewer/glStencilViewer.cpp +++ b/examples/glStencilViewer/glStencilViewer.cpp @@ -329,7 +329,7 @@ createMesh(ShapeDesc const & shapeDesc, int level) { } Far::PtexIndices ptexIndices(*refiner); - int nfaces = ptexIndices.GetNumPtexFaces(); + int nfaces = ptexIndices.GetNumFaces(); float * u = new float[g_nsamples*nfaces], * uPtr = u, * v = new float[g_nsamples*nfaces], * vPtr = v; diff --git a/opensubdiv/far/patchTablesFactory.cpp b/opensubdiv/far/patchTablesFactory.cpp index 20e8e5c3..fe8728c1 100644 --- a/opensubdiv/far/patchTablesFactory.cpp +++ b/opensubdiv/far/patchTablesFactory.cpp @@ -684,7 +684,7 @@ PatchTablesFactoryBase::computePatchParam( faceIndex = parentFaceIndex; } - Vtr::Index ptexIndex = ptexIndices.GetPtexIndex(faceIndex); + Vtr::Index ptexIndex = ptexIndices.GetFaceId(faceIndex); assert(ptexIndex!=-1); if (nonquad) { @@ -764,7 +764,7 @@ PatchTablesFactoryBase::createUniform(TopologyRefiner const & refiner, Options o // PatchTables * tables = new PatchTables(maxvalence); - tables->_numPtexFaces = ptexIndices.GetNumPtexFaces(); + tables->_numPtexFaces = ptexIndices.GetNumFaces(); tables->reservePatchArrays(nlevels); @@ -938,7 +938,7 @@ PatchTablesFactoryT::createAdaptive(TopologyRefiner const & refi context.patchInventory.getValue(desc), &voffset, &poffset, &qoffset ); } - context.tables->_numPtexFaces = ptexIndices.GetNumPtexFaces(); + context.tables->_numPtexFaces = ptexIndices.GetNumFaces(); // Allocate various tables bool hasSharpness = context.options.useSingleCreasePatch; diff --git a/opensubdiv/far/ptexIndices.cpp b/opensubdiv/far/ptexIndices.cpp index 379ff898..58e1f775 100644 --- a/opensubdiv/far/ptexIndices.cpp +++ b/opensubdiv/far/ptexIndices.cpp @@ -73,12 +73,12 @@ PtexIndices::initializePtexIndices(TopologyRefiner const &refiner) { } int -PtexIndices::GetNumPtexFaces() const { +PtexIndices::GetNumFaces() const { return _ptexIndices.back(); } int -PtexIndices::GetPtexIndex(Index f) const { +PtexIndices::GetFaceId(Index f) const { assert(f<(int)_ptexIndices.size()); return _ptexIndices[f]; } @@ -96,7 +96,7 @@ namespace { } void -PtexIndices::GetPtexAdjacency( +PtexIndices::GetAdjacency( TopologyRefiner const &refiner, int face, int quadrant, int adjFaces[4], int adjEdges[4]) const { diff --git a/opensubdiv/far/ptexIndices.h b/opensubdiv/far/ptexIndices.h index 92be3f20..9de0459a 100644 --- a/opensubdiv/far/ptexIndices.h +++ b/opensubdiv/far/ptexIndices.h @@ -60,11 +60,11 @@ public: /// \brief Returns the number of ptex faces in the mesh /// - int GetNumPtexFaces() const; + int GetNumFaces() const; /// \brief Returns the ptex face index given a coarse face 'f' or -1 /// - int GetPtexIndex(Index f) const; + int GetFaceId(Index f) const; /// \brief Returns ptex face adjacency information for a given coarse face /// @@ -80,7 +80,7 @@ public: /// /// @param adjEdges ptex edge indices of adjacent faces /// - void GetPtexAdjacency( + void GetAdjacency( TopologyRefiner const &refiner, int face, int quadrant, int adjFaces[4], int adjEdges[4]) const; diff --git a/tutorials/far/tutorial_6/far_tutorial_6.cpp b/tutorials/far/tutorial_6/far_tutorial_6.cpp index f365a40c..176881c6 100644 --- a/tutorials/far/tutorial_6/far_tutorial_6.cpp +++ b/tutorials/far/tutorial_6/far_tutorial_6.cpp @@ -166,7 +166,7 @@ int main(int, char **) { // Generate random samples on each ptex face int nsamples = 200, - nfaces = ptexIndices.GetNumPtexFaces(); + nfaces = ptexIndices.GetNumFaces(); std::vector samples(nsamples * nfaces);