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.
This commit is contained in:
George ElKoura 2015-05-30 22:10:07 -07:00
parent ccb8488411
commit 5a51f31104
24 changed files with 72 additions and 72 deletions

View File

@ -56,7 +56,7 @@ _add_possibly_cuda_executable(dxPtexViewer WIN32
"${SOURCE_FILES}" "${SOURCE_FILES}"
"${INC_FILES}" "${INC_FILES}"
$<TARGET_OBJECTS:regression_common_obj> $<TARGET_OBJECTS:regression_common_obj>
$<TARGET_OBJECTS:regression_vtr_utils_obj> $<TARGET_OBJECTS:regression_far_utils_obj>
$<TARGET_OBJECTS:examples_common_obj> $<TARGET_OBJECTS:examples_common_obj>
) )

View File

@ -61,7 +61,7 @@ OpenSubdiv::Osd::D3D11MeshInterface *g_mesh;
#include "Ptexture.h" #include "Ptexture.h"
#include "PtexUtils.h" #include "PtexUtils.h"
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/d3d11Hud.h" #include "../common/d3d11Hud.h"
@ -697,7 +697,7 @@ createOsdMesh(int level, int kernel) {
typedef OpenSubdiv::Far::ConstIndexArray IndexArray; typedef OpenSubdiv::Far::ConstIndexArray IndexArray;
// create Vtr mesh (topology) // create Far mesh (topology)
OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape);
OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -63,7 +63,7 @@ _add_possibly_cuda_executable(dxViewer WIN32
"${SOURCE_FILES}" "${SOURCE_FILES}"
"${INC_FILES}" "${INC_FILES}"
$<TARGET_OBJECTS:regression_common_obj> $<TARGET_OBJECTS:regression_common_obj>
$<TARGET_OBJECTS:regression_vtr_utils_obj> $<TARGET_OBJECTS:regression_far_utils_obj>
$<TARGET_OBJECTS:examples_common_obj> $<TARGET_OBJECTS:examples_common_obj>
) )

View File

@ -60,7 +60,7 @@
OpenSubdiv::Osd::D3D11MeshInterface *g_mesh = NULL; OpenSubdiv::Osd::D3D11MeshInterface *g_mesh = NULL;
OpenSubdiv::Osd::D3D11LegacyGregoryPatchTable *g_legacyGregoryPatchTable = 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/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/d3d11Hud.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); Shape * shape = Shape::parseObj(shapeDesc.data.c_str(), shapeDesc.scheme);
// create Vtr mesh (topology) // create Far mesh (topology)
Sdc::SchemeType sdctype = GetSdcType(*shape); Sdc::SchemeType sdctype = GetSdcType(*shape);
Sdc::Options sdcoptions = GetSdcOptions(*shape); Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -53,7 +53,7 @@ GLFWmonitor* g_primary=0;
#include <far/stencilTableFactory.h> #include <far/stencilTableFactory.h>
#include <far/primvarRefiner.h> #include <far/primvarRefiner.h>
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glUtils.h" #include "../common/glUtils.h"

View File

@ -25,7 +25,7 @@
#ifndef GL_MESH_H #ifndef GL_MESH_H
#define 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 "../../regression/common/hbr_utils.h"
#include <far/patchTable.h> #include <far/patchTable.h>

View File

@ -79,7 +79,7 @@ GLFWmonitor* g_primary=0;
#include <far/error.h> #include <far/error.h>
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glHud.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); 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::SchemeType sdctype = GetSdcType(*shape);
OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -59,7 +59,7 @@ _add_glfw_executable(glFVarViewer
"${SHADER_FILES}" "${SHADER_FILES}"
"${INC_FILES}" "${INC_FILES}"
$<TARGET_OBJECTS:regression_common_obj> $<TARGET_OBJECTS:regression_common_obj>
$<TARGET_OBJECTS:regression_vtr_utils_obj> $<TARGET_OBJECTS:regression_far_utils_obj>
$<TARGET_OBJECTS:examples_common_obj> $<TARGET_OBJECTS:examples_common_obj>
) )

View File

