mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-08 13:30:04 +00:00
815e54edd0
Although valence 2 gregory patch is not well supported yet, this fix mitigates artifacts around such a vertex. Adding a shape catmark_gregory_test8 to see this issue.
70 lines
2.4 KiB
C++
70 lines
2.4 KiB
C++
//
|
|
// Copyright 2014 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_gregory_test8 = std::string(
|
|
"v -1.000000 0.500000 0.500000\n"
|
|
"v 0.000000 1.000000 1.00000\n"
|
|
"v 1.000000 0.500000 0.500000\n"
|
|
"v -1.000000 0.500000 -0.500000\n"
|
|
"v 1.000000 0.500000 -0.500000\n"
|
|
"v -1.000000 -0.500000 -0.500000\n"
|
|
"v 1.000000 -0.500000 -0.500000\n"
|
|
"v -1.000000 -0.500000 0.500000\n"
|
|
"v 1.000000 -0.500000 0.500000\n"
|
|
"vt 0.375000 0.000000 \n"
|
|
"vt 0.500000 0.000000 \n"
|
|
"vt 0.625000 0.000000 \n"
|
|
"vt 0.375000 0.250000 \n"
|
|
"vt 0.625000 0.250000 \n"
|
|
"vt 0.375000 0.500000 \n"
|
|
"vt 0.625000 0.500000 \n"
|
|
"vt 0.375000 0.750000 \n"
|
|
"vt 0.500000 0.750000 \n"
|
|
"vt 0.625000 0.750000 \n"
|
|
"vt 0.375000 1.000000 \n"
|
|
"vt 0.500000 1.000000 \n"
|
|
"vt 0.625000 1.000000 \n"
|
|
"vt 0.875000 0.000000 \n"
|
|
"vt 0.875000 0.250000 \n"
|
|
"vt 0.125000 0.000000 \n"
|
|
"vt 0.125000 0.250000 \n"
|
|
"vn -0.528722 0.664008 0.528722\n"
|
|
"vn 0.000000 0.707107 0.707107\n"
|
|
"vn 0.528722 0.664008 0.528722\n"
|
|
"vn -0.577350 0.577350 -0.577350\n"
|
|
"vn 0.577350 0.577350 -0.577350\n"
|
|
"vn -0.577350 -0.577350 -0.577350\n"
|
|
"vn 0.577350 -0.577350 -0.577350\n"
|
|
"vn -0.528722 -0.664008 0.528722\n"
|
|
"vn 0.000000 -0.707107 0.707107\n"
|
|
"vn 0.528722 -0.664008 0.528722\n"
|
|
"s off\n"
|
|
"f 4/4/4 1/1/1 2/2/2 3/3/3 5/5/5\n"
|
|
"f 6/6/6 4/4/4 5/5/5 7/7/7\n"
|
|
"f 8/8/8 6/6/6 7/7/7 9/9/9\n"
|
|
"f 2/12/2 1/11/1 8/8/8 9/9/9 3/13/3\n"
|
|
"f 3/3/3 9/14/10 7/15/7 5/5/5\n"
|
|
"f 8/16/8 1/1/1 4/4/4 6/17/6\n"
|
|
);
|