mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-08 13:30:04 +00:00
eae467047b
- all include the planar reference from documentation figures - all include the single polygon case (quad or tri) - all edge-only cases include semi-sharp boundary vertices
166 lines
4.3 KiB
C++
166 lines
4.3 KiB
C++
//
|
|
// Copyright 2013 Pixar
|
|
//
|
|
// 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_edgeonly =
|
|
"#\n"
|
|
"# Test cases for BoundaryInterpolation option \"edge only\":\n"
|
|
"#\n"
|
|
"t interpolateboundary 1/0/0 2\n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 1: top-left\n"
|
|
"#\n"
|
|
"v -1.250 0.000 0.250\n"
|
|
"v -0.917 0.000 0.250\n"
|
|
"v -0.583 0.000 0.250\n"
|
|
"v -0.250 0.000 0.250\n"
|
|
"v -1.250 0.000 0.583\n"
|
|
"v -0.917 0.000 0.583\n"
|
|
"v -0.583 0.000 0.583\n"
|
|
"v -0.250 0.000 0.583\n"
|
|
"v -1.250 0.000 0.917\n"
|
|
"v -0.917 0.000 0.917\n"
|
|
"v -0.583 0.000 0.917\n"
|
|
"v -0.250 0.000 0.917\n"
|
|
"v -1.250 0.000 1.250\n"
|
|
"v -0.917 0.000 1.250\n"
|
|
"v -0.583 0.000 1.250\n"
|
|
"v -0.250 0.000 1.250\n"
|
|
"\n"
|
|
"vt 0.000 0.600\n"
|
|
"vt 0.133 0.600\n"
|
|
"vt 0.267 0.600\n"
|
|
"vt 0.400 0.600\n"
|
|
"vt 0.000 0.733\n"
|
|
"vt 0.133 0.733\n"
|
|
"vt 0.267 0.733\n"
|
|
"vt 0.400 0.733\n"
|
|
"vt 0.000 0.867\n"
|
|
"vt 0.133 0.867\n"
|
|
"vt 0.267 0.867\n"
|
|
"vt 0.400 0.867\n"
|
|
"vt 0.000 1.000\n"
|
|
"vt 0.133 1.000\n"
|
|
"vt 0.267 1.000\n"
|
|
"vt 0.400 1.000\n"
|
|
"\n"
|
|
"f 1/1 2/2 6/6 5/5 \n"
|
|
"f 2/2 3/3 7/7 6/6 \n"
|
|
"f 3/3 4/4 8/8 7/7 \n"
|
|
"f 5/5 6/6 10/10 9/9 \n"
|
|
"f 6/6 7/7 11/11 10/10 \n"
|
|
"f 7/7 8/8 12/12 11/11 \n"
|
|
"f 9/9 10/10 14/14 13/13 \n"
|
|
"f 10/10 11/11 15/15 14/14 \n"
|
|
"f 11/11 12/12 16/16 15/15 \n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 2: top-right\n"
|
|
"#\n"
|
|
"v 0.250 0.000 0.250\n"
|
|
"v 0.583 -0.250 0.250\n"
|
|
"v 0.917 -0.250 0.250\n"
|
|
"v 1.250 0.000 0.250\n"
|
|
"v 0.250 0.000 0.583\n"
|
|
"v 0.583 -0.250 0.583\n"
|
|
"v 0.917 -0.250 0.583\n"
|
|
"v 1.250 0.000 0.583\n"
|
|
"v 0.250 0.000 0.917\n"
|
|
"v 0.583 -0.250 0.917\n"
|
|
"v 0.917 -0.250 0.917\n"
|
|
"v 1.250 0.000 0.917\n"
|
|
"v 0.250 0.000 1.250\n"
|
|
"v 0.583 -0.250 1.250\n"
|
|
"v 0.917 -0.250 1.250\n"
|
|
"v 1.250 0.000 1.250\n"
|
|
"\n"
|
|
"vt 0.600 0.600\n"
|
|
"vt 0.733 0.600\n"
|
|
"vt 0.867 0.600\n"
|
|
"vt 1.000 0.600\n"
|
|
"vt 0.600 0.733\n"
|
|
"vt 0.733 0.733\n"
|
|
"vt 0.867 0.733\n"
|
|
"vt 1.000 0.733\n"
|
|
"vt 0.600 0.867\n"
|
|
"vt 0.733 0.867\n"
|
|
"vt 0.867 0.867\n"
|
|
"vt 1.000 0.867\n"
|
|
"vt 0.600 1.000\n"
|
|
"vt 0.733 1.000\n"
|
|
"vt 0.867 1.000\n"
|
|
"vt 1.000 1.000\n"
|
|
"\n"
|
|
"f 17/17 18/18 22/22 21/21 \n"
|
|
"f 18/18 19/19 23/23 22/22 \n"
|
|
"f 19/19 20/20 24/24 23/23 \n"
|
|
"f 21/21 22/22 26/26 25/25 \n"
|
|
"f 22/22 23/23 27/27 26/26 \n"
|
|
"f 23/23 24/24 28/28 27/27 \n"
|
|
"f 25/25 26/26 30/30 29/29 \n"
|
|
"f 26/26 27/27 31/31 30/30 \n"
|
|
"f 27/27 28/28 32/32 31/31 \n"
|
|
"\n"
|
|
"# corner tags:\n"
|
|
"t corner 1/1/0 16 10.0\n"
|
|
"t corner 1/1/0 19 10.0\n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 3: bottom-left\n"
|
|
"#\n"
|
|
"v -1.250 0.000 -1.250\n"
|
|
"v -0.250 0.000 -1.250\n"
|
|
"v -1.250 0.000 -0.250\n"
|
|
"v -0.250 0.000 -0.250\n"
|
|
"\n"
|
|
"vt 0.000 0.000\n"
|
|
"vt 0.400 0.000\n"
|
|
"vt 0.000 0.400\n"
|
|
"vt 0.400 0.400\n"
|
|
"\n"
|
|
"f 33/33 34/34 36/36 35/35 \n"
|
|
"\n"
|
|
"#\n"
|
|
"# Shape 4: bottom-right\n"
|
|
"#\n"
|
|
"v 0.250 0.000 -1.250\n"
|
|
"v 1.250 0.000 -1.250\n"
|
|
"v 0.250 0.000 -0.250\n"
|
|
"v 1.250 0.000 -0.250\n"
|
|
"\n"
|
|
"vt 0.600 0.000\n"
|
|
"vt 1.000 0.000\n"
|
|
"vt 0.600 0.400\n"
|
|
"vt 1.000 0.400\n"
|
|
"\n"
|
|
"f 37/37 38/38 40/40 39/39 \n"
|
|
"\n"
|
|
"# corner tags:\n"
|
|
"t corner 1/1/0 36 10.0\n"
|
|
"t corner 1/1/0 37 10.0\n"
|
|
"t corner 1/1/0 38 2.0\n"
|
|
"t corner 1/1/0 39 2.0\n"
|
|
"\n"
|
|
;
|