mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2025-01-05 06:21:07 +00:00
301 lines
8.0 KiB
C++
301 lines
8.0 KiB
C++
//
|
|
// Copyright 2020 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 loop_triangle_edgenone =
|
|
"#\n"
|
|
"# Test cases for BoundaryInterpolation option \"none\":\n"
|
|
"#\n"
|
|
"t interpolateboundary 1/0/0 0\n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 1: top-left\n"
|
|
"#\n"
|
|
"v -1.250 0.000 0.250\n"
|
|
"v -1.000 0.000 0.250\n"
|
|
"v -0.750 0.000 0.250\n"
|
|
"v -0.500 0.000 0.250\n"
|
|
"v -0.250 0.000 0.250\n"
|
|
"v -1.125 0.000 0.500\n"
|
|
"v -0.875 0.000 0.500\n"
|
|
"v -0.625 0.000 0.500\n"
|
|
"v -0.375 0.000 0.500\n"
|
|
"v -1.000 0.000 0.750\n"
|
|
"v -0.750 0.000 0.750\n"
|
|
"v -0.500 0.000 0.750\n"
|
|
"v -0.875 0.000 1.000\n"
|
|
"v -0.625 0.000 1.000\n"
|
|
"v -0.750 0.000 1.250\n"
|
|
"\n"
|
|
"vt 0.000 0.600\n"
|
|
"vt 0.100 0.600\n"
|
|
"vt 0.200 0.600\n"
|
|
"vt 0.300 0.600\n"
|
|
"vt 0.400 0.600\n"
|
|
"vt 0.050 0.700\n"
|
|
"vt 0.150 0.700\n"
|
|
"vt 0.250 0.700\n"
|
|
"vt 0.350 0.700\n"
|
|
"vt 0.100 0.800\n"
|
|
"vt 0.200 0.800\n"
|
|
"vt 0.300 0.800\n"
|
|
"vt 0.150 0.900\n"
|
|
"vt 0.250 0.900\n"
|
|
"vt 0.200 1.000\n"
|
|
"\n"
|
|
"f 1/1 2/2 6/6 \n"
|
|
"f 2/2 3/3 7/7 \n"
|
|
"f 3/3 4/4 8/8 \n"
|
|
"f 4/4 5/5 9/9 \n"
|
|
"f 2/2 7/7 6/6 \n"
|
|
"f 3/3 8/8 7/7 \n"
|
|
"f 4/4 9/9 8/8 \n"
|
|
"f 6/6 7/7 10/10 \n"
|
|
"f 7/7 8/8 11/11 \n"
|
|
"f 8/8 9/9 12/12 \n"
|
|
"f 7/7 11/11 10/10 \n"
|
|
"f 8/8 12/12 11/11 \n"
|
|
"f 10/10 11/11 13/13 \n"
|
|
"f 11/11 12/12 14/14 \n"
|
|
"f 11/11 14/14 13/13 \n"
|
|
"f 13/13 14/14 15/15 \n"
|
|
"\n"
|
|
"# crease tags for perimeter:\n"
|
|
"#t crease 2/1/0 0 1 10.0\n"
|
|
"#t crease 2/1/0 1 2 10.0\n"
|
|
"#t crease 2/1/0 2 3 10.0\n"
|
|
"#t crease 2/1/0 3 4 10.0\n"
|
|
"#t crease 2/1/0 4 8 10.0\n"
|
|
"#t crease 2/1/0 8 11 10.0\n"
|
|
"#t crease 2/1/0 11 13 10.0\n"
|
|
"#t crease 2/1/0 13 14 10.0\n"
|
|
"#t crease 2/1/0 14 12 10.0\n"
|
|
"#t crease 2/1/0 12 9 10.0\n"
|
|
"#t crease 2/1/0 9 5 10.0\n"
|
|
"#t crease 2/1/0 5 0 10.0\n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 2: top-right\n"
|
|
"#\n"
|
|
"v 0.250 0.000 0.250\n"
|
|
"v 0.500 0.000 0.250\n"
|
|
"v 0.750 -0.250 0.250\n"
|
|
"v 1.000 0.000 0.250\n"
|
|
"v 1.250 0.000 0.250\n"
|
|
"v 0.375 0.000 0.500\n"
|
|
"v 0.625 -0.250 0.500\n"
|
|
"v 0.875 -0.250 0.500\n"
|
|
"v 1.125 0.000 0.500\n"
|
|
"v 0.500 -0.250 0.750\n"
|
|
"v 0.750 -0.250 0.750\n"
|
|
"v 1.000 -0.250 0.750\n"
|
|
"v 0.625 0.000 1.000\n"
|
|
"v 0.875 0.000 1.000\n"
|
|
"v 0.750 0.000 1.250\n"
|
|
"\n"
|
|
"vt 0.600 0.600\n"
|
|
"vt 0.700 0.600\n"
|
|
"vt 0.800 0.600\n"
|
|
"vt 0.900 0.600\n"
|
|
"vt 1.000 0.600\n"
|
|
"vt 0.650 0.700\n"
|
|
"vt 0.750 0.700\n"
|
|
"vt 0.850 0.700\n"
|
|
"vt 0.950 0.700\n"
|
|
"vt 0.700 0.800\n"
|
|
"vt 0.800 0.800\n"
|
|
"vt 0.900 0.800\n"
|
|
"vt 0.750 0.900\n"
|
|
"vt 0.850 0.900\n"
|
|
"vt 0.800 1.000\n"
|
|
"\n"
|
|
"f 16/16 17/17 21/21 \n"
|
|
"f 17/17 18/18 22/22 \n"
|
|
"f 18/18 19/19 23/23 \n"
|
|
"f 19/19 20/20 24/24 \n"
|
|
"f 17/17 22/22 21/21 \n"
|
|
"f 18/18 23/23 22/22 \n"
|
|
"f 19/19 24/24 23/23 \n"
|
|
"f 21/21 22/22 25/25 \n"
|
|
"f 22/22 23/23 26/26 \n"
|
|
"f 23/23 24/24 27/27 \n"
|
|
"f 22/22 26/26 25/25 \n"
|
|
"f 23/23 27/27 26/26 \n"
|
|
"f 25/25 26/26 28/28 \n"
|
|
"f 26/26 27/27 29/29 \n"
|
|
"f 26/26 29/29 28/28 \n"
|
|
"f 28/28 29/29 30/30 \n"
|
|
"\n"
|
|
"# crease tags for perimeter:\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 17 18 10.0\n"
|
|
"t crease 2/1/0 18 19 10.0\n"
|
|
"#t crease 2/1/0 19 23 10.0\n"
|
|
"#t crease 2/1/0 23 26 10.0\n"
|
|
"#t crease 2/1/0 26 28 10.0\n"
|
|
"#t crease 2/1/0 28 29 10.0\n"
|
|
"#t crease 2/1/0 29 27 10.0\n"
|
|
"#t crease 2/1/0 27 24 10.0\n"
|
|
"#t crease 2/1/0 24 20 10.0\n"
|
|
"#t crease 2/1/0 20 15 10.0\n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 3: bottom-left\n"
|
|
"#\n"
|
|
"v -1.250 0.000 -1.250\n"
|
|
"v -1.000 0.000 -1.250\n"
|
|
"v -0.750 -0.250 -1.250\n"
|
|
"v -0.500 0.000 -1.250\n"
|
|
"v -0.250 0.000 -1.250\n"
|
|
"v -1.125 0.000 -1.000\n"
|
|
"v -0.875 -0.250 -1.000\n"
|
|
"v -0.625 -0.250 -1.000\n"
|
|
"v -0.375 0.000 -1.000\n"
|
|
"v -1.000 -0.250 -0.750\n"
|
|
"v -0.750 -0.250 -0.750\n"
|
|
"v -0.500 -0.250 -0.750\n"
|
|
"v -0.875 0.000 -0.500\n"
|
|
"v -0.625 0.000 -0.500\n"
|
|
"v -0.750 0.000 -0.250\n"
|
|
"\n"
|
|
"vt 0.000 0.000\n"
|
|
"vt 0.100 0.000\n"
|
|
"vt 0.200 0.000\n"
|
|
"vt 0.300 0.000\n"
|
|
"vt 0.400 0.000\n"
|
|
"vt 0.050 0.100\n"
|
|
"vt 0.150 0.100\n"
|
|
"vt 0.250 0.100\n"
|
|
"vt 0.350 0.100\n"
|
|
"vt 0.100 0.200\n"
|
|
"vt 0.200 0.200\n"
|
|
"vt 0.300 0.200\n"
|
|
"vt 0.150 0.300\n"
|
|
"vt 0.250 0.300\n"
|
|
"vt 0.200 0.400\n"
|
|
"\n"
|
|
"f 31/31 32/32 36/36 \n"
|
|
"f 32/32 33/33 37/37 \n"
|
|
"f 33/33 34/34 38/38 \n"
|
|
"f 34/34 35/35 39/39 \n"
|
|
"f 32/32 37/37 36/36 \n"
|
|
"f 33/33 38/38 37/37 \n"
|
|
"f 34/34 39/39 38/38 \n"
|
|
"f 36/36 37/37 40/40 \n"
|
|
"f 37/37 38/38 41/41 \n"
|
|
"f 38/38 39/39 42/42 \n"
|
|
"f 37/37 41/41 40/40 \n"
|
|
"f 38/38 42/42 41/41 \n"
|
|
"f 40/40 41/41 43/43 \n"
|
|
"f 41/41 42/42 44/44 \n"
|
|
"f 41/41 44/44 43/43 \n"
|
|
"f 43/43 44/44 45/45 \n"
|
|
"\n"
|
|
"# crease tags for perimeter:\n"
|
|
"t crease 2/1/0 30 31 10.0\n"
|
|
"t crease 2/1/0 31 32 10.0\n"
|
|
"t crease 2/1/0 32 33 10.0\n"
|
|
"t crease 2/1/0 33 34 10.0\n"
|
|
"t crease 2/1/0 34 38 10.0\n"
|
|
"t crease 2/1/0 38 41 10.0\n"
|
|
"t crease 2/1/0 41 43 10.0\n"
|
|
"t crease 2/1/0 43 44 10.0\n"
|
|
"#t crease 2/1/0 44 42 10.0\n"
|
|
"#t crease 2/1/0 42 39 10.0\n"
|
|
"#t crease 2/1/0 39 35 10.0\n"
|
|
"#t crease 2/1/0 35 30 10.0\n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 4: bottom-right\n"
|
|
"#\n"
|
|
"v 0.250 0.000 -1.250\n"
|
|
"v 0.500 0.000 -1.250\n"
|
|
"v 0.750 -0.250 -1.250\n"
|
|
"v 1.000 0.000 -1.250\n"
|
|
"v 1.250 0.000 -1.250\n"
|
|
"v 0.375 0.000 -1.000\n"
|
|
"v 0.625 -0.250 -1.000\n"
|
|
"v 0.875 -0.250 -1.000\n"
|
|
"v 1.125 0.000 -1.000\n"
|
|
"v 0.500 -0.250 -0.750\n"
|
|
"v 0.750 -0.250 -0.750\n"
|
|
"v 1.000 -0.250 -0.750\n"
|
|
"v 0.625 0.000 -0.500\n"
|
|
"v 0.875 0.000 -0.500\n"
|
|
"v 0.750 0.000 -0.250\n"
|
|
"\n"
|
|
"vt 0.600 0.000\n"
|
|
"vt 0.700 0.000\n"
|
|
"vt 0.800 0.000\n"
|
|
"vt 0.900 0.000\n"
|
|
"vt 1.000 0.000\n"
|
|
"vt 0.650 0.100\n"
|
|
"vt 0.750 0.100\n"
|
|
"vt 0.850 0.100\n"
|
|
"vt 0.950 0.100\n"
|
|
"vt 0.700 0.200\n"
|
|
"vt 0.800 0.200\n"
|
|
"vt 0.900 0.200\n"
|
|
"vt 0.750 0.300\n"
|
|
"vt 0.850 0.300\n"
|
|
"vt 0.800 0.400\n"
|
|
"\n"
|
|
"f 46/46 47/47 51/51 \n"
|
|
"f 47/47 48/48 52/52 \n"
|
|
"f 48/48 49/49 53/53 \n"
|
|
"f 49/49 50/50 54/54 \n"
|
|
"f 47/47 52/52 51/51 \n"
|
|
"f 48/48 53/53 52/52 \n"
|
|
"f 49/49 54/54 53/53 \n"
|
|
"f 51/51 52/52 55/55 \n"
|
|
"f 52/52 53/53 56/56 \n"
|
|
"f 53/53 54/54 57/57 \n"
|
|
"f 52/52 56/56 55/55 \n"
|
|
"f 53/53 57/57 56/56 \n"
|
|
"f 55/55 56/56 58/58 \n"
|
|
"f 56/56 57/57 59/59 \n"
|
|
"f 56/56 59/59 58/58 \n"
|
|
"f 58/58 59/59 60/60 \n"
|
|
"\n"
|
|
"# crease tags for perimeter:\n"
|
|
"t crease 2/1/0 45 46 10.0\n"
|
|
"t crease 2/1/0 46 47 10.0\n"
|
|
"t crease 2/1/0 47 48 10.0\n"
|
|
"t crease 2/1/0 48 49 10.0\n"
|
|
"\n"
|
|
"t crease 2/1/0 49 53 10.0\n"
|
|
"t crease 2/1/0 53 56 10.0\n"
|
|
"t crease 2/1/0 56 58 10.0\n"
|
|
"#t crease 2/1/0 58 59 10.0\n"
|
|
"\n"
|
|
"#t crease 2/1/0 59 57 10.0\n"
|
|
"t crease 2/1/0 57 54 10.0\n"
|
|
"t crease 2/1/0 54 50 10.0\n"
|
|
"t crease 2/1/0 50 45 10.0\n"
|
|
"\n"
|
|
"t corner 1/1/0 45 10.0\n"
|
|
"t corner 1/1/0 49 10.0\n"
|
|
"\n"
|
|
;
|