Renamed methods on Far::PtexIndices.

GetNumPtexFaces() became GetNumFaces()
GetPtexIndex() became GetFaceId()
GetPtexAdjacency() became GetAdjacency()
This commit is contained in:
George ElKoura 2015-04-21 22:23:22 -07:00
parent bded4cb075
commit 0371a3aa5f
8 changed files with 16 additions and 16 deletions

View File

@ -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<int>(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<fverts.size(); ++vert) {
ptexIndices.GetPtexAdjacency(refiner, face, vert, adjfaces, adjedges);
ptexIndices.GetAdjacency(refiner, face, vert, adjfaces, adjedges);
_adjacency[ptexface+vert] =
FaceInfo(adjfaces, adjedges, true);
}

View File

@ -231,7 +231,7 @@ createOsdMesh() {
// count ptex face id
OpenSubdiv::Far::PtexIndices ptexIndices(*refiner);
int numPtexFaces = ptexIndices.GetNumPtexFaces();
int numPtexFaces = ptexIndices.GetNumFaces();
delete g_mesh;
g_mesh = NULL;

View File

@ -590,7 +590,7 @@ createOsdMesh( const std::string &shapeStr, int level, Scheme scheme=kCatmark )
// create ptex index to coarse face index mapping
Far::PtexIndices ptexIndices(*refiner);
int numPtexFaces = ptexIndices.GetNumPtexFaces();
int numPtexFaces = ptexIndices.GetNumFaces();
// XXX: duped logic to simpleHbr
std::vector<int> ptexIndexToFaceMapping(numPtexFaces);

View File

@ -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;

View File

@ -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<ENDCAP_FACTORY>::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;

View File

@ -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 {

View File

@ -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;

View File

@ -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<LimitFrame> samples(nsamples * nfaces);