mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-09 22:00:06 +00:00
Fixed regression comparisons between Hbr and Vtr to account for Loop:
- updated Mapper in common/cmp_utils.h to skip face-verts with Loop - updated vtr_regression/init_shapes.h to enable the Loop shapes
This commit is contained in:
parent
13e9b43b38
commit
ac0785620b
@ -60,6 +60,8 @@ GetReorderedHbrVertexData(
|
||||
Mapper(const OpenSubdiv::Far::TopologyRefiner &refiner,
|
||||
const OpenSubdiv::HbrMesh<T> &hmesh) {
|
||||
|
||||
bool schemeIsLoop = (refiner.GetSchemeType() == OpenSubdiv::Sdc::SCHEME_LOOP);
|
||||
|
||||
maps.resize(refiner.GetMaxLevel()+1);
|
||||
|
||||
typedef OpenSubdiv::Far::Index Index;
|
||||
@ -118,17 +120,17 @@ GetReorderedHbrVertexData(
|
||||
Hface * f = previous.faces[face];
|
||||
|
||||
ConstIndexArray childFaces = refiner.GetFaceChildFaces(level-1, face);
|
||||
assert(childFaces.size()==f->GetNumVertices());
|
||||
|
||||
for (int i=0; i<childFaces.size(); ++i) {
|
||||
current.faces[childFaces[i]] = f->GetChild(i);
|
||||
}
|
||||
|
||||
// populate child face-verts
|
||||
Index childVert = refiner.GetFaceChildVertex(level-1, face);
|
||||
Hvertex * v = f->Subdivide();
|
||||
assert(v->GetParentFace());
|
||||
current.verts[childVert] = v;
|
||||
// populate child face-verts -- when present (none for Loop subdivision)
|
||||
if (!schemeIsLoop) {
|
||||
Hvertex * v = f->Subdivide();
|
||||
Index childVert = refiner.GetFaceChildVertex(level-1, face);
|
||||
assert(v->GetParentFace());
|
||||
current.verts[childVert] = v;
|
||||
}
|
||||
}
|
||||
|
||||
for (int edge=0; edge < refiner.GetNumEdges(level-1); ++edge) {
|
||||
|
@ -125,14 +125,14 @@ static void initShapes() {
|
||||
g_shapes.push_back( ShapeDesc("catmark_torus_creases0", catmark_torus_creases0, kCatmark ) );
|
||||
g_shapes.push_back( ShapeDesc("catmark_helmet", catmark_helmet, kCatmark ) );
|
||||
|
||||
// g_shapes.push_back( ShapeDesc("loop_cube_creases0", loop_cube_creases0, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_cube_creases1", loop_cube_creases1, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_cube", loop_cube, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_icosahedron", loop_icosahedron, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_saddle_edgecorner", loop_saddle_edgecorner, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_saddle_edgeonly", loop_saddle_edgeonly, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_triangle_edgecorner", loop_triangle_edgecorner, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_triangle_edgeonly", loop_triangle_edgeonly, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_cube_creases0", loop_cube_creases0, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_cube_creases1", loop_cube_creases1, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_cube", loop_cube, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_icosahedron", loop_icosahedron, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_saddle_edgecorner", loop_saddle_edgecorner, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_saddle_edgeonly", loop_saddle_edgeonly, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_triangle_edgecorner", loop_triangle_edgecorner, kLoop ) );
|
||||
g_shapes.push_back( ShapeDesc("loop_triangle_edgeonly", loop_triangle_edgeonly, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_chaikin0", loop_chaikin0, kLoop ) );
|
||||
// g_shapes.push_back( ShapeDesc("loop_chaikin1", loop_chaikin1, kLoop ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user