Welcome to mirror list, hosted at ThFree Co, Russian Federation.

subdivideop.h « operators « bmesh « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 966cd90cbde36f44721832133b3c33ac0afee07c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef _SUBDIVIDEOP_H
#define _SUBDIVIDEOP_H

typedef struct subdparams {
	int numcuts;
	float smooth;
	float fractal;
	int beauty;
	int seed;
	int origkey; /*shapekey holding displaced vertex coordinates for current geometry*/
	BMOperator *op;
	float off[3];
} subdparams;

typedef void (*subd_pattern_fill_fp)(BMesh *bm, BMFace *face, BMVert **verts, 
		                     subdparams *params);

/*
note: this is a pattern-based edge subdivider.
it tries to match a pattern to edge selections on faces,
then executes functions to cut them.
*/
typedef struct subdpattern {
	int seledges[20]; //selected edges mask, for splitting

	/*verts starts at the first new vert cut, not the first vert in the
	  face*/
	subd_pattern_fill_fp connectexec;
	int len; /*total number of verts, before any subdivision*/
} subdpattern;

/*generic subdivision rules:
  
  * two selected edges in a face should make a link
    between them.

  * one edge should do, what? make pretty topology, or just
    split the edge only?
*/

#endif /* _SUBDIVIDEOP_H */