From 5a51f3110495b9d569a1c24b16fe96ddb58103c4 Mon Sep 17 00:00:00 2001 From: George ElKoura Date: Sat, 30 May 2015 22:10:07 -0700 Subject: [PATCH] Remove mention of vtr from tests and examples. - Renamed common/vtr_utils to common/far_utils. - Renamed all mentions of Vtr in the sources of tests and examples. --- examples/dxPtexViewer/CMakeLists.txt | 2 +- examples/dxPtexViewer/dxPtexViewer.cpp | 4 +- examples/dxViewer/CMakeLists.txt | 2 +- examples/dxViewer/dxviewer.cpp | 4 +- examples/farViewer/farViewer.cpp | 2 +- examples/farViewer/gl_mesh.h | 2 +- examples/glEvalLimit/glEvalLimit.cpp | 4 +- examples/glFVarViewer/CMakeLists.txt | 2 +- examples/glFVarViewer/glFVarViewer.cpp | 4 +- examples/glImaging/glImaging.cpp | 4 +- examples/glPaintTest/glPaintTest.cpp | 4 +- examples/glPtexViewer/glPtexViewer.cpp | 4 +- examples/glShareTopology/glShareTopology.cpp | 2 +- examples/glShareTopology/sceneBase.cpp | 2 +- examples/glStencilViewer/CMakeLists.txt | 2 +- examples/glStencilViewer/glStencilViewer.cpp | 4 +- examples/glViewer/CMakeLists.txt | 2 +- examples/glViewer/glViewer.cpp | 4 +- regression/common/CMakeLists.txt | 8 ++-- regression/common/cmp_utils.h | 14 +++---- .../common/{vtr_utils.cpp => far_utils.cpp} | 2 +- .../common/{vtr_utils.h => far_utils.h} | 14 +++---- regression/far_regression/far_regression.cpp | 40 +++++++++---------- regression/osd_regression/main.cpp | 12 +++--- 24 files changed, 72 insertions(+), 72 deletions(-) rename regression/common/{vtr_utils.cpp => far_utils.cpp} (99%) rename regression/common/{vtr_utils.h => far_utils.h} (97%) diff --git a/examples/dxPtexViewer/CMakeLists.txt b/examples/dxPtexViewer/CMakeLists.txt index 0a3017b0..617f93a4 100644 --- a/examples/dxPtexViewer/CMakeLists.txt +++ b/examples/dxPtexViewer/CMakeLists.txt @@ -56,7 +56,7 @@ _add_possibly_cuda_executable(dxPtexViewer WIN32 "${SOURCE_FILES}" "${INC_FILES}" $ - $ + $ $ ) diff --git a/examples/dxPtexViewer/dxPtexViewer.cpp b/examples/dxPtexViewer/dxPtexViewer.cpp index 65bad169..66dd80ca 100644 --- a/examples/dxPtexViewer/dxPtexViewer.cpp +++ b/examples/dxPtexViewer/dxPtexViewer.cpp @@ -61,7 +61,7 @@ OpenSubdiv::Osd::D3D11MeshInterface *g_mesh; #include "Ptexture.h" #include "PtexUtils.h" -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/d3d11Hud.h" @@ -697,7 +697,7 @@ createOsdMesh(int level, int kernel) { typedef OpenSubdiv::Far::ConstIndexArray IndexArray; - // create Vtr mesh (topology) + // create Far mesh (topology) OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/dxViewer/CMakeLists.txt b/examples/dxViewer/CMakeLists.txt index e353a527..77205c8e 100644 --- a/examples/dxViewer/CMakeLists.txt +++ b/examples/dxViewer/CMakeLists.txt @@ -63,7 +63,7 @@ _add_possibly_cuda_executable(dxViewer WIN32 "${SOURCE_FILES}" "${INC_FILES}" $ - $ + $ $ ) diff --git a/examples/dxViewer/dxviewer.cpp b/examples/dxViewer/dxviewer.cpp index ff62a942..ca520c17 100644 --- a/examples/dxViewer/dxviewer.cpp +++ b/examples/dxViewer/dxviewer.cpp @@ -60,7 +60,7 @@ OpenSubdiv::Osd::D3D11MeshInterface *g_mesh = NULL; OpenSubdiv::Osd::D3D11LegacyGregoryPatchTable *g_legacyGregoryPatchTable = NULL; -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/d3d11Hud.h" @@ -268,7 +268,7 @@ createOsdMesh(ShapeDesc const & shapeDesc, int level, int kernel, Scheme scheme= Shape * shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme); - // create Vtr mesh (topology) + // create Far mesh (topology) Sdc::SchemeType sdctype = GetSdcType(*shape); Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/farViewer/farViewer.cpp b/examples/farViewer/farViewer.cpp index 0a849250..832875a7 100644 --- a/examples/farViewer/farViewer.cpp +++ b/examples/farViewer/farViewer.cpp @@ -53,7 +53,7 @@ GLFWmonitor* g_primary=0; #include #include -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glUtils.h" diff --git a/examples/farViewer/gl_mesh.h b/examples/farViewer/gl_mesh.h index a2b1eaba..e081b2c7 100644 --- a/examples/farViewer/gl_mesh.h +++ b/examples/farViewer/gl_mesh.h @@ -25,7 +25,7 @@ #ifndef GL_MESH_H #define GL_MESH_H -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../../regression/common/hbr_utils.h" #include diff --git a/examples/glEvalLimit/glEvalLimit.cpp b/examples/glEvalLimit/glEvalLimit.cpp index ceef8a9c..bee6eb8d 100644 --- a/examples/glEvalLimit/glEvalLimit.cpp +++ b/examples/glEvalLimit/glEvalLimit.cpp @@ -79,7 +79,7 @@ GLFWmonitor* g_primary=0; #include -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" @@ -500,7 +500,7 @@ createOsdMesh(ShapeDesc const & shapeDesc, int level) { Shape * shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme); - // create Vtr mesh (topology) + // create Far mesh (topology) OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/glFVarViewer/CMakeLists.txt b/examples/glFVarViewer/CMakeLists.txt index ebafbbbf..16362361 100644 --- a/examples/glFVarViewer/CMakeLists.txt +++ b/examples/glFVarViewer/CMakeLists.txt @@ -59,7 +59,7 @@ _add_glfw_executable(glFVarViewer "${SHADER_FILES}" "${INC_FILES}" $ - $ + $ $ ) diff --git a/examples/glFVarViewer/glFVarViewer.cpp b/examples/glFVarViewer/glFVarViewer.cpp index de6679a1..d52070c9 100644 --- a/examples/glFVarViewer/glFVarViewer.cpp +++ b/examples/glFVarViewer/glFVarViewer.cpp @@ -34,7 +34,7 @@ GLFWmonitor* g_primary = 0; #include OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL; -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" @@ -341,7 +341,7 @@ createOsdMesh(ShapeDesc const & shapeDesc, int level, Scheme scheme = kCatmark) Shape * shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme); - // create Vtr mesh (topology) + // create Far mesh (topology) OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/glImaging/glImaging.cpp b/examples/glImaging/glImaging.cpp index 2318733c..6befb456 100644 --- a/examples/glImaging/glImaging.cpp +++ b/examples/glImaging/glImaging.cpp @@ -68,7 +68,7 @@ #include -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/patchColors.h" #include "../common/stb_image_write.h" // common.obj has an implementation. #include "../common/glShaderCache.h" @@ -285,7 +285,7 @@ void runTest(ShapeDesc const &shapeDesc, std::string const &kernel, Shape const * shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme); - // create Vtr mesh (topology) + // create Far mesh (topology) Sdc::SchemeType sdctype = GetSdcType(*shape); Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/glPaintTest/glPaintTest.cpp b/examples/glPaintTest/glPaintTest.cpp index c0730279..1d153f9d 100644 --- a/examples/glPaintTest/glPaintTest.cpp +++ b/examples/glPaintTest/glPaintTest.cpp @@ -36,7 +36,7 @@ GLFWmonitor* g_primary=0; #include OpenSubdiv::Osd::GLMeshInterface *g_mesh; -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" @@ -203,7 +203,7 @@ createOsdMesh() { g_orgPositions=shape->verts; - // create Vtr mesh (topology) + // create Far mesh (topology) OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/glPtexViewer/glPtexViewer.cpp b/examples/glPtexViewer/glPtexViewer.cpp index c6e239d0..e91251a9 100644 --- a/examples/glPtexViewer/glPtexViewer.cpp +++ b/examples/glPtexViewer/glPtexViewer.cpp @@ -92,7 +92,7 @@ OpenSubdiv::Osd::GLMeshInterface *g_mesh; #include "Ptexture.h" #include "PtexUtils.h" -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" @@ -888,7 +888,7 @@ createOsdMesh(int level, int kernel) { typedef OpenSubdiv::Far::ConstIndexArray IndexArray; - // create Vtr mesh (topology) + // create Far mesh (topology) OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/glShareTopology/glShareTopology.cpp b/examples/glShareTopology/glShareTopology.cpp index 5834a4c2..d2b6c82a 100644 --- a/examples/glShareTopology/glShareTopology.cpp +++ b/examples/glShareTopology/glShareTopology.cpp @@ -68,7 +68,7 @@ GLFWmonitor* g_primary=0; #endif -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "init_shapes.h" #include "../common/stopwatch.h" diff --git a/examples/glShareTopology/sceneBase.cpp b/examples/glShareTopology/sceneBase.cpp index af1bebcf..059710ab 100644 --- a/examples/glShareTopology/sceneBase.cpp +++ b/examples/glShareTopology/sceneBase.cpp @@ -24,7 +24,7 @@ #include "sceneBase.h" #include -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include #include diff --git a/examples/glStencilViewer/CMakeLists.txt b/examples/glStencilViewer/CMakeLists.txt index 1b0b5e8e..08b74d4a 100644 --- a/examples/glStencilViewer/CMakeLists.txt +++ b/examples/glStencilViewer/CMakeLists.txt @@ -47,7 +47,7 @@ _add_glfw_executable(glStencilViewer glStencilViewer.cpp "${INC_FILES}" $ - $ + $ $ ) diff --git a/examples/glStencilViewer/glStencilViewer.cpp b/examples/glStencilViewer/glStencilViewer.cpp index 414be3f2..60dadc91 100644 --- a/examples/glStencilViewer/glStencilViewer.cpp +++ b/examples/glStencilViewer/glStencilViewer.cpp @@ -28,7 +28,7 @@ GLFWwindow* g_window=0; GLFWmonitor* g_primary=0; -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" @@ -293,7 +293,7 @@ createMesh(ShapeDesc const & shapeDesc, int level) { Shape const * shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme); - // create Vtr mesh (topology) + // create Far mesh (topology) OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/examples/glViewer/CMakeLists.txt b/examples/glViewer/CMakeLists.txt index a12018af..f28496ad 100644 --- a/examples/glViewer/CMakeLists.txt +++ b/examples/glViewer/CMakeLists.txt @@ -58,7 +58,7 @@ _add_glfw_executable(glViewer "${SHADER_FILES}" "${INC_FILES}" $ - $ + $ $ ) diff --git a/examples/glViewer/glViewer.cpp b/examples/glViewer/glViewer.cpp index c32ccd85..fcd740de 100644 --- a/examples/glViewer/glViewer.cpp +++ b/examples/glViewer/glViewer.cpp @@ -72,7 +72,7 @@ GLFWmonitor* g_primary=0; OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL; OpenSubdiv::Osd::GLLegacyGregoryPatchTable *g_legacyGregoryPatchTable = NULL; -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../common/stopwatch.h" #include "../common/simple_math.h" #include "../common/glHud.h" @@ -517,7 +517,7 @@ createOsdMesh(ShapeDesc const & shapeDesc, int level, int kernel, Scheme scheme= shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme, shapeDesc.isLeftHanded); } - // create Vtr mesh (topology) + // create Far mesh (topology) Sdc::SchemeType sdctype = GetSdcType(*shape); Sdc::Options sdcoptions = GetSdcOptions(*shape); diff --git a/regression/common/CMakeLists.txt b/regression/common/CMakeLists.txt index 4e393514..ecfac3c2 100644 --- a/regression/common/CMakeLists.txt +++ b/regression/common/CMakeLists.txt @@ -30,7 +30,7 @@ set(REGRESSION_COMMON_HEADER_FILES cmp_utils.h hbr_utils.h shape_utils.h - vtr_utils.h + far_utils.h ) include_directories("${OPENSUBDIV_INCLUDE_DIR}") @@ -41,9 +41,9 @@ add_library(regression_common_obj ${REGRESSION_COMMON_HEADER_FILES} ) -add_library(regression_vtr_utils_obj +add_library(regression_far_utils_obj OBJECT - vtr_utils.cpp - vtr_utils.h + far_utils.cpp + far_utils.h ) diff --git a/regression/common/cmp_utils.h b/regression/common/cmp_utils.h index 22368f79..923b67a2 100644 --- a/regression/common/cmp_utils.h +++ b/regression/common/cmp_utils.h @@ -71,7 +71,7 @@ GetReorderedHbrVertexData( typedef OpenSubdiv::Far::ConstIndexArray ConstIndexArray; { // Populate base level - // note : topological ordering is identical between Hbr and Vtr + // note : topological ordering is identical between Hbr and Far // for the base level OpenSubdiv::Far::TopologyLevel const & refBaseLevel = refiner.GetLevel(0); @@ -89,10 +89,10 @@ GetReorderedHbrVertexData( for (int edge = 0; edge GetEdge(v1); if (not e) { @@ -160,10 +160,10 @@ GetReorderedHbrVertexData( // populate child edges for (int edge=0; edge < refLevel.GetNumEdges(); ++edge) { - ConstIndexArray vtrVerts = refLevel.GetEdgeVertices(edge); + ConstIndexArray farVerts = refLevel.GetEdgeVertices(edge); - Hvertex const * v0 = current.verts[vtrVerts[0]], - * v1 = current.verts[vtrVerts[1]]; + Hvertex const * v0 = current.verts[farVerts[0]], + * v1 = current.verts[farVerts[1]]; assert(v0 and v1); Hhalfedge * e= v0->GetEdge(v1); diff --git a/regression/common/vtr_utils.cpp b/regression/common/far_utils.cpp similarity index 99% rename from regression/common/vtr_utils.cpp rename to regression/common/far_utils.cpp index e131d8d4..bfca0978 100644 --- a/regression/common/vtr_utils.cpp +++ b/regression/common/far_utils.cpp @@ -22,7 +22,7 @@ // language governing permissions and limitations under the Apache License. // -#include "vtr_utils.h" +#include "far_utils.h" struct FVarVertex { diff --git a/regression/common/vtr_utils.h b/regression/common/far_utils.h similarity index 97% rename from regression/common/vtr_utils.h rename to regression/common/far_utils.h index 1e4054d3..ff5d7c5f 100644 --- a/regression/common/vtr_utils.h +++ b/regression/common/far_utils.h @@ -22,8 +22,8 @@ // language governing permissions and limitations under the Apache License. // -#ifndef VTR_UTILS_H -#define VTR_UTILS_H +#ifndef FAR_UTILS_H +#define FAR_UTILS_H #include #include @@ -135,13 +135,13 @@ InterpolateFVarData(OpenSubdiv::Far::TopologyRefiner & refiner, template OpenSubdiv::Far::TopologyRefiner * -InterpolateVtrVertexData(const char *shapeStr, Scheme scheme, int maxlevel, +InterpolateFarVertexData(const char *shapeStr, Scheme scheme, int maxlevel, std::vector &data) { typedef OpenSubdiv::Far::TopologyRefiner FarTopologyRefiner; typedef OpenSubdiv::Far::TopologyRefinerFactory FarTopologyRefinerFactory; - // Vtr interpolation + // Far interpolation Shape * shape = Shape::parseObj(shapeStr, scheme); FarTopologyRefiner * refiner = @@ -279,8 +279,8 @@ TopologyRefinerFactory::assignComponentTags( for (int j=0; j<(int)t->intargs.size()-1; j += 2) { - OpenSubdiv::Vtr::Index edge = findBaseEdge(refiner, t->intargs[j], t->intargs[j+1]); - if (edge==OpenSubdiv::Vtr::INDEX_INVALID) { + OpenSubdiv::Far::Index edge = findBaseEdge(refiner, t->intargs[j], t->intargs[j+1]); + if (edge==OpenSubdiv::Far::INDEX_INVALID) { printf("cannot find edge for crease tag (%d,%d)\n", t->intargs[j], t->intargs[j+1] ); return false; } else { @@ -331,4 +331,4 @@ TopologyRefinerFactory::reportInvalidTopology( //------------------------------------------------------------------------------ -#endif /* VTR_UTILS_H */ +#endif /* FAR_UTILS_H */ diff --git a/regression/far_regression/far_regression.cpp b/regression/far_regression/far_regression.cpp index b57fd83f..f483e984 100644 --- a/regression/far_regression/far_regression.cpp +++ b/regression/far_regression/far_regression.cpp @@ -27,7 +27,7 @@ #include "../../regression/common/hbr_utils.h" -#include "../../regression/common/vtr_utils.h" +#include "../../regression/common/far_utils.h" #include "../../regression/common/cmp_utils.h" #include "init_shapes.h" @@ -121,17 +121,17 @@ typedef OpenSubdiv::Far::TopologyRefinerFactory FarTopologyRefinerFactory //------------------------------------------------------------------------------ #ifdef foo static void -printVertexData(std::vector const & hbrBuffer, std::vector const & vtrBuffer) { +printVertexData(std::vector const & hbrBuffer, std::vector const & farBuffer) { - assert(hbrBuffer.size()==vtrBuffer.size()); + assert(hbrBuffer.size()==farBuffer.size()); for (int i=0; i<(int)hbrBuffer.size(); ++i) { float const * hbr = hbrBuffer[i].GetPos(), - * vtr = vtrBuffer[i].GetPos(); + * far = farBuffer[i].GetPos(); - printf("%3d %d (%f %f %f) (%f %f %f)\n", i, hbrBuffer[i]==vtrBuffer[i], + printf("%3d %d (%f %f %f) (%f %f %f)\n", i, hbrBuffer[i]==farBuffer[i], hbr[0], hbr[1], hbr[2], - vtr[0], vtr[1], vtr[2]); + far[0], far[1], far[2]); } } #endif @@ -148,40 +148,40 @@ checkMesh(ShapeDesc const & desc, int maxlevel) { deltaCnt[3] = {0.0f, 0.0f, 0.0f}; std::vector hbrVertexData, - vtrVertexData; + farVertexData; Hmesh * hmesh = interpolateHbrVertexData( desc.data.c_str(), desc.scheme, maxlevel); FarTopologyRefiner * refiner = - InterpolateVtrVertexData( - desc.data.c_str(), desc.scheme, maxlevel, vtrVertexData); + InterpolateFarVertexData( + desc.data.c_str(), desc.scheme, maxlevel, farVertexData); // copy Hbr vertex data into a re-ordered buffer (for easier comparison) GetReorderedHbrVertexData(*refiner, *hmesh, &hbrVertexData); - int nverts = (int)vtrVertexData.size(); + int nverts = (int)farVertexData.size(); for (int i=0; i(shape.c_str(), scheme, levels); - std::vector vtrVertexData; + std::vector farVertexData; FarTopologyRefiner *refiner = - InterpolateVtrVertexData(shape.c_str(), scheme, levels, - vtrVertexData); + InterpolateFarVertexData(shape.c_str(), scheme, levels, + farVertexData); switch (backend) { case kBackendCPU: - result = checkMeshCPU(refiner, vtrVertexData, refmesh); + result = checkMeshCPU(refiner, farVertexData, refmesh); break; case kBackendCPUGL: - result = checkMeshCPUGL(refiner, vtrVertexData, refmesh); + result = checkMeshCPUGL(refiner, farVertexData, refmesh); break; }