diff options
Diffstat (limited to 'source/blender/editors/include/ED_view3d.h')
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index bd4791055e2..37541722682 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -25,6 +25,11 @@ * * ***** END GPL LICENSE BLOCK ***** */ + +/** \file ED_view3d.h + * \ingroup editors + */ + #ifndef ED_VIEW3D_H #define ED_VIEW3D_H @@ -50,6 +55,7 @@ struct RegionView3D; struct Scene; struct View3D; struct ViewContext; +struct wmWindow; /* for derivedmesh drawing callbacks, for view3d_select, .... */ @@ -66,6 +72,7 @@ typedef struct ViewContext { typedef struct ViewDepths { unsigned short w, h; + short x, y; /* only for temp use for sub-rects, added to ar->winx/y */ float *depths; double depth_range[2]; @@ -81,6 +88,7 @@ void window_to_3d_delta(struct ARegion *ar, float *vec, short mx, short my); void view3d_unproject(struct bglMats *mats, float out[3], const short x, const short y, const float z); /* Depth buffer */ +void view3d_update_depths(struct ARegion *ar); float read_cached_depth(struct ViewContext *vc, int x, int y); void request_depth_update(struct RegionView3D *rv3d); @@ -109,11 +117,10 @@ int get_view3d_ortho(struct View3D *v3d, struct RegionView3D *rv3d); void view3d_get_object_project_mat(struct RegionView3D *v3d, struct Object *ob, float pmat[4][4]); /* computes screen x/y in vec */ void view3d_project_float(struct ARegion *a, float *vec, float *adr, float mat[4][4]); -/* computes z, as well as x and y */ void view3d_project_float_v3(struct ARegion *a, float *vec, float *adr, float mat[4][4]); -void view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, struct RegionView3D *rv3d, struct View3D *v3d, struct rctf *viewborder_r); +void view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, struct RegionView3D *rv3d, struct View3D *v3d, struct rctf *viewborder_r, short do_shift); -/* drawobject.c itterators */ +/* drawobject.c iterators */ void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct BMVert *eve, int x, int y, int index), void *userData, int 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, int clipVerts); void mesh_foreachScreenFace(struct ViewContext *vc, void (*func)(void *userData, struct BMFace *efa, int x, int y, int index), void *userData); @@ -123,8 +130,9 @@ void lattice_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userDa void ED_view3d_local_clipping(struct RegionView3D *rv3d, float mat[][4]); int view3d_test_clipping(struct RegionView3D *rv3d, float *vec, int local); void view3d_align_axis_to_vector(struct View3D *v3d, struct RegionView3D *rv3d, int axisidx, float vec[3]); +float view3d_pixel_size(struct RegionView3D *rv3d, const float co[3]); -void drawcircball(int mode, float *cent, float rad, float tmat[][4]); +void drawcircball(int mode, const float cent[3], float rad, float tmat[][4]); /* backbuffer select and draw support */ void view3d_validate_backbuf(struct ViewContext *vc); @@ -138,8 +146,9 @@ int view_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, s /* only draw so view_autodist_simple can be called many times after */ int view_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode); -int view_autodist_simple(struct ARegion *ar, short *mval, float mouse_worldloc[3], int margin, float *force_depth); -int view_autodist_depth(struct ARegion *ar, short *mval, int margin, float *depth); +int view_autodist_simple(struct ARegion *ar, short mval[2], float mouse_worldloc[3], int margin, float *force_depth); +int view_autodist_depth(struct ARegion *ar, short mval[2], int margin, float *depth); +int view_autodist_depth_segment(struct ARegion *ar, short mval_sta[2], short mval_end[2], int margin, float *depth); /* select */ #define MAXPICKBUF 10000 @@ -147,6 +156,7 @@ short view3d_opengl_select(struct ViewContext *vc, unsigned int *buffer, unsigne void view3d_set_viewcontext(struct bContext *C, struct ViewContext *vc); void view3d_operator_needs_opengl(const struct bContext *C); +void view3d_region_operator_needs_opengl(struct wmWindow *win, struct ARegion *ar); void view3d_get_view_aligned_coordinate(struct ViewContext *vc, float *fp, short mval[2]); void view3d_get_transformation(struct ARegion *ar, struct RegionView3D *rv3d, struct Object *ob, struct bglMats *mats); @@ -169,10 +179,11 @@ void ED_view3d_draw_offscreen(struct Scene *scene, struct View3D *v3d, struct AR struct ImBuf *ED_view3d_draw_offscreen_imbuf(struct Scene *scene, struct View3D *v3d, struct ARegion *ar, int sizex, int sizey, unsigned int flag); struct ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, int width, int height, unsigned int flag, int drawtype); -void view3d_clipping_local(struct RegionView3D *rv3d, float mat[][4]); Base *ED_view3d_give_base_under_cursor(struct bContext *C, short *mval); -void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar); +void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar, short do_clip); + +unsigned int ED_viewedit_datamask(struct bScreen *screen); #endif /* ED_VIEW3D_H */ |