diff options
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 247 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 4 | ||||
-rw-r--r-- | source/blender/editors/include/ED_util.h | 8 | ||||
-rw-r--r-- | source/blender/editors/include/ED_uvedit.h | 27 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 20 |
5 files changed, 193 insertions, 113 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 6e289fb5a2a..12524a9fd2e 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -61,6 +61,16 @@ struct MCol; struct UvVertMap; struct UvMapVert; struct CustomData; +struct BMEditMesh; +struct BMEditSelection; +struct BMesh; +struct BMVert; +struct MLoopCol; +struct BMEdge; +struct BMFace; +struct UvVertMap; +struct UvMapVert; +struct ToolSettings; struct Material; struct Object; struct rcti; @@ -85,111 +95,148 @@ struct rcti; #define B_FRACTAL 0x2000 #define B_SPHERE 0x4000 -/* meshtools.c */ - -intptr_t mesh_octree_table(struct Object *ob, struct EditMesh *em, float *co, char mode); -int mesh_mirrtopo_table(struct Object *ob, char mode); - -struct EditVert *editmesh_get_x_mirror_vert(struct Object *ob, struct EditMesh *em, struct EditVert *eve, float *co, int index); -int mesh_get_x_mirror_vert(struct Object *ob, int index); -int *mesh_get_x_mirror_faces(struct Object *ob, struct EditMesh *em); +intptr_t mesh_octree_table(struct Object *ob, struct BMEditMesh *em, float *co, char mode); +int mesh_mirrtopo_table(struct Object *ob, char mode); -int join_mesh_exec(struct bContext *C, struct wmOperator *op); -int join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op); +/* bmeshutils.c */ -/* mesh_ops.c */ -void ED_operatortypes_mesh(void); -void ED_operatormacros_mesh(void); -void ED_keymap_mesh(struct wmKeyConfig *keyconf); +/* + [note: I've decided to use ideasman's code for non-editmode stuff, but since + it has a big "not for editmode!" disclaimer, I'm going to keep what I have here + - joeedh] + + x-mirror editing api. usage: + + EDBM_CacheMirrorVerts(em); + ... + ... + BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + mirrorv = EDBM_GetMirrorVert(em, v); + } + ... + ... + EDBM_EndMirrorCache(em); + + note: why do we only allow x axis mirror editing? + */ +void EDBM_CacheMirrorVerts(struct BMEditMesh *em, const short use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */ + +/*retrieves mirrored cache vert, or NULL if there isn't one. + note: calling this without ensuring the mirror cache state + is bad.*/ +struct BMVert *EDBM_GetMirrorVert(struct BMEditMesh *em, struct BMVert *v); +void EDBM_ClearMirrorVert(struct BMEditMesh *em, struct BMVert *v); +void EDBM_EndMirrorCache(struct BMEditMesh *em); +void EDBM_ApplyMirrorCache(struct BMEditMesh *em, const int sel_from, const int sel_to); + +void EDBM_RecalcNormals(struct BMEditMesh *em); + +void EDBM_MakeEditBMesh(struct ToolSettings *ts, struct Scene *scene, struct Object *ob); +void EDBM_FreeEditBMesh(struct BMEditMesh *tm); +void EDBM_LoadEditBMesh(struct Scene *scene, struct Object *ob); + +void EDBM_init_index_arrays(struct BMEditMesh *em, int forvert, int foredge, int forface); +void EDBM_free_index_arrays(struct BMEditMesh *em); +struct BMVert *EDBM_get_vert_for_index(struct BMEditMesh *em, int index); +struct BMEdge *EDBM_get_edge_for_index(struct BMEditMesh *em, int index); +struct BMFace *EDBM_get_face_for_index(struct BMEditMesh *em, int index); + +int EDBM_CallAndSelectOpf(struct BMEditMesh *em, struct wmOperator *op, + const char *selectslot, const char *fmt, ...); + +/* flushes based on the current select mode. if in vertex select mode, + * verts select/deselect edges and faces, if in edge select mode, + * edges select/deselect faces and vertices, and in face select mode faces select/deselect + * edges and vertices.*/ +void EDBM_select_more(struct BMEditMesh *em); +void EDBM_select_less(struct BMEditMesh *em); + +int EDBM_get_actSelection(struct BMEditMesh *em, struct BMEditSelection *ese); + +void EDBM_selectmode_flush_ex(struct BMEditMesh *em, int selectmode); +void EDBM_selectmode_flush(struct BMEditMesh *em); + +void EDBM_deselect_flush(struct BMEditMesh *em); +void EDBM_select_flush(struct BMEditMesh *em); + +void EDBM_selectmode_set(struct BMEditMesh *em); +void EDBM_convertsel(struct BMEditMesh *em, short oldmode, short selectmode); +void undo_push_mesh(struct bContext *C, const char *name); +void EDBM_editselection_center(struct BMEditMesh *em, float *center, struct BMEditSelection *ese); +void EDBM_editselection_plane(struct BMEditMesh *em, float *plane, struct BMEditSelection *ese); +void EDBM_editselection_normal(float *normal, struct BMEditSelection *ese); +int EDBM_vertColorCheck(struct BMEditMesh *em); +void EDBM_validate_selections(struct BMEditMesh *em); -/* editmesh.c */ -void make_editMesh(struct Scene *scene, struct Object *ob); -void load_editMesh(struct Scene *scene, struct Object *ob); -void remake_editMesh(struct Scene *scene, struct Object *ob); -void free_editMesh(struct EditMesh *em); +void EDBM_hide_mesh(struct BMEditMesh *em, int swap); +void EDBM_reveal_mesh(struct BMEditMesh *em); -void recalc_editnormals(struct EditMesh *em); +int EDBM_check_backbuf(unsigned int index); +int EDBM_mask_init_backbuf_border(struct ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax); +void EDBM_free_backbuf(void); +int EDBM_init_backbuf_border(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); +int EDBM_init_backbuf_circle(struct ViewContext *vc, short xs, short ys, short rads); -void EM_init_index_arrays(struct EditMesh *em, int forVert, int forEdge, int forFace); -void EM_free_index_arrays(void); -struct EditVert *EM_get_vert_for_index(int index); -struct EditEdge *EM_get_edge_for_index(int index); -struct EditFace *EM_get_face_for_index(int index); -int EM_texFaceCheck(struct EditMesh *em); -int EM_vertColorCheck(struct EditMesh *em); +void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select); -void undo_push_mesh(struct bContext *C, const char *name); +int EDBM_select_interior_faces(struct BMEditMesh *em); -void paintvert_flush_flags(struct Object *ob); -void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags); +struct UvElementMap *EDBM_make_uv_element_map(struct BMEditMesh *em, int selected, int doIslands); +void EDBM_free_uv_element_map(struct UvElementMap *vmap); -/* editmesh_lib.c */ +void EDBM_add_data_layer(struct BMEditMesh *em, struct CustomData *data, int type, const char *name); +void EDBM_free_data_layer(struct BMEditMesh *em, struct CustomData *data, int type); -struct EditFace *EM_get_actFace(struct EditMesh *em, int sloppy); -void EM_set_actFace(struct EditMesh *em, struct EditFace *efa); -float EM_face_area(struct EditFace *efa); +void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */ -void EM_select_edge(struct EditEdge *eed, int sel); -void EM_select_face(struct EditFace *efa, int sel); -void EM_select_face_fgon(struct EditMesh *em, struct EditFace *efa, int val); -void EM_select_swap(struct EditMesh *em); -void EM_toggle_select_all(struct EditMesh *em); -void EM_select_all(struct EditMesh *em); -void EM_deselect_all(struct EditMesh *em); -void EM_selectmode_flush(struct EditMesh *em); -void EM_deselect_flush(struct EditMesh *em); -void EM_selectmode_set(struct EditMesh *em); -void EM_select_flush(struct EditMesh *em); -void EM_convertsel(struct EditMesh *em, short oldmode, short selectmode); -void EM_validate_selections(struct EditMesh *em); -void EM_selectmode_to_scene(struct Scene *scene, struct Object *obedit); +int EDBM_texFaceCheck(struct BMEditMesh *em); +struct MTexPoly *EDBM_get_active_mtexpoly(struct BMEditMesh *em, struct BMFace **act_efa, int sloppy); - /* exported to transform */ -int EM_get_actSelection(struct EditMesh *em, struct EditSelection *ese); -void EM_editselection_normal(float *normal, struct EditSelection *ese); -void EM_editselection_plane(float *plane, struct EditSelection *ese); -void EM_editselection_center(float *center, struct EditSelection *ese); +void EDBM_free_uv_vert_map(struct UvVertMap *vmap); +struct UvMapVert *EDBM_get_uv_map_vert(struct UvVertMap *vmap, unsigned int v); +struct UvVertMap *EDBM_make_uv_vert_map(struct BMEditMesh *em, int selected, int do_face_idx_array, float *limit); +void EM_add_data_layer(struct BMEditMesh *em, struct CustomData *data, int type, const char *name); +void EM_free_data_layer(struct BMEditMesh *em, struct CustomData *data, int type); -struct UvVertMap *EM_make_uv_vert_map(struct EditMesh *em, int selected, int do_face_idx_array, float *limit); -struct UvMapVert *EM_get_uv_map_vert(struct UvVertMap *vmap, unsigned int v); -void EM_free_uv_vert_map(struct UvVertMap *vmap); +void EDBM_toggle_select_all(struct BMEditMesh *em); +void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag); +void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); +void EDBM_select_mirrored(struct Object *obedit, struct BMEditMesh *em, int extend); +void EDBM_automerge(struct Scene *scene, struct Object *ob, int update); -struct UvElementMap *EM_make_uv_element_map(struct EditMesh *em, int selected, int doIslands); -void EM_free_uv_element_map(struct UvElementMap *vmap); +/* editmesh_mods.c */ +extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs; -void EM_add_data_layer(struct EditMesh *em, struct CustomData *data, int type, const char *name); -void EM_free_data_layer(struct EditMesh *em, struct CustomData *data, int type); +int mouse_mesh(struct bContext *C, const int mval[2], short extend); -void EM_make_hq_normals(struct EditMesh *em); -void EM_solidify(struct EditMesh *em, float dist); +struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index); +int mesh_get_x_mirror_vert(struct Object *ob, int index); +int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em); -int EM_deselect_nth(struct EditMesh *em, int nth); +int join_mesh_exec(struct bContext *C, struct wmOperator *op); +int join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op); -void EM_project_snap_verts(struct bContext *C, struct ARegion *ar, struct Object *obedit, struct EditMesh *em); +/* mesh_ops.c */ +void ED_operatortypes_mesh(void); +void ED_operatormacros_mesh(void); +void ED_keymap_mesh(struct wmKeyConfig *keyconf); -/* editmesh_mods.c */ -extern unsigned int em_vertoffs, em_solidoffs, em_wireoffs; -void EM_cache_x_mirror_vert(struct Object *ob, struct EditMesh *em); -int mouse_mesh(struct bContext *C, const int mval[2], short extend); -int EM_check_backbuf(unsigned int index); -int EM_mask_init_backbuf_border(struct ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax); -void EM_free_backbuf(void); -int EM_init_backbuf_border(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); -int EM_init_backbuf_circle(struct ViewContext *vc, short xs, short ys, short rads); +/* editmesh.c */ -void EM_hide_mesh(struct EditMesh *em, int swap); -void EM_reveal_mesh(struct EditMesh *em); +void ED_spacetypes_init(void); +void ED_keymap_mesh(struct wmKeyConfig *keyconf); -void EM_select_by_material(struct EditMesh *em, int index); -void EM_deselect_by_material(struct EditMesh *em, int index); +/* bmesh_mods.c */ +extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs; -void EM_automerge(struct Scene *scene, struct Object *obedit, int update); +/* bmesh_tools.c (could be moved) */ +void EMBM_project_snap_verts(struct bContext *C, struct ARegion *ar, struct Object *obedit, struct BMEditMesh *em); /* editface.c */ void paintface_flush_flags(struct Object *ob); -struct MTFace *EM_get_active_mtface(struct EditMesh *em, struct EditFace **act_efa, struct MCol **mcol, int sloppy); +struct MTexPoly *EM_get_active_mtexpoly(struct BMEditMesh *em, struct BMFace **act_efa, struct MLoopCol **col, int sloppy); int paintface_mouse_select(struct bContext *C, struct Object *ob, const int mval[2], int extend); int do_paintface_box_select(struct ViewContext *vc, struct rcti *rect, int select, int extend); void paintface_deselect_all_visible(struct Object *ob, int action, short flush_flags); @@ -199,6 +246,9 @@ int paintface_minmax(struct Object *ob, float *min, float *max); void paintface_hide(struct Object *ob, const int unselected); void paintface_reveal(struct Object *ob); +void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags); +void paintvert_flush_flags(struct Object *ob); + /* object_vgroup.c */ #define WEIGHT_REPLACE 1 @@ -221,18 +271,26 @@ void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum); float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum); -/*needed by edge slide*/ -struct EditVert *editedge_getOtherVert(struct EditEdge *eed, struct EditVert *eve); -struct EditVert *editedge_getSharedVert(struct EditEdge *eed, struct EditEdge *eed2); -int editedge_containsVert(struct EditEdge *eed, struct EditVert *eve); -int editface_containsVert(struct EditFace *efa, struct EditVert *eve); -int editface_containsEdge(struct EditFace *efa, struct EditEdge *eed); -short sharesFace(struct EditMesh *em, struct EditEdge *e1, struct EditEdge *e2); +/** + * findnearestvert + * + * dist (in/out): minimal distance to the nearest and at the end, actual distance + * sel: selection bias + * if SELECT, selected vertice are given a 5 pixel bias to make them farter than unselect verts + * if 0, unselected vertice are given the bias + * strict: if 1, the vertice corresponding to the sel parameter are ignored and not just biased + */ + +struct BMVert *EDBM_findnearestvert(struct ViewContext *vc, int *dist, short sel, short strict); +struct BMEdge *EDBM_findnearestedge(struct ViewContext *vc, int *dist); +struct BMFace *EDBM_findnearestface(struct ViewContext *vc, int *dist); /* mesh_data.c */ // void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces); +void ED_mesh_polys_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_faces_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_edges_add(struct Mesh *mesh, struct ReportList *reports, int count); +void ED_mesh_loops_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_vertices_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_faces_remove(struct Mesh *mesh, struct ReportList *reports, int count); @@ -246,10 +304,16 @@ void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges); int ED_mesh_uv_texture_add(struct bContext *C, struct Mesh *me, const char *name, int active_set); int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me); +int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me); int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me); int ED_mesh_color_remove_named(struct bContext *C, struct Object *ob, struct Mesh *me, const char *name); +void EDBM_selectmode_to_scene(struct bContext *C); +void EDBM_ClearMesh(struct BMEditMesh *em); + +#include "../mesh/editmesh_bvh.h" + /* mirrtopo */ typedef struct MirrTopoStore_t { @@ -264,9 +328,18 @@ void ED_mesh_mirrtopo_init(struct Mesh *me, const int ob_mode, MirrTopoStore_t * const short skip_em_vert_array_init); void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); +#define SUBDIV_SELECT_ORIG 0 +#define SUBDIV_SELECT_INNER 1 +#define SUBDIV_SELECT_INNER_SEL 2 +#define SUBDIV_SELECT_LOOPCUT 3 + +/* edge subdivide corner cut types */ +#define SUBDIV_CORNER_PATH 0 +#define SUBDIV_CORNER_INNERVERT 1 +#define SUBDIV_CORNER_FAN 2 + #ifdef __cplusplus } #endif #endif /* __ED_MESH_H__ */ - diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index c808e63d320..3e78a5649e5 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -127,8 +127,8 @@ float ED_object_new_primitive_matrix(struct bContext *C, struct Object *editob, void ED_object_add_generic_props(struct wmOperatorType *ot, int do_editmode); int ED_object_add_generic_invoke(struct bContext *C, struct wmOperator *op, struct wmEvent *event); -int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, - float *loc, float *rot, int *enter_editmode, unsigned int *layer); +int ED_object_add_generic_get_opts(struct bContext *C, struct wmOperator *op, + float *loc, float *rot, int *enter_editmode, unsigned int *layer, int *is_view_aligned); struct Object *ED_object_add_type(struct bContext *C, int type, float *loc, float *rot, int enter_editmode, unsigned int layer); diff --git a/source/blender/editors/include/ED_util.h b/source/blender/editors/include/ED_util.h index d082f3449fa..9bde252e776 100644 --- a/source/blender/editors/include/ED_util.h +++ b/source/blender/editors/include/ED_util.h @@ -38,7 +38,7 @@ struct ARegion; struct uiBlock; struct wmOperator; struct wmOperatorType; -struct EditMesh; +struct BMEditMesh; struct Mesh; /* ed_util.c */ @@ -70,8 +70,8 @@ int ED_undo_valid (const struct bContext *C, const char *undoname); void undo_editmode_push(struct bContext *C, const char *name, void * (*getdata)(struct bContext *C), void (*freedata)(void *), - void (*to_editmode)(void *, void *), - void *(*from_editmode)(void *), + void (*to_editmode)(void *, void *, void *), + void *(*from_editmode)(void *, void *), int (*validate_undo)(void *, void *)); @@ -79,7 +79,7 @@ void undo_editmode_clear (void); /* crazyspace.c */ float *crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit); -void crazyspace_set_quats_editmesh(struct EditMesh *em, float *origcos, float *mappedcos, float *quats); +void crazyspace_set_quats_editmesh(struct BMEditMesh *em, float *origcos, float *mappedcos, float *quats); void crazyspace_set_quats_mesh(struct Mesh *me, float *origcos, float *mappedcos, float *quats); int sculpt_get_first_deform_matrices(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]); void crazyspace_build_sculpt(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]); diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h index 4d8bceb044f..6c74eea3a5e 100644 --- a/source/blender/editors/include/ED_uvedit.h +++ b/source/blender/editors/include/ED_uvedit.h @@ -42,6 +42,10 @@ struct SpaceImage; struct bContext; struct bNode; struct wmKeyConfig; +struct BMEditMesh; +struct BMLoop; +struct BMFace; +struct MTexPoly; /* uvedit_ops.c */ void ED_operatortypes_uvedit(void); @@ -57,18 +61,17 @@ int ED_uvedit_test_silent(struct Object *obedit); int ED_uvedit_test(struct Object *obedit); /* visibility and selection */ -int uvedit_edge_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i); -int uvedit_face_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf); -int uvedit_face_visible_nolocal(struct Scene *scene, struct EditFace *efa); -int uvedit_face_visible(struct Scene *scene, struct Image *ima, struct EditFace *efa, struct MTFace *tf); -int uvedit_uv_selected(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i); -void uvedit_edge_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i); -void uvedit_edge_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i); -void uvedit_face_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf); -void uvedit_face_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf); -void uvedit_uv_deselect(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i); -void uvedit_uv_select(struct Scene *scene, struct EditFace *efa, struct MTFace *tf, int i); - +int uvedit_face_visible(struct Scene *scene, struct Image *ima, struct BMFace *efa, struct MTexPoly *tf); +int uvedit_face_selected(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa); +int uvedit_edge_selected(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l); +int uvedit_uv_selected(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l); + +int uvedit_face_select(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa); +int uvedit_face_deselect(struct Scene *scene, struct BMEditMesh *em, struct BMFace *efa); +void uvedit_edge_select(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l); +void uvedit_edge_deselect(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l); +void uvedit_uv_select(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l); +void uvedit_uv_deselect(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l); int ED_uvedit_nearest_uv(struct Scene *scene, struct Object *obedit, struct Image *ima, float co[2], float uv[2]); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 63c03cd2963..2d4e267ba80 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -38,8 +38,11 @@ struct BezTriple; struct bglMats; struct BoundBox; struct BPoint; -struct EditEdge; -struct EditFace; +struct Nurb; +struct BezTriple; +struct BMVert; +struct BMEdge; +struct BMFace; struct EditVert; struct ImBuf; struct Main; @@ -63,7 +66,7 @@ typedef struct ViewContext { struct ARegion *ar; struct View3D *v3d; struct RegionView3D *rv3d; - struct EditMesh *em; + struct BMEditMesh *em; int mval[2]; } ViewContext; @@ -190,9 +193,9 @@ void ED_view3d_from_object(struct Object *ob, float ofs[3], float quat[4], float */ void ED_view3d_to_object(struct Object *ob, const float ofs[3], const float quat[4], const float dist); -#if 0 /* UNUSED */ +//#if 0 /* UNUSED */ void view3d_unproject(struct bglMats *mats, float out[3], const short x, const short y, const float z); -#endif +//#endif /* Depth buffer */ void ED_view3d_depth_update(struct ARegion *ar); @@ -219,12 +222,13 @@ int ED_view3d_viewplane_get(struct View3D *v3d, struct RegionView3D *rv3d, int w void ED_view3d_ob_project_mat_get(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]); void ED_view3d_project_float(const struct ARegion *a, const float vec[3], float adr[2], float mat[4][4]); void ED_view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct RegionView3D *rv3d, struct rctf *viewborder_r, short no_shift); +void ED_view3d_project_float_v3(struct ARegion *a, float *vec, float *adr, float mat[4][4]); void ED_view3d_calc_camera_border_size(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct RegionView3D *rv3d, float size_r[2]); /* drawobject.c iterators */ -void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, eV3DClipTest clipVerts); -void mesh_foreachScreenEdge(struct ViewContext *vc, void (*func)(void *userData, struct EditEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, eV3DClipTest clipVerts); -void mesh_foreachScreenFace(struct ViewContext *vc, void (*func)(void *userData, struct EditFace *efa, int x, int y, int index), void *userData); +void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct BMVert *eve, int x, int y, int index), void *userData, eV3DClipTest clipVerts); +void mesh_foreachScreenEdge(struct ViewContext *vc, void (*func)(void *userData, struct BMEdge *eed, int x0, int y0, int x1, int y1, int index), void *userData, eV3DClipTest clipVerts); +void mesh_foreachScreenFace(struct ViewContext *vc, void (*func)(void *userData, struct BMFace *efa, int x, int y, int index), void *userData); void nurbs_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct Nurb *nu, struct BPoint *bp, struct BezTriple *bezt, int beztindex, int x, int y), void *userData); void lattice_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct BPoint *bp, int x, int y), void *userData); |