Blender  V3.3
subdiv_converter.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2018 Blender Foundation. All rights reserved. */
3 
4 #pragma once
5 
10 #include "BKE_subdiv.h"
11 
12 /* NOTE: Was initially used to get proper enumerator types, but this makes
13  * it tricky to compile without OpenSubdiv. */
14 /* #include "opensubdiv_converter_capi.h" */
15 
16 struct Mesh;
18 struct SubdivSettings;
19 
21  const struct SubdivSettings *settings,
22  const struct Mesh *mesh);
23 
24 /* NOTE: Frees converter data, but not converter itself. This means, that if
25  * converter was allocated on heap, it is up to the user to free that memory. */
26 void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter);
27 
28 /* ============================ INTERNAL HELPERS ============================ */
29 
30 /* TODO(sergey): Find a way to make it OpenSubdiv_VtxBoundaryInterpolation,
31  * without breaking compilation without OpenSubdiv. */
33 
34 /* TODO(sergey): Find a way to make it OpenSubdiv_FVarLinearInterpolation,
35  * without breaking compilation without OpenSubdiv. */
int BKE_subdiv_converter_fvar_linear_from_settings(const SubdivSettings *settings)
void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter)
int BKE_subdiv_converter_vtx_boundary_interpolation_from_settings(const SubdivSettings *settings)
void BKE_subdiv_converter_init_for_mesh(struct OpenSubdiv_Converter *converter, const struct SubdivSettings *settings, const struct Mesh *mesh)