@ -34,7 +34,7 @@ GLFWmonitor* g_primary = 0;
#include <osd/glMesh.h> #include <osd/glMesh.h>
OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL; OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL;
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glHud.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); 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::SchemeType sdctype = GetSdcType(*shape);
OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -68,7 +68,7 @@
#include <osd/glMesh.h> #include <osd/glMesh.h>
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/patchColors.h" #include "../common/patchColors.h"
#include "../common/stb_image_write.h" // common.obj has an implementation. #include "../common/stb_image_write.h" // common.obj has an implementation.
#include "../common/glShaderCache.h" #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(), Shape const * shape = Shape::parseObj(shapeDesc.data.c_str(),
shapeDesc.scheme); shapeDesc.scheme);
// create Vtr mesh (topology) // create Far mesh (topology)
Sdc::SchemeType sdctype = GetSdcType(*shape); Sdc::SchemeType sdctype = GetSdcType(*shape);
Sdc::Options sdcoptions = GetSdcOptions(*shape); Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -36,7 +36,7 @@ GLFWmonitor* g_primary=0;
#include <osd/glMesh.h> #include <osd/glMesh.h>
OpenSubdiv::Osd::GLMeshInterface *g_mesh; OpenSubdiv::Osd::GLMeshInterface *g_mesh;
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glHud.h" #include "../common/glHud.h"
@ -203,7 +203,7 @@ createOsdMesh() {
g_orgPositions=shape->verts; g_orgPositions=shape->verts;
// create Vtr mesh (topology) // create Far mesh (topology)
OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape);
OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -92,7 +92,7 @@ OpenSubdiv::Osd::GLMeshInterface *g_mesh;
#include "Ptexture.h" #include "Ptexture.h"
#include "PtexUtils.h" #include "PtexUtils.h"
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glHud.h" #include "../common/glHud.h"
@ -888,7 +888,7 @@ createOsdMesh(int level, int kernel) {
typedef OpenSubdiv::Far::ConstIndexArray IndexArray; typedef OpenSubdiv::Far::ConstIndexArray IndexArray;
// create Vtr mesh (topology) // create Far mesh (topology)
OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape); OpenSubdiv::Sdc::SchemeType sdctype = GetSdcType(*shape);
OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -68,7 +68,7 @@ GLFWmonitor* g_primary=0;
#endif #endif
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "init_shapes.h" #include "init_shapes.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"

View File

@ -24,7 +24,7 @@
#include "sceneBase.h" #include "sceneBase.h"
#include <limits> #include <limits>
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include <far/patchTableFactory.h> #include <far/patchTableFactory.h>
#include <far/stencilTableFactory.h> #include <far/stencilTableFactory.h>

View File

@ -47,7 +47,7 @@ _add_glfw_executable(glStencilViewer
glStencilViewer.cpp glStencilViewer.cpp
"${INC_FILES}" "${INC_FILES}"
$<TARGET_OBJECTS:regression_common_obj> $<TARGET_OBJECTS:regression_common_obj>
$<TARGET_OBJECTS:regression_vtr_utils_obj> $<TARGET_OBJECTS:regression_far_utils_obj>
$<TARGET_OBJECTS:examples_common_obj> $<TARGET_OBJECTS:examples_common_obj>
) )

View File

@ -28,7 +28,7 @@
GLFWwindow* g_window=0; GLFWwindow* g_window=0;
GLFWmonitor* g_primary=0; GLFWmonitor* g_primary=0;
#include "../../regression/common/vtr_utils.h" #include "../../regression/common/far_utils.h"
#include "../common/stopwatch.h" #include "../common/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glHud.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); 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::SchemeType sdctype = GetSdcType(*shape);
OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape); OpenSubdiv::Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -58,7 +58,7 @@ _add_glfw_executable(glViewer
"${SHADER_FILES}" "${SHADER_FILES}"
"${INC_FILES}" "${INC_FILES}"
$<TARGET_OBJECTS:regression_common_obj> $<TARGET_OBJECTS:regression_common_obj>
$<TARGET_OBJECTS:regression_vtr_utils_obj> $<TARGET_OBJECTS:regression_far_utils_obj>
$<TARGET_OBJECTS:examples_common_obj> $<TARGET_OBJECTS:examples_common_obj>
) )

View File

