Added a few more test shapes for face-varying and inf-sharp patches:

- added new shapes to regression/shapes
    - updated shapes/all.h to include them
    - updated init_shapes.h for glViewer and glFVarViewer
This commit is contained in:
barry 2016-10-13 19:59:38 -07:00
parent dbca8cdb0b
commit e21b4d902f
7 changed files with 384 additions and 1 deletions

View File

@ -60,6 +60,8 @@ static void initShapes() {
g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound0", catmark_fvar_bound0, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound0", catmark_fvar_bound0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound1", catmark_fvar_bound1, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound1", catmark_fvar_bound1, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound2", catmark_fvar_bound2, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound2", catmark_fvar_bound2, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_fvar_bound3", catmark_fvar_bound3, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_fvar_project0", catmark_fvar_project0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_gregory_test1", catmark_gregory_test1, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_gregory_test1", catmark_gregory_test1, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_gregory_test2", catmark_gregory_test2, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_gregory_test2", catmark_gregory_test2, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_gregory_test3", catmark_gregory_test3, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_gregory_test3", catmark_gregory_test3, kCatmark ) );

View File

@ -57,6 +57,9 @@ static void initShapes() {
g_defaultShapes.push_back( ShapeDesc("catmark_chaikin0", catmark_chaikin0, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_chaikin0", catmark_chaikin0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_chaikin1", catmark_chaikin1, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_chaikin1", catmark_chaikin1, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_chaikin2", catmark_chaikin2, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_chaikin2", catmark_chaikin2, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_single_crease", catmark_single_crease, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_inf_crease0", catmark_inf_crease0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_inf_crease1", catmark_inf_crease1, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_fan", catmark_fan, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_fan", catmark_fan, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_flap", catmark_flap, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_flap", catmark_flap, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_flap2", catmark_flap2, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_flap2", catmark_flap2, kCatmark ) );
@ -91,7 +94,6 @@ static void initShapes() {
g_defaultShapes.push_back( ShapeDesc("catmark_tent", catmark_tent, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_tent", catmark_tent, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_torus", catmark_torus, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_torus", catmark_torus, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_torus_creases0", catmark_torus_creases0, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_torus_creases0", catmark_torus_creases0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_single_crease", catmark_single_crease, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_smoothtris0", catmark_smoothtris0, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_smoothtris0", catmark_smoothtris0, kCatmark ) );
g_defaultShapes.push_back( ShapeDesc("catmark_smoothtris1", catmark_smoothtris1, kCatmark ) ); g_defaultShapes.push_back( ShapeDesc("catmark_smoothtris1", catmark_smoothtris1, kCatmark ) );
// g_defaultShapes.push_back( ShapeDesc("catmark_square_hedit0", catmark_square_hedit0, kCatmark ) ); // g_defaultShapes.push_back( ShapeDesc("catmark_square_hedit0", catmark_square_hedit0, kCatmark ) );

View File

@ -48,6 +48,8 @@
#include "catmark_fvar_bound0.h" #include "catmark_fvar_bound0.h"
#include "catmark_fvar_bound1.h" #include "catmark_fvar_bound1.h"
#include "catmark_fvar_bound2.h" #include "catmark_fvar_bound2.h"
#include "catmark_fvar_bound3.h"
#include "catmark_fvar_project0.h"
#include "catmark_gregory_test0.h" #include "catmark_gregory_test0.h"
#include "catmark_gregory_test1.h" #include "catmark_gregory_test1.h"
#include "catmark_gregory_test2.h" #include "catmark_gregory_test2.h"
@ -78,6 +80,8 @@
#include "catmark_pyramid.h" #include "catmark_pyramid.h"
#include "catmark_rook.h" #include "catmark_rook.h"
#include "catmark_single_crease.h" #include "catmark_single_crease.h"
#include "catmark_inf_crease0.h"
#include "catmark_inf_crease1.h"
#include "catmark_smoothtris0.h" #include "catmark_smoothtris0.h"
#include "catmark_smoothtris1.h" #include "catmark_smoothtris1.h"
#include "catmark_square_hedit0.h" #include "catmark_square_hedit0.h"

View File

@ -0,0 +1,64 @@
//
// Copyright 2016 Dreamworks
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
static const std::string catmark_fvar_bound3 =
"v 0.00 0.00 1.00\n"
"v 1.00 0.00 0.00\n"
"v 0.50 0.87 0.00\n"
"v -0.50 0.87 0.00\n"
"v -1.00 0.00 0.00\n"
"v -0.50 -0.87 0.00\n"
"v 0.50 -0.87 0.00\n"
"v 0.75 0.50 0.00\n"
"v 0.00 1.00 0.00\n"
"v -0.75 0.50 0.00\n"
"v -0.75 -0.50 0.00\n"
"v 0.00 -1.00 0.00\n"
"v 0.75 -0.50 0.00\n"
"vt 0.10 0.05\n"
"vt 0.50 0.15\n"
"vt 0.90 0.05\n"
"vt 0.10 0.25\n"
"vt 0.50 0.35\n"
"vt 0.90 0.25\n"
"vt 0.10 0.35\n"
"vt 0.50 0.45\n"
"vt 0.90 0.35\n"
"vt 0.10 0.55\n"
"vt 0.50 0.65\n"
"vt 0.90 0.55\n"
"vt 0.10 0.65\n"
"vt 0.50 0.75\n"
"vt 0.90 0.65\n"
"vt 0.10 0.85\n"
"vt 0.50 0.95\n"
"vt 0.90 0.85\n"
"f 1/2 2/3 8/6 3/5 \n"
"f 1/2 3/5 9/4 4/1 \n"
"f 1/8 4/9 10/12 5/11\n"
"f 1/8 5/11 11/10 6/7 \n"
"f 1/14 6/15 12/18 7/17\n"
"f 1/14 7/17 13/16 2/13\n"
"t interpolateboundary 1/0/0 1\n"
;

View File

@ -0,0 +1,72 @@
//
// Copyright 2016 Dreamworks
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
static const std::string catmark_fvar_project0 =
"v -4 0.464466 -1.25\n"
"v -2.82149 1.64298 -1.25\n"
"v -4 2.82149 1.25\n"
"v -5.17851 1.64298 -1.25\n"
"v -5.17851 4 1.25\n"
"v -6.35702 2.82149 -1.25\n"
"v -6.35702 5.17851 -1.25\n"
"v -7.53553 4 -1.25\n"
"v -1.64298 2.82149 -1.25\n"
"v -2.82149 4 1.25\n"
"v -4 5.17851 1.25\n"
"v -5.17851 6.35702 -1.25\n"
"v -0.464466 4 -1.25\n"
"v -1.64298 5.17851 -1.25\n"
"v -2.82149 6.35702 -1.25\n"
"v -4 7.53553 -1.25\n"
"vt 0 0\n"
"vt 0.333333 0\n"
"vt 0.333333 0.333333\n"
"vt 0 0.333333\n"
"vt 0.333333 0.666667\n"
"vt 0 0.666667\n"
"vt 0.333333 1\n"
"vt 0 1\n"
"vt 0.666667 0\n"
"vt 0.666667 0.333333\n"
"vt 0.666667 0.666667\n"
"vt 0.666667 1\n"
"vt 1 0\n"
"vt 1 0.333333\n"
"vt 1 0.666667\n"
"vt 1 1\n"
"f 1/1 2/2 3/3 4/4\n"
"f 4/4 3/3 5/5 6/6\n"
"f 6/6 5/5 7/7 8/8\n"
"f 2/2 9/9 10/10 3/3\n"
"f 3/3 10/10 11/11 5/5\n"
"f 5/5 11/11 12/12 7/7\n"
"f 9/9 13/13 14/14 10/10\n"
"f 10/10 14/14 15/15 11/11\n"
"f 11/11 15/15 16/16 12/12\n"
"t interpolateboundary 1/0/0 1\n"
"t crease 2/1/0 2 4 10.0\n"
"t crease 2/1/0 2 9 10.0\n"
"t crease 2/1/0 10 9 10.0\n"
"t crease 2/1/0 10 4 10.0\n"
;

View File

@ -0,0 +1,125 @@
//
// Copyright 2016 Dreamworks
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
static const std::string catmark_inf_crease0 =
"# This file uses centimeters as units for non-parametric coordinates.\n"
"\n"
"v 0.00 0.00 0.00\n"
"v 1.00 0.00 0.00\n"
"v 2.00 0.00 0.00\n"
"v 3.00 0.00 0.00\n"
"v 4.00 0.00 0.00\n"
"v 0.00 1.00 0.00\n"
"v 1.00 1.00 1.25\n"
"v 2.00 1.00 0.00\n"
"v 3.00 1.00 1.25\n"
"v 4.00 1.00 0.00\n"
"v 0.00 2.00 0.00\n"
"v 1.00 2.00 0.00\n"
"v 2.00 2.00 0.00\n"
"v 3.00 2.00 0.00\n"
"v 4.00 2.00 0.00\n"
"v 0.00 3.00 0.00\n"
"v 1.00 3.00 1.25\n"
"v 2.00 3.00 0.00\n"
"v 3.00 3.00 1.25\n"
"v 4.00 3.00 0.00\n"
"v 0.00 4.00 0.00\n"
"v 1.00 4.00 0.00\n"
"v 2.00 4.00 0.00\n"
"v 3.00 4.00 0.00\n"
"v 4.00 4.00 0.00\n"
"\n"
"vt 0.00 0.00\n"
"vt 0.20 0.00\n"
"vt 0.50 0.00\n"
"vt 0.80 0.00\n"
"vt 1.00 0.00\n"
"vt 0.00 0.20\n"
"vt 0.20 0.20\n"
"vt 0.50 0.10\n"
"vt 0.80 0.20\n"
"vt 1.00 0.20\n"
"vt 0.00 0.40\n"
"vt 0.20 0.40\n"
"vt 0.50 0.20\n"
"vt 0.80 0.40\n"
"vt 1.00 0.40\n"
"vt 0.00 0.60\n"
"vt 0.25 0.60\n"
"vt 0.50 0.40\n"
"vt 0.75 0.60\n"
"vt 1.00 0.60\n"
"vt 0.00 0.80\n"
"vt 0.25 0.80\n"
"vt 0.50 0.65\n"
"vt 0.75 0.80\n"
"vt 1.00 0.80\n"
"vt 0.00 1.00\n"
"vt 0.25 1.00\n"
"vt 0.50 1.00\n"
"vt 0.75 1.00\n"
"vt 1.00 1.00\n"
"vt 0.40 0.00\n"
"vt 0.60 0.00\n"
"vt 0.40 0.10\n"
"vt 0.60 0.10\n"
"vt 0.40 0.25\n"
"vt 0.60 0.25\n"
"vt 0.40 1.00\n"
"vt 0.60 1.00\n"
"\n"
"f 1/1 2/2 7/7 6/6\n"
"f 2/2 3/31 8/33 7/7\n"
"f 3/32 4/4 9/9 8/34\n"
"f 4/4 5/5 10/10 9/9\n"
"f 6/6 7/7 12/12 11/11\n"
"f 7/7 8/33 13/35 12/12\n"
"f 8/34 9/9 14/14 13/36\n"
"f 9/9 10/10 15/15 14/14\n"
"f 11/16 12/17 17/22 16/21\n"
"f 12/17 13/18 18/23 17/22\n"
"f 13/18 14/19 19/24 18/23\n"
"f 14/19 15/20 20/25 19/24\n"
"f 16/21 17/22 22/27 21/26\n"
"f 17/22 18/23 23/37 22/27\n"
"f 18/23 19/24 24/29 23/38\n"
"f 19/24 20/25 25/30 24/29\n"
"\n"
"t interpolateboundary 1/0/0 1\n"
"\n"
"t crease 2/1/0 1 6 10.0\n"
"t crease 2/1/0 3 8 10.0\n"
"t crease 2/1/0 5 6 10.0\n"
"t crease 2/1/0 6 11 10.0\n"
"t crease 2/1/0 8 13 10.0\n"
"t crease 2/1/0 11 16 10.0\n"
"t crease 2/1/0 11 16 10.0\n"
"t crease 2/1/0 13 18 10.0\n"
"t crease 2/1/0 15 16 10.0\n"
"t crease 2/1/0 16 17 10.0\n"
"t crease 2/1/0 18 19 10.0\n"
"t crease 2/1/0 16 21 10.0\n"
"\n"
;

View File

@ -0,0 +1,114 @@
//
// Copyright 2016 Dreamworks
//
// Licensed under the Apache License, Version 2.0 (the "Apache License")
// with the following modification; you may not use this file except in
// compliance with the Apache License and the following modification to it:
// Section 6. Trademarks. is deleted and replaced with:
//
// 6. Trademarks. This License does not grant permission to use the trade
// names, trademarks, service marks, or product names of the Licensor
// and its affiliates, except as required to comply with Section 4(c) of
// the License and to reproduce the content of the NOTICE file.
//
// You may obtain a copy of the Apache License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the Apache License with the above modification is
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
static const std::string catmark_inf_crease1 =
"# This file uses centimeters as units for non-parametric coordinates.\n"
"\n"
"v -1.10 1.10 0.75\n"
"v -0.10 1.10 0.00\n"
"v -0.60 1.97 0.00\n"
"v -1.60 1.97 0.00\n"
"v -2.10 1.10 0.00\n"
"v -1.60 0.23 0.00\n"
"v -0.60 0.23 0.00\n"
"v -0.35 1.60 0.00\n"
"v -1.10 2.10 0.00\n"
"v -1.85 1.60 0.00\n"
"v -1.85 0.60 0.00\n"
"v -1.10 0.10 0.00\n"
"v -0.35 0.60 0.00\n"
"v 1.10 1.10 0.75\n"
"v 2.10 1.10 0.00\n"
"v 1.60 1.97 0.00\n"
"v 0.60 1.97 0.00\n"
"v 0.10 1.10 0.00\n"
"v 0.60 0.23 0.00\n"
"v 1.60 0.23 0.00\n"
"v 1.85 1.60 0.00\n"
"v 1.10 2.10 0.00\n"
"v 0.35 1.60 0.00\n"
"v 0.35 0.60 0.00\n"
"v 1.10 0.10 0.00\n"
"v 1.85 0.60 0.00\n"
"v -1.10 -1.10 0.75\n"
"v -0.10 -1.10 0.00\n"
"v -0.60 -0.23 0.00\n"
"v -1.60 -0.23 0.00\n"
"v -2.10 -1.10 0.00\n"
"v -1.60 -1.97 0.00\n"
"v -0.60 -1.97 0.00\n"
"v -0.35 -0.60 0.00\n"
"v -1.10 -0.10 0.00\n"
"v -1.85 -0.60 0.00\n"
"v -1.85 -1.60 0.00\n"
"v -1.10 -2.10 0.00\n"
"v -0.35 -1.60 0.00\n"
"v 1.10 -1.10 0.75\n"
"v 2.10 -1.10 0.00\n"
"v 1.60 -0.23 0.00\n"
"v 0.60 -0.23 0.00\n"
"v 0.10 -1.10 0.00\n"
"v 0.60 -1.97 0.00\n"
"v 1.60 -1.97 0.00\n"
"v 1.85 -0.60 0.00\n"
"v 1.10 -0.10 0.00\n"
"v 0.35 -0.60 0.00\n"
"v 0.35 -1.60 0.00\n"
"v 1.10 -2.10 0.00\n"
"v 1.85 -1.60 0.00\n"
"f 1 2 8 3\n"
"f 1 3 9 4\n"
"f 1 4 10 5\n"
"f 1 5 11 6\n"
"f 1 6 12 7\n"
"f 1 7 13 2\n"
"f 14 15 21 16\n"
"f 14 16 22 17\n"
"f 14 17 23 18\n"
"f 14 18 24 19\n"
"f 14 19 25 20\n"
"f 14 20 26 15\n"
"f 27 28 34 29\n"
"f 27 29 35 30\n"
"f 27 30 36 31\n"
"f 27 31 37 32\n"
"f 27 32 38 33\n"
"f 27 33 39 28\n"
"f 40 41 47 42\n"
"f 40 42 48 43\n"
"f 40 43 49 44\n"
"f 40 44 50 45\n"
"f 40 45 51 46\n"
"f 40 46 52 41\n"
"t interpolateboundary 1/0/0 1\n"
"t crease 2/1/0 0 4 10.0\n"
"t crease 2/1/0 13 15 10.0\n"
"t crease 2/1/0 13 19 10.0\n"
"t crease 2/1/0 26 28 10.0\n"
"t crease 2/1/0 26 29 10.0\n"
"t crease 2/1/0 26 31 10.0\n"
"t crease 2/1/0 39 41 10.0\n"
"t crease 2/1/0 39 44 10.0\n"
"\n"
;