~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/include/BIF_editmesh.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
 
 * $Id: BIF_editmesh.h,v 1.19 2004/04/04 11:34:42 goofster Exp $
 
2
 * $Id: BIF_editmesh.h,v 1.37 2005/02/16 15:02:58 guitargeek Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
30
30
 * ***** END GPL/BL DUAL LICENSE BLOCK *****
31
31
 */
32
32
 
 
33
/* External for editmesh_xxxx.c functions */
 
34
 
33
35
#ifndef BIF_EDITMESH_H
34
36
#define BIF_EDITMESH_H
35
37
 
36
 
struct EditVlak;
 
38
struct EditMesh;
 
39
struct EditFace;
37
40
struct EditEdge;
38
41
struct EditVert;
39
42
struct Mesh;
40
43
struct bDeformGroup;
41
44
struct View3D;
42
45
 
43
 
void free_hashedgetab(void);
44
 
void fasterdraw(void);
45
 
void slowerdraw(void);
46
 
void vertexnoise(void);
47
 
void vertexsmooth(void);
48
 
void make_sticky(void);
49
 
void deselectall_mesh(void);
50
 
 
51
 
/* For Knife subdivide */
52
 
typedef struct CutCurve {
53
 
        short  x; 
54
 
        short  y;
55
 
} CutCurve;
56
 
 
57
 
void KnifeSubdivide(char mode);
 
46
// edge and face flag both
 
47
#define EM_FGON         2
 
48
// face flag
 
49
#define EM_FGON_DRAW    1
 
50
 
 
51
 
 
52
/* ******************* editmesh.c */
 
53
extern void make_editMesh(void);
 
54
extern void load_editMesh(void);
 
55
extern void free_editMesh(struct EditMesh *);
 
56
extern void remake_editMesh(void);
 
57
 
 
58
        /* Editmesh Undo code */
 
59
extern void undo_push_mesh(char *name);
 
60
 
 
61
extern void separatemenu(void);
 
62
extern void separate_mesh(void);
 
63
extern void separate_mesh_loose(void);
 
64
 
 
65
/* ******************* editmesh_add.c */
 
66
extern void add_primitiveMesh(int type);
 
67
extern void adduplicate_mesh(void);
 
68
extern void addvert_mesh(void);
 
69
extern void addedgeface_mesh(void);
 
70
 
 
71
/* ******************* editmesh_lib.c */
 
72
 
 
73
extern void EM_set_flag_all(int flag);
 
74
extern void EM_clear_flag_all(int flag);
 
75
 
 
76
extern void EM_select_face(struct EditFace *efa, int sel);
 
77
extern void EM_select_edge(struct EditEdge *eed, int sel);
 
78
 
 
79
extern void EM_deselect_flush(void);    // vertices to edges/faces (exception!)
 
80
extern void EM_select_flush(void);      // vertices to edges/faces (exception!)
 
81
extern void EM_selectmode_set(void); // when mode changes
 
82
extern void EM_selectmode_flush(void); // when selection changes
 
83
 
 
84
extern int EM_nfaces_selected(void);
 
85
extern int EM_nvertices_selected(void);
 
86
 
 
87
extern int faceselectedAND(struct EditFace *efa, int flag);
 
88
extern void recalc_editnormals(void);
 
89
extern void flip_editnormals(void);
 
90
extern void vertexnormals(int testflip);
 
91
 
 
92
/* ******************* editmesh_mods.c */
 
93
 
 
94
extern void EM_select_face_fgon(struct EditFace *efa, int sel);
 
95
 
 
96
extern int EM_init_backbuf_border(short xmin, short ymin, short xmax, short ymax);
 
97
extern int EM_mask_init_backbuf_border(short mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax);
 
98
extern int EM_init_backbuf_circle(short xs, short ys, short rads);
 
99
extern int EM_check_backbuf_border(int index);
 
100
extern void EM_free_backbuf_border(void);
 