@ -72,7 +72,7 @@ GLFWmonitor* g_primary=0;
OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL; OpenSubdiv::Osd::GLMeshInterface *g_mesh = NULL;
OpenSubdiv::Osd::GLLegacyGregoryPatchTable *g_legacyGregoryPatchTable = 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/stopwatch.h"
#include "../common/simple_math.h" #include "../common/simple_math.h"
#include "../common/glHud.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); 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::SchemeType sdctype = GetSdcType(*shape);
Sdc::Options sdcoptions = GetSdcOptions(*shape); Sdc::Options sdcoptions = GetSdcOptions(*shape);

View File

@ -30,7 +30,7 @@ set(REGRESSION_COMMON_HEADER_FILES
cmp_utils.h cmp_utils.h
hbr_utils.h hbr_utils.h
shape_utils.h shape_utils.h
vtr_utils.h far_utils.h
) )
include_directories("${OPENSUBDIV_INCLUDE_DIR}") include_directories("${OPENSUBDIV_INCLUDE_DIR}")
@ -41,9 +41,9 @@ add_library(regression_common_obj
${REGRESSION_COMMON_HEADER_FILES} ${REGRESSION_COMMON_HEADER_FILES}
) )
add_library(regression_vtr_utils_obj add_library(regression_far_utils_obj
OBJECT OBJECT
vtr_utils.cpp far_utils.cpp
vtr_utils.h far_utils.h
) )

View File

