Blender
V3.3
source
blender
blenkernel
BKE_subdiv_mesh.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
8
#pragma once
9
10
#include "
BLI_sys_types.h
"
11
12
#ifdef __cplusplus
13
extern
"C"
{
14
#endif
15
16
struct
Mesh
;
17
struct
MEdge
;
18
struct
Subdiv
;
19
20
typedef
struct
SubdivToMeshSettings
{
21
/* Resolution at which regular ptex (created for quad polygon) are being
22
* evaluated. This defines how many vertices final mesh will have: every
23
* regular ptex has resolution^2 vertices. Special (irregular, or ptex
24
* created for a corner of non-quad polygon) will have resolution of
25
* `resolution - 1`.
26
*/
27
int
resolution
;
28
/* When true, only edges emitted from coarse ones will be displayed. */
29
bool
use_optimal_display
;
30
}
SubdivToMeshSettings
;
31
32
/* Create real hi-res mesh from subdivision, all geometry is "real". */
33
struct
Mesh
*
BKE_subdiv_to_mesh
(
struct
Subdiv
*subdiv,
34
const
SubdivToMeshSettings
*settings,
35
const
struct
Mesh
*coarse_mesh);
36
37
/* Interpolate a position along the `coarse_edge` at the relative `u` coordinate. If `is_simple` is
38
* false, this will perform a B-Spline interpolation using the edge neighbors, otherwise a linear
39
* interpolation will be done base on the edge vertices. */
40
void
BKE_subdiv_mesh_interpolate_position_on_edge
(
const
struct
Mesh
*coarse_mesh,
41
const
struct
MEdge
*coarse_edge,
42
bool
is_simple,
43
float
u,
44
float
pos_r[3]);
45
#ifdef __cplusplus
46
}
47
#endif
BKE_subdiv_to_mesh
struct Mesh * BKE_subdiv_to_mesh(struct Subdiv *subdiv, const SubdivToMeshSettings *settings, const struct Mesh *coarse_mesh)
BKE_subdiv_mesh_interpolate_position_on_edge
void BKE_subdiv_mesh_interpolate_position_on_edge(const struct Mesh *coarse_mesh, const struct MEdge *coarse_edge, bool is_simple, float u, float pos_r[3])
SubdivToMeshSettings
struct SubdivToMeshSettings SubdivToMeshSettings
BLI_sys_types.h
MEdge
Definition:
DNA_meshdata_types.h:43
Mesh
Definition:
DNA_mesh_types.h:151
SubdivToMeshSettings
Definition:
BKE_subdiv_mesh.h:20
SubdivToMeshSettings::resolution
int resolution
Definition:
BKE_subdiv_mesh.h:27
SubdivToMeshSettings::use_optimal_display
bool use_optimal_display
Definition:
BKE_subdiv_mesh.h:29
Subdiv
Definition:
BKE_subdiv.h:156
Generated on Sat Jul 27 2024 14:57:55 for Blender by
doxygen
1.9.1