101
 
 
102
extern void EM_selectmode_menu(void);
 
103
 
 
104
extern void vertexnoise(void);
 
105
extern void vertexsmooth(void);
 
106
extern void righthandfaces(int select);
 
107
extern void mouse_mesh(void);
 
108
 
 
109
extern void deselectall_mesh(void);
 
110
extern void selectconnected_mesh(int qual);
 
111
extern void selectswap_mesh(void);
 
112
 
 
113
extern void hide_mesh(int swap);
 
114
extern void reveal_mesh(void);
 
115
 
 
116
extern void vertices_to_sphere(void);
 
117
 
 
118
        /** Aligns the selected TFace's of @a me to the @a v3d,
 
119
         * using the given axis (0-2). Can give a user error.
 
120
         */
 
121
extern void faceselect_align_view_to_selected(struct View3D *v3d, struct Mesh *me, int axis);
 
122
        /** Aligns the selected faces or vertices of @a me to the @a v3d,
 
123
         * using the given axis (0-2). Can give a user error.
 
124
         */
 
125
extern void editmesh_align_view_to_selected(struct View3D *v3d, int axis);
 
126
 
 
127
        /* Selection */
 
128
extern void select_non_manifold(void);
 
129
extern void select_more(void);
 
130
extern void select_less(void);
 
131
extern void selectrandom_mesh(void);
 
132
extern void editmesh_select_by_material(int index);
 
133
extern void editmesh_deselect_by_material(int index);
 
134
 
 
135
extern void Edge_Menu(void);
 
136
extern void editmesh_mark_seam(int clear);
 
137
 
 
138
/* ******************* editmesh_loop.c */
 
139
 
58
140
#define KNIFE_PROMPT 0
59
141
#define KNIFE_EXACT 1
60
142
#define KNIFE_MIDPOINT 2
61
143
 
62
 
CutCurve *get_mouse_trail(int * length, char mode);
63
 
#define TRAIL_POLYLINE 1 /* For future use, They don't do anything yet */
64
 
#define TRAIL_FREEHAND 2
65
 
#define TRAIL_MIXED    3 /* (1|2) */
66
 
#define TRAIL_AUTO     4 
67
 
#define TRAIL_MIDPOINTS 8
68
 
 
69
 
short seg_intersect(struct EditEdge * e, CutCurve *c, int len);
70
 
 
71
 
void LoopMenu(void);
72
 
/* End Knife Subdiv */
73
 
 
74
 
        /** Aligns the selected TFace's of @a me to the @a v3d,
75
 
         * using the given axis (0-2). Can give a user error.
76
 
         */
77
 
void faceselect_align_view_to_selected(struct View3D *v3d, struct Mesh *me, int axis);
78
 
        /** Aligns the selected faces or vertices of @a me to the @a v3d,
79
 
         * using the given axis (0-2). Can give a user error.
80
 
         */
81
 
void editmesh_align_view_to_selected(struct View3D *v3d, int axis);
82
 
 
83
 
struct EditVert *addvertlist(float *vec);
84
 
struct EditEdge *addedgelist(struct EditVert *v1, struct EditVert *v2);
85
 
struct EditVlak *addvlaklist(struct EditVert *v1, struct EditVert *v2, struct EditVert *v3, struct EditVert *v4, struct EditVlak *example);
86
 
struct EditEdge *findedgelist(struct EditVert *v1, struct EditVert *v2);
87
 
 
88
 
void remedge(struct EditEdge *eed);
89
 
 
90
 
int vlakselectedAND(struct EditVlak *evl, int flag);
91
 
 
92
 
void recalc_editnormals(void);
93
 
void flip_editnormals(void);
94
 
void vertexnormals(int testflip);
95
 
/* this is currently only used by the python NMesh module: */
96
 
void vertexnormals_mesh(struct Mesh *me, float *extverts);
97
 
 
98
 
void make_editMesh(void);
99
 
void load_editMesh(void);
100
 
void free_editMesh(void);
101
 
