OpenSubdiv/regression/shapes/loop_cubes_semisharp.h
barry 3c9673c447 Added more regression/shapes for Loop and updated a couple others:
- updated the edge-only and edge-corner shapes consistent with Catmark
    - moved the existing triangulated cube to loop_cube_asymmetric
    - added new loop_cube with symmetric triangulation and limit surface
    - added semi-sharp and inf-sharp variations of cube and icosahedron
    - added shapes with extra-ordinary interior and boundary vertices
    - added shapes with face-varying features similar to Catmark
2019-01-07 15:54:37 -08:00

305 lines
7.1 KiB
C++

//
// Copyright 2018 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_cubes_semisharp =
"#\n"
"# Four shapes ordered left->right and top->bottom in the XZ and UV planes\n"
"#\n"
"# Shape 1: top-left\n"
"#\n"
"v -0.250 -0.500 1.250\n"
"v -0.250 0.500 1.250\n"
"v -1.250 -0.500 1.250\n"
"v -1.250 0.500 1.250\n"
"v -1.250 -0.500 0.250\n"
"v -1.250 0.500 0.250\n"
"v -0.250 -0.500 0.250\n"
"v -0.250 0.500 0.250\n"
"v -0.750 0.000 1.250\n"
"v -1.250 0.000 0.750\n"
"v -0.750 0.000 0.250\n"
"v -0.250 0.000 0.750\n"
"v -0.750 0.500 0.750\n"
"v -0.750 -0.500 0.750\n"
"\n"
"vt 0.250 0.600\n"
"vt 0.200 0.550\n"
"vt 0.300 0.550\n"
"vt 0.300 0.650\n"
"vt 0.200 0.650\n"
"vt 0.250 0.700\n"
"vt 0.300 0.750\n"
"vt 0.200 0.750\n"
"vt 0.250 0.800\n"
"vt 0.300 0.850\n"
"vt 0.200 0.850\n"
"vt 0.250 0.900\n"
"vt 0.300 0.950\n"
"vt 0.200 0.950\n"
"vt 0.350 0.600\n"
"vt 0.400 0.550\n"
"vt 0.400 0.650\n"
"vt 0.150 0.600\n"
"vt 0.100 0.550\n"
"vt 0.100 0.650\n"
"\n"
"f 9/1 1/2 2/3 \n"
"f 9/1 2/3 4/4 \n"
"f 9/1 4/4 3/5 \n"
"f 9/1 3/5 1/2 \n"
"f 10/6 3/5 4/4 \n"
"f 10/6 4/4 6/7 \n"
"f 10/6 6/7 5/8 \n"
"f 10/6 5/8 3/5 \n"
"f 11/9 5/8 6/7 \n"
"f 11/9 6/7 8/10 \n"
"f 11/9 8/10 7/11 \n"
"f 11/9 7/11 5/8 \n"
"f 12/12 7/11 8/10 \n"
"f 12/12 8/10 2/13 \n"
"f 12/12 2/13 1/14 \n"
"f 12/12 1/14 7/11 \n"
"f 13/15 2/3 8/16 \n"
"f 13/15 8/16 6/17 \n"
"f 13/15 6/17 4/4 \n"
"f 13/15 4/4 2/3 \n"
"f 14/18 7/19 1/2 \n"
"f 14/18 1/2 3/5 \n"
"f 14/18 3/5 5/20 \n"
"f 14/18 5/20 7/19 \n"
"\n"
"t corner 1/1/0 0 2.5\n"
"\n"
"#\n"
"# Shape 2: top-right\n"
"#\n"
"v 1.250 -0.500 1.250\n"
"v 1.250 0.500 1.250\n"
"v 0.250 -0.500 1.250\n"
"v 0.250 0.500 1.250\n"
"v 0.250 -0.500 0.250\n"
"v 0.250 0.500 0.250\n"
"v 1.250 -0.500 0.250\n"
"v 1.250 0.500 0.250\n"
"v 0.750 0.000 1.250\n"
"v 0.250 0.000 0.750\n"
"v 0.750 0.000 0.250\n"
"v 1.250 0.000 0.750\n"
"v 0.750 0.500 0.750\n"
"v 0.750 -0.500 0.750\n"
"\n"
"vt 0.750 0.600\n"
"vt 0.700 0.550\n"
"vt 0.800 0.550\n"
"vt 0.800 0.650\n"
"vt 0.700 0.650\n"
"vt 0.750 0.700\n"
"vt 0.800 0.750\n"
"vt 0.700 0.750\n"
"vt 0.750 0.800\n"
"vt 0.800 0.850\n"
"vt 0.700 0.850\n"
"vt 0.750 0.900\n"
"vt 0.800 0.950\n"
"vt 0.700 0.950\n"
"vt 0.850 0.600\n"
"vt 0.900 0.550\n"
"vt 0.900 0.650\n"
"vt 0.650 0.600\n"
"vt 0.600 0.550\n"
"vt 0.600 0.650\n"
"\n"
"f 23/21 15/22 16/23 \n"
"f 23/21 16/23 18/24 \n"
"f 23/21 18/24 17/25 \n"
"f 23/21 17/25 15/22 \n"
"f 24/26 17/25 18/24 \n"
"f 24/26 18/24 20/27 \n"
"f 24/26 20/27 19/28 \n"
"f 24/26 19/28 17/25 \n"
"f 25/29 19/28 20/27 \n"
"f 25/29 20/27 22/30 \n"
"f 25/29 22/30 21/31 \n"
"f 25/29 21/31 19/28 \n"
"f 26/32 21/31 22/30 \n"
"f 26/32 22/30 16/33 \n"
"f 26/32 16/33 15/34 \n"
"f 26/32 15/34 21/31 \n"
"f 27/35 16/23 22/36 \n"
"f 27/35 22/36 20/37 \n"
"f 27/35 20/37 18/24 \n"
"f 27/35 18/24 16/23 \n"
"f 28/38 21/39 15/22 \n"
"f 28/38 15/22 17/25 \n"
"f 28/38 17/25 19/40 \n"
"f 28/38 19/40 21/39 \n"
"\n"
"t corner 1/1/0 14 4.5\n"
"\n"
"#\n"
"# Shape 3: bottom-left\n"
"#\n"
"v -0.250 -0.500 -0.250\n"
"v -0.250 0.500 -0.250\n"
"v -1.250 -0.500 -0.250\n"
"v -1.250 0.500 -0.250\n"
"v -1.250 -0.500 -1.250\n"
"v -1.250 0.500 -1.250\n"
"v -0.250 -0.500 -1.250\n"
"v -0.250 0.500 -1.250\n"
"v -0.750 0.000 -0.250\n"
"v -1.250 0.000 -0.750\n"
"v -0.750 0.000 -1.250\n"
"v -0.250 0.000 -0.750\n"
"v -0.750 0.500 -0.750\n"
"v -0.750 -0.500 -0.750\n"
"\n"
"vt 0.250 0.100\n"
"vt 0.200 0.050\n"
"vt 0.300 0.050\n"
"vt 0.300 0.150\n"
"vt 0.200 0.150\n"
"vt 0.250 0.200\n"
"vt 0.300 0.250\n"
"vt 0.200 0.250\n"
"vt 0.250 0.300\n"
"vt 0.300 0.350\n"
"vt 0.200 0.350\n"
"vt 0.250 0.400\n"
"vt 0.300 0.450\n"
"vt 0.200 0.450\n"
"vt 0.350 0.100\n"
"vt 0.400 0.050\n"
"vt 0.400 0.150\n"
"vt 0.150 0.100\n"
"vt 0.100 0.050\n"
"vt 0.100 0.150\n"
"\n"
"f 37/41 29/42 30/43 \n"
"f 37/41 30/43 32/44 \n"
"f 37/41 32/44 31/45 \n"
"f 37/41 31/45 29/42 \n"
"f 38/46 31/45 32/44 \n"
"f 38/46 32/44 34/47 \n"
"f 38/46 34/47 33/48 \n"
"f 38/46 33/48 31/45 \n"
"f 39/49 33/48 34/47 \n"
"f 39/49 34/47 36/50 \n"
"f 39/49 36/50 35/51 \n"
"f 39/49 35/51 33/48 \n"
"f 40/52 35/51 36/50 \n"
"f 40/52 36/50 30/53 \n"
"f 40/52 30/53 29/54 \n"
"f 40/52 29/54 35/51 \n"
"f 41/55 30/43 36/56 \n"
"f 41/55 36/56 34/57 \n"
"f 41/55 34/57 32/44 \n"
"f 41/55 32/44 30/43 \n"
"f 42/58 35/59 29/42 \n"
"f 42/58 29/42 31/45 \n"
"f 42/58 31/45 33/60 \n"
"f 42/58 33/60 35/59 \n"
"\n"
"t crease 2/1/0 30 28 4.5\n"
"t crease 2/1/0 28 34 4.5\n"
"\n"
"#\n"
"# Shape 4: bottom-right\n"
"#\n"
"v 1.250 -0.500 -0.250\n"
"v 1.250 0.500 -0.250\n"
"v 0.250 -0.500 -0.250\n"
"v 0.250 0.500 -0.250\n"
"v 0.250 -0.500 -1.250\n"
"v 0.250 0.500 -1.250\n"
"v 1.250 -0.500 -1.250\n"
"v 1.250 0.500 -1.250\n"
"v 0.750 0.000 -0.250\n"
"v 0.250 0.000 -0.750\n"
"v 0.750 0.000 -1.250\n"
"v 1.250 0.000 -0.750\n"
"v 0.750 0.500 -0.750\n"
"v 0.750 -0.500 -0.750\n"
"\n"
"vt 0.750 0.100\n"
"vt 0.700 0.050\n"
"vt 0.800 0.050\n"
"vt 0.800 0.150\n"
"vt 0.700 0.150\n"
"vt 0.750 0.200\n"
"vt 0.800 0.250\n"
"vt 0.700 0.250\n"
"vt 0.750 0.300\n"
"vt 0.800 0.350\n"
"vt 0.700 0.350\n"
"vt 0.750 0.400\n"
"vt 0.800 0.450\n"
"vt 0.700 0.450\n"
"vt 0.850 0.100\n"
"vt 0.900 0.050\n"
"vt 0.900 0.150\n"
"vt 0.650 0.100\n"
"vt 0.600 0.050\n"
"vt 0.600 0.150\n"
"\n"
"f 51/61 43/62 44/63 \n"
"f 51/61 44/63 46/64 \n"
"f 51/61 46/64 45/65 \n"
"f 51/61 45/65 43/62 \n"
"f 52/66 45/65 46/64 \n"
"f 52/66 46/64 48/67 \n"
"f 52/66 48/67 47/68 \n"
"f 52/66 47/68 45/65 \n"
"f 53/69 47/68 48/67 \n"
"f 53/69 48/67 50/70 \n"
"f 53/69 50/70 49/71 \n"
"f 53/69 49/71 47/68 \n"
"f 54/72 49/71 50/70 \n"
"f 54/72 50/70 44/73 \n"
"f 54/72 44/73 43/74 \n"
"f 54/72 43/74 49/71 \n"
"f 55/75 44/63 50/76 \n"
"f 55/75 50/76 48/77 \n"
"f 55/75 48/77 46/64 \n"
"f 55/75 46/64 44/63 \n"
"f 56/78 49/79 43/62 \n"
"f 56/78 43/62 45/65 \n"
"f 56/78 45/65 47/80 \n"
"f 56/78 47/80 49/79 \n"
"\n"
"t crease 2/1/0 42 43 0.0\n"
"t crease 2/1/0 43 45 7.0\n"
"t crease 2/1/0 45 44 7.0\n"
"t crease 2/1/0 44 42 7.0\n"
"t crease 2/1/0 46 47 7.0\n"
"t crease 2/1/0 47 49 7.0\n"
"t crease 2/1/0 49 48 7.0\n"
"t crease 2/1/0 48 46 7.0\n"
"t crease 2/1/0 42 48 7.0\n"
"t crease 2/1/0 43 49 7.0\n"
"t crease 2/1/0 44 46 7.0\n"
"t crease 2/1/0 45 47 7.0\n"
"\n"
;