2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* Contributor(s): Joseph Eagar.
20
* ***** END GPL LICENSE BLOCK *****
23
/** \file blender/bmesh/operators/bmo_subdivide.h
27
#ifndef __BMO_SUBDIVIDE_H__
28
#define __BMO_SUBDIVIDE_H__
30
typedef struct SubDParams {
40
int origkey; /* shapekey holding displaced vertex coordinates for current geometry */
42
BMOpSlot *slot_edge_percents; /* BMO_slot_get(params->op->slots_in, "edge_percents"); */
43
BMOpSlot *slot_custom_patterns; /* BMO_slot_get(params->op->slots_in, "custom_patterns"); */
47
typedef void (*subd_pattern_fill_fp)(BMesh *bm, BMFace *face, BMVert **verts,
48
const SubDParams *params);
51
* note: this is a pattern-based edge subdivider.
52
* it tries to match a pattern to edge selections on faces,
53
* then executes functions to cut them.
55
typedef struct SubDPattern {
56
int seledges[20]; /* selected edges mask, for splitting */
58
/* verts starts at the first new vert cut, not the first vert in the face */
59
subd_pattern_fill_fp connectexec;
60
int len; /* total number of verts, before any subdivision */
63
/* generic subdivision rules:
65
* - two selected edges in a face should make a link
68
* - one edge should do, what? make pretty topology, or just
69
* split the edge only?
72
#endif /* __BMO_SUBDIVIDE_H__ */