From cab8e0a0383a422a3a4b00b06faa878d6f2ed43b Mon Sep 17 00:00:00 2001 From: manuelk Date: Wed, 17 Sep 2014 14:46:10 -0700 Subject: [PATCH] Adding catmark_chaikin2 test shape - this shape tests for Chakin rule around vertices with multiple incident creased edges (shows where Hbr is wrong) --- examples/dxViewer/init_shapes.h | 2 + examples/glEvalLimit/init_shapes.h | 2 + examples/glPaintTest/init_shapes.h | 2 + examples/glStencilViewer/init_shapes.h | 2 + examples/glViewer/init_shapes.h | 2 + examples/vtrViewer/init_shapes.h | 2 + regression/shapes/catmark_chaikin2.h | 70 ++++++++++++++++++++++++++ 7 files changed, 82 insertions(+) create mode 100644 regression/shapes/catmark_chaikin2.h diff --git a/examples/dxViewer/init_shapes.h b/examples/dxViewer/init_shapes.h index a4d6d940..2ed55a1b 100644 --- a/examples/dxViewer/init_shapes.h +++ b/examples/dxViewer/init_shapes.h @@ -40,6 +40,7 @@ static std::vector g_defaultShapes; #include #include #include +#include #include #include #include @@ -107,6 +108,7 @@ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_edgeonly", catmark_edgeonly, 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_chaikin2", catmark_chaikin2, 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_flap2", catmark_flap2, kCatmark ) ); diff --git a/examples/glEvalLimit/init_shapes.h b/examples/glEvalLimit/init_shapes.h index 8be1e10a..e21c310e 100644 --- a/examples/glEvalLimit/init_shapes.h +++ b/examples/glEvalLimit/init_shapes.h @@ -40,6 +40,7 @@ static std::vector g_defaultShapes; #include #include #include +#include #include #include #include @@ -95,6 +96,7 @@ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_edgeonly", catmark_edgeonly, 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_chaikin2", catmark_chaikin2, 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_flap2", catmark_flap2, kCatmark ) ); diff --git a/examples/glPaintTest/init_shapes.h b/examples/glPaintTest/init_shapes.h index fe30c982..56769f82 100644 --- a/examples/glPaintTest/init_shapes.h +++ b/examples/glPaintTest/init_shapes.h @@ -40,6 +40,7 @@ static std::vector g_defaultShapes; #include #include #include +#include #include #include #include @@ -93,6 +94,7 @@ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_edgeonly", catmark_edgeonly, 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_chaikin2", catmark_chaikin2, 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_flap2", catmark_flap2, kCatmark ) ); diff --git a/examples/glStencilViewer/init_shapes.h b/examples/glStencilViewer/init_shapes.h index a4d6d940..2ed55a1b 100644 --- a/examples/glStencilViewer/init_shapes.h +++ b/examples/glStencilViewer/init_shapes.h @@ -40,6 +40,7 @@ static std::vector g_defaultShapes; #include #include #include +#include #include #include #include @@ -107,6 +108,7 @@ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_edgeonly", catmark_edgeonly, 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_chaikin2", catmark_chaikin2, 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_flap2", catmark_flap2, kCatmark ) ); diff --git a/examples/glViewer/init_shapes.h b/examples/glViewer/init_shapes.h index a4d6d940..2ed55a1b 100644 --- a/examples/glViewer/init_shapes.h +++ b/examples/glViewer/init_shapes.h @@ -40,6 +40,7 @@ static std::vector g_defaultShapes; #include #include #include +#include #include #include #include @@ -107,6 +108,7 @@ static void initShapes() { g_defaultShapes.push_back( ShapeDesc("catmark_edgeonly", catmark_edgeonly, 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_chaikin2", catmark_chaikin2, 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_flap2", catmark_flap2, kCatmark ) ); diff --git a/examples/vtrViewer/init_shapes.h b/examples/vtrViewer/init_shapes.h index 32d02552..7bdcceac 100644 --- a/examples/vtrViewer/init_shapes.h +++ b/examples/vtrViewer/init_shapes.h @@ -40,6 +40,7 @@ static std::vector g_shapes; #include #include #include +#include #include #include #include @@ -100,6 +101,7 @@ static void initShapes() { g_shapes.push_back( ShapeDesc("catmark_dart_edgeonly", catmark_dart_edgeonly, kCatmark ) ); g_shapes.push_back( ShapeDesc("catmark_chaikin0", catmark_chaikin0, kCatmark ) ); g_shapes.push_back( ShapeDesc("catmark_chaikin1", catmark_chaikin1, kCatmark ) ); + g_shapes.push_back( ShapeDesc("catmark_chaikin2", catmark_chaikin2, kCatmark ) ); g_shapes.push_back( ShapeDesc("catmark_edgecorner", catmark_edgecorner, kCatmark ) ); g_shapes.push_back( ShapeDesc("catmark_edgeonly", catmark_edgeonly, kCatmark ) ); g_shapes.push_back( ShapeDesc("catmark_fan", catmark_fan, kCatmark ) ); diff --git a/regression/shapes/catmark_chaikin2.h b/regression/shapes/catmark_chaikin2.h new file mode 100644 index 00000000..c6287744 --- /dev/null +++ b/regression/shapes/catmark_chaikin2.h @@ -0,0 +1,70 @@ +// +// Copyright 2014 DreamWorks Animation LLC. +// +// 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_chaikin2 = +"v 1 0 -1\n" +"v 1 1 0\n" +"v 1 0 1\n" +"v 1 -1 0\n" +"v 0.5 0 -1\n" +"v 0.5 1 0\n" +"v 0.5 0 1\n" +"v 0.5 -1 0\n" +"v 0 0 -1\n" +"v 0 1 0\n" +"v 0 0 1\n" +"v 0 -1 0\n" +"v -0.5 0 -1\n" +"v -0.5 1 0\n" +"v -0.5 0 1\n" +"v -0.5 -1 0\n" +"v -1 0 -1\n" +"v -1 1 0\n" +"v -1 0 1\n" +"v -1 -1 0\n" +"\n" +"f 5 6 2 1 \n" +"f 6 7 3 2 \n" +"f 7 8 4 3 \n" +"f 8 5 1 4 \n" +"f 9 10 6 5 \n" +"f 10 11 7 6 \n" +"f 11 12 8 7 \n" +"f 12 9 5 8 \n" +"f 13 14 10 9 \n" +"f 14 15 11 10 \n" +"f 15 16 12 11 \n" +"f 16 13 9 12 \n" +"f 17 18 14 13 \n" +"f 18 19 15 14 \n" +"f 19 20 16 15 \n" +"f 20 17 13 16 \n" +"\n" +"t crease 2/1/0 2 6 0.5\n" +"t crease 2/1/0 6 10 1.5\n" +"t crease 2/1/0 10 14 2.5\n" +"t crease 2/1/0 14 18 3.5\n" +"t creasemethod 0/0/1 chaikin\n" +"\n" +;