Blender  V3.3
multires_unsubdivide.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2020 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #include "BLI_sys_types.h"
11 
12 struct BMesh;
13 struct Mesh;
15 
16 typedef struct MultiresUnsubdivideGrid {
17  /* For sanity checks. */
19  int grid_size;
20 
22  float (*grid_co)[3];
23 
25 
27  /* Input Mesh to un-subdivide. */
30 
33 
35  struct Mesh *base_mesh;
36 
39 
42 
48 
50  int num_grids;
52 
53  /* Private data. */
58 
59 /* --------------------------------------------------------------------
60  * Construct/destruct reshape context.
61  */
62 
64  struct Mesh *original_mesh,
65  struct MultiresModifierData *mmd);
67 
68 /* --------------------------------------------------------------------
69  * Rebuild Lower Subdivisions.
70  */
71 
72 /* Rebuilds all subdivision to the level 0 base mesh. */
typedef float(TangentPoint)[2]
struct MultiresUnsubdivideContext MultiresUnsubdivideContext
bool multires_unsubdivide_to_basemesh(MultiresUnsubdivideContext *context)
void multires_unsubdivide_context_init(MultiresUnsubdivideContext *context, struct Mesh *original_mesh, struct MultiresModifierData *mmd)
struct MultiresUnsubdivideGrid MultiresUnsubdivideGrid
void multires_unsubdivide_context_free(MultiresUnsubdivideContext *context)
struct MultiresUnsubdivideGrid * base_mesh_grids