@ -71,7 +71,7 @@ GetReorderedHbrVertexData(
typedef OpenSubdiv::Far::ConstIndexArray ConstIndexArray; typedef OpenSubdiv::Far::ConstIndexArray ConstIndexArray;
{ // Populate base level { // 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 // for the base level
OpenSubdiv::Far::TopologyLevel const & refBaseLevel = refiner.GetLevel(0); OpenSubdiv::Far::TopologyLevel const & refBaseLevel = refiner.GetLevel(0);
@ -89,10 +89,10 @@ GetReorderedHbrVertexData(
for (int edge = 0; edge <nedges; ++edge) { for (int edge = 0; edge <nedges; ++edge) {
ConstIndexArray vtrVerts = refBaseLevel.GetEdgeVertices(edge); ConstIndexArray farVerts = refBaseLevel.GetEdgeVertices(edge);
Hvertex const * v0 = hmesh.GetVertex(vtrVerts[0]), Hvertex const * v0 = hmesh.GetVertex(farVerts[0]),
* v1 = hmesh.GetVertex(vtrVerts[1]); * v1 = hmesh.GetVertex(farVerts[1]);
Hhalfedge * e = v0->GetEdge(v1); Hhalfedge * e = v0->GetEdge(v1);
if (not e) { if (not e) {
@ -160,10 +160,10 @@ GetReorderedHbrVertexData(
// populate child edges // populate child edges
for (int edge=0; edge < refLevel.GetNumEdges(); ++edge) { 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]], Hvertex const * v0 = current.verts[farVerts[0]],
* v1 = current.verts[vtrVerts[1]]; * v1 = current.verts[farVerts[1]];
assert(v0 and v1); assert(v0 and v1);
Hhalfedge * e= v0->GetEdge(v1); Hhalfedge * e= v0->GetEdge(v1);

View File

@ -22,7 +22,7 @@
// language governing permissions and limitations under the Apache License. // language governing permissions and limitations under the Apache License.
// //
#include "vtr_utils.h" #include "far_utils.h"
struct FVarVertex { struct FVarVertex {

View File

@ -22,8 +22,8 @@
// language governing permissions and limitations under the Apache License. // language governing permissions and limitations under the Apache License.
// //
#ifndef VTR_UTILS_H #ifndef FAR_UTILS_H
#define VTR_UTILS_H #define FAR_UTILS_H
#include <far/topologyRefinerFactory.h> #include <far/topologyRefinerFactory.h>
#include <far/primvarRefiner.h> #include <far/primvarRefiner.h>
@ -135,13 +135,13 @@ InterpolateFVarData(OpenSubdiv::Far::TopologyRefiner & refiner,
template <class T> template <class T>
OpenSubdiv::Far::TopologyRefiner * OpenSubdiv::Far::TopologyRefiner *
InterpolateVtrVertexData(const char *shapeStr, Scheme scheme, int maxlevel, InterpolateFarVertexData(const char *shapeStr, Scheme scheme, int maxlevel,
std::vector<T> &data) { std::vector<T> &data) {
typedef OpenSubdiv::Far::TopologyRefiner FarTopologyRefiner; typedef OpenSubdiv::Far::TopologyRefiner FarTopologyRefiner;
typedef OpenSubdiv::Far::TopologyRefinerFactory<Shape> FarTopologyRefinerFactory; typedef OpenSubdiv::Far::TopologyRefinerFactory<Shape> FarTopologyRefinerFactory;
// Vtr interpolation // Far interpolation
Shape * shape = Shape::parseObj(shapeStr, scheme); Shape * shape = Shape::parseObj(shapeStr, scheme);
FarTopologyRefiner * refiner = FarTopologyRefiner * refiner =
@ -279,8 +279,8 @@ TopologyRefinerFactory<Shape>::assignComponentTags(
for (int j=0; j<(int)t->intargs.size()-1; j += 2) { 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]); OpenSubdiv::Far::Index edge = findBaseEdge(refiner, t->intargs[j], t->intargs[j+1]);
if (edge==OpenSubdiv::Vtr::INDEX_INVALID) { if (edge==OpenSubdiv::Far::INDEX_INVALID) {
printf("cannot find edge for crease tag (%d,%d)\n", t->intargs[j], t->intargs[j+1] ); printf("cannot find edge for crease tag (%d,%d)\n", t->intargs[j], t->intargs[j+1] );
return false; return false;
} else { } else {
@ -331,4 +331,4 @@ TopologyRefinerFactory<Shape>::reportInvalidTopology(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#endif /* VTR_UTILS_H */ #endif /* FAR_UTILS_H */

View File

@ -27,7 +27,7 @@
#include "../../regression/common/hbr_utils.h" #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 "../../regression/common/cmp_utils.h"
#include "init_shapes.h" #include "init_shapes.h"
@ -121,17 +121,17 @@ typedef OpenSubdiv::Far::TopologyRefinerFactory<Shape> FarTopologyRefinerFactory
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
#ifdef foo #ifdef foo
static void static void
printVertexData(std::vector<xyzVV> const & hbrBuffer, std::vector<xyzVV> const & vtrBuffer) { printVertexData(std::vector<xyzVV> const & hbrBuffer, std::vector<xyzVV> const & farBuffer) {
assert(hbrBuffer.size()==vtrBuffer.size()); assert(hbrBuffer.size()==farBuffer.size());
for (int i=0; i<(int)hbrBuffer.size(); ++i) { for (int i=0; i<(int)hbrBuffer.size(); ++i) {
float const * hbr = hbrBuffer[i].GetPos(), 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], hbr[0], hbr[1], hbr[2],
vtr[0], vtr[1], vtr[2]); far[0], far[1], far[2]);
} }
} }
#endif #endif
@ -148,40 +148,40 @@ checkMesh(ShapeDesc const & desc, int maxlevel) {
deltaCnt[3] = {0.0f, 0.0f, 0.0f}; deltaCnt[3] = {0.0f, 0.0f, 0.0f};
std::vector<xyzVV> hbrVertexData, std::vector<xyzVV> hbrVertexData,
vtrVertexData; farVertexData;
Hmesh * hmesh = interpolateHbrVertexData<xyzVV>( Hmesh * hmesh = interpolateHbrVertexData<xyzVV>(
desc.data.c_str(), desc.scheme, maxlevel); desc.data.c_str(), desc.scheme, maxlevel);
FarTopologyRefiner * refiner = FarTopologyRefiner * refiner =
InterpolateVtrVertexData<xyzVV>( InterpolateFarVertexData<xyzVV>(
desc.data.c_str(), desc.scheme, maxlevel, vtrVertexData); desc.data.c_str(), desc.scheme, maxlevel, farVertexData);
// copy Hbr vertex data into a re-ordered buffer (for easier comparison) // copy Hbr vertex data into a re-ordered buffer (for easier comparison)
GetReorderedHbrVertexData(*refiner, *hmesh, &hbrVertexData); GetReorderedHbrVertexData(*refiner, *hmesh, &hbrVertexData);
int nverts = (int)vtrVertexData.size(); int nverts = (int)farVertexData.size();
for (int i=0; i<nverts; ++i) { for (int i=0; i<nverts; ++i) {
xyzVV & hbrVert = hbrVertexData[i], xyzVV & hbrVert = hbrVertexData[i],
& vtrVert = vtrVertexData[i]; & farVert = farVertexData[i];
#ifdef __INTEL_COMPILER // remark #1572: floating-point equality and inequality comparisons are unreliable #ifdef __INTEL_COMPILER // remark #1572: floating-point equality and inequality comparisons are unreliable
#pragma warning disable 1572 #pragma warning disable 1572
#endif #endif
if ( hbrVert.GetPos()[0] != vtrVert.GetPos()[0] ) if ( hbrVert.GetPos()[0] != farVert.GetPos()[0] )
deltaCnt[0]++; deltaCnt[0]++;
if ( hbrVert.GetPos()[1] != vtrVert.GetPos()[1] ) if ( hbrVert.GetPos()[1] != farVert.GetPos()[1] )
deltaCnt[1]++; deltaCnt[1]++;
if ( hbrVert.GetPos()[2] != vtrVert.GetPos()[2] ) if ( hbrVert.GetPos()[2] != farVert.GetPos()[2] )
deltaCnt[2]++; deltaCnt[2]++;
#ifdef __INTEL_COMPILER #ifdef __INTEL_COMPILER
#pragma warning enable 1572 #pragma warning enable 1572
#endif #endif
float delta[3] = { hbrVert.GetPos()[0] - vtrVert.GetPos()[0], float delta[3] = { hbrVert.GetPos()[0] - farVert.GetPos()[0],
hbrVert.GetPos()[1] - vtrVert.GetPos()[1], hbrVert.GetPos()[1] - farVert.GetPos()[1],
hbrVert.GetPos()[2] - vtrVert.GetPos()[2] }; hbrVert.GetPos()[2] - farVert.GetPos()[2] };
deltaAvg[0]+=delta[0]; deltaAvg[0]+=delta[0];
deltaAvg[1]+=delta[1]; deltaAvg[1]+=delta[1];
@ -194,9 +194,9 @@ checkMesh(ShapeDesc const & desc, int maxlevel) {
" (%.10f %.10f %.10f)\n", i, dist, hbrVert.GetPos()[0], " (%.10f %.10f %.10f)\n", i, dist, hbrVert.GetPos()[0],
hbrVert.GetPos()[1], hbrVert.GetPos()[1],
hbrVert.GetPos()[2], hbrVert.GetPos()[2],
vtrVert.GetPos()[0], farVert.GetPos()[0],
vtrVert.GetPos()[1], farVert.GetPos()[1],
vtrVert.GetPos()[2] ); farVert.GetPos()[2] );
count++; count++;
} }
} }

View File

@ -53,7 +53,7 @@ GLFWwindow* g_window=0;
#include "../common/cmp_utils.h" #include "../common/cmp_utils.h"
#include "../common/hbr_utils.h" #include "../common/hbr_utils.h"
#include "../common/vtr_utils.h" #include "../common/far_utils.h"
// //
// Regression testing matching Osd to Hbr // Regression testing matching Osd to Hbr
@ -333,18 +333,18 @@ checkMesh( char const * msg, std::string const & shape, int levels, Scheme schem
xyzmesh * refmesh = xyzmesh * refmesh =
interpolateHbrVertexData<xyzVV>(shape.c_str(), scheme, levels); interpolateHbrVertexData<xyzVV>(shape.c_str(), scheme, levels);
std::vector<xyzVV> vtrVertexData; std::vector<xyzVV> farVertexData;
FarTopologyRefiner *refiner = FarTopologyRefiner *refiner =
InterpolateVtrVertexData(shape.c_str(), scheme, levels, InterpolateFarVertexData(shape.c_str(), scheme, levels,
vtrVertexData); farVertexData);
switch (backend) { switch (backend) {
case kBackendCPU: case kBackendCPU:
result = checkMeshCPU(refiner, vtrVertexData, refmesh); result = checkMeshCPU(refiner, farVertexData, refmesh);
break; break;
case kBackendCPUGL: case kBackendCPUGL:
result = checkMeshCPUGL(refiner, vtrVertexData, refmesh); result = checkMeshCPUGL(refiner, farVertexData, refmesh);
break; break;
} }