void remake_editMesh(void);
102
 
 
103
 
void convert_to_triface(int all);
104
 
 
105
 
void righthandfaces(int select);
106
 
 
107
 
void mouse_mesh(void);
108
 
 
109
 
void selectconnected_mesh(int qual);
110
 
short extrudeflag(short flag,short type);
111
 
void rotateflag(short flag, float *cent, float rotmat[][3]);
112
 
void translateflag(short flag, float *vec);
113
 
short removedoublesflag(short flag, float limit);
114
 
void xsortvert_flag(int flag);
115
 
void hashvert_flag(int flag);
116
 
void subdivideflag(int flag, float rad, int beauty);
117
 
void adduplicateflag(int flag);
118
 
void extrude_mesh(void);
119
 
void adduplicate_mesh(void);
120
 
void split_mesh(void);
121
 
 
122
 
void separatemenu(void);
123
 
void separate_mesh(void);
124
 
void separate_mesh_loose(void);
125
 
 
126
 
void loopoperations(char mode);
 
144
extern void KnifeSubdivide(char mode);
 
145
extern void LoopMenu(void);
 
146
 
127
147
#define LOOP_SELECT     1
128
148
#define LOOP_CUT        2
129
149
 
130
 
void vertex_loop_select(void); 
131
 
void edge_select(void);
132
 
 
133
 
void extrude_repeat_mesh(int steps, float offs);
134
 
void spin_mesh(int steps,int degr,float *dvec, int mode);
135
 
void screw_mesh(int steps,int turns);
136
 
void selectswap_mesh(void);
137
 
void addvert_mesh(void);
138
 
void addedgevlak_mesh(void);
139
 
void delete_mesh(void);
140
 
void add_primitiveMesh(int type);
141
 
void hide_mesh(int swap);
142
 
void reveal_mesh(void);
143
 
void beauty_fill(void);
144
 
void join_triangles(void);
145
 
void edge_flip(void);
146
 
void join_mesh(void);
147
 
void clever_numbuts_mesh(void);
148
 
void sort_faces(void);
149
 
void vertices_to_sphere(void);
150
 
void fill_mesh(void);
151
 
 
152
 
void bevel_menu();
153
 
 
154
 
/* Editmesh Undo code */
155
 
void undo_free_mesh(struct Mesh *me);
156
 
void undo_push_mesh(char *name);
157
 
void undo_pop_mesh(int steps);
158
 
void undo_redo_mesh(void);
159
 
void undo_clear_mesh(void);
160
 
void undo_menu_mesh(void);
161
 
 
162
 
/* Selection */
163
 
void select_non_manifold(void);
164
 
void select_more(void);
165
 
void select_less(void);
166
 
void selectrandom_mesh(void);
167
 
 
168
 
void editmesh_select_by_material(int index);
169
 
void editmesh_deselect_by_material(int index);
170
 
 
 
150
extern void loopoperations(char mode);
 
151
extern void vertex_loop_select(void); 
 
152
 
 
153
/* ******************* editmesh_tools.c */
 
154
extern void convert_to_triface(int all);
 
155
extern int removedoublesflag(short flag, float limit);
 
156
extern void xsortvert_flag(int flag);
 
157
extern void hashvert_flag(int flag);
 
158
extern void subdivideflag(int flag, float rad, int beauty);
 
159
extern void extrude_mesh(void);
 
160
extern void split_mesh(void);
 
161
extern void extrude_repeat_mesh(int steps, float offs);
 
162
extern void spin_mesh(int steps,int degr,float *dvec, int mode);
 
163
extern void screw_mesh(int steps,int turns);
 
164
extern void delete_mesh(void);
 
165
extern void beauty_fill(void);
 
166
extern void join_triangles(void);
 
167
extern void edge_flip(void);
 
168
extern void fill_mesh(void);
 
169
extern void bevel_menu();
 
170
void edge_rotate_selected(int dir);
 
171
 
171
172
#endif
172
173