Blender  V3.3
type_convert.h
Go to the documentation of this file.
1 // Copyright 2018 Blender Foundation. All rights reserved.
2 //
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software Foundation,
15 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 //
17 // Author: Sergey Sharybin
18 
19 #ifndef OPENSUBDIV_BASE_TYPE_CONVERT_H_
20 #define OPENSUBDIV_BASE_TYPE_CONVERT_H_
21 
22 #ifdef _MSC_VER
23 # include <iso646.h>
24 #endif
25 
26 #include <opensubdiv/sdc/options.h>
27 #include <opensubdiv/sdc/types.h>
28 
29 #include "opensubdiv_capi_type.h"
30 
32 
33 namespace blender {
34 namespace opensubdiv {
35 
36 // Convert scheme type from C-API enum to an OpenSubdiv native enum.
37 OpenSubdiv::Sdc::SchemeType getSchemeTypeFromCAPI(OpenSubdiv_SchemeType type);
38 
39 // Convert face-varying interpolation type from C-API to an OpenSubdiv
40 // native enum.
41 OpenSubdiv::Sdc::Options::FVarLinearInterpolation getFVarLinearInterpolationFromCAPI(
43 
44 // Similar to above, just other way around.
46  OpenSubdiv::Sdc::Options::FVarLinearInterpolation linear_interpolation);
47 
48 OpenSubdiv::Sdc::Options::VtxBoundaryInterpolation getVtxBoundaryInterpolationFromCAPI(
49  OpenSubdiv_VtxBoundaryInterpolation boundary_interpolation);
50 
51 } // namespace opensubdiv
52 } // namespace blender
53 
54 #endif // OPENSUBDIV_BASE_TYPE_CONVERT_H_
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
static void linear_interpolation(const T &a, const T &b, MutableSpan< T > dst)
OpenSubdiv_FVarLinearInterpolation getCAPIFVarLinearInterpolationFromOSD(OpenSubdiv::Sdc::Options::FVarLinearInterpolation linear_interpolation)
Definition: type_convert.cc:67
OpenSubdiv::Sdc::Options::VtxBoundaryInterpolation getVtxBoundaryInterpolationFromCAPI(OpenSubdiv_VtxBoundaryInterpolation boundary_interpolation)
Definition: type_convert.cc:89
OpenSubdiv::Sdc::SchemeType getSchemeTypeFromCAPI(OpenSubdiv_SchemeType type)
Definition: type_convert.cc:31
OpenSubdiv::Sdc::Options::FVarLinearInterpolation getFVarLinearInterpolationFromCAPI(OpenSubdiv_FVarLinearInterpolation linear_interpolation)
Definition: type_convert.cc:45
OpenSubdiv_FVarLinearInterpolation
OpenSubdiv_VtxBoundaryInterpolation
OpenSubdiv_SchemeType