diff options
Diffstat (limited to 'source/blender/editors/include/ED_gizmo_library.h')
-rw-r--r-- | source/blender/editors/include/ED_gizmo_library.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_gizmo_library.h b/source/blender/editors/include/ED_gizmo_library.h index 07eade23506..47ecbd73c9a 100644 --- a/source/blender/editors/include/ED_gizmo_library.h +++ b/source/blender/editors/include/ED_gizmo_library.h @@ -40,9 +40,15 @@ void ED_gizmotypes_facemap_3d(void); void ED_gizmotypes_preselect_3d(void); void ED_gizmotypes_primitive_3d(void); void ED_gizmotypes_blank_3d(void); +void ED_gizmotypes_snap_3d(void); -struct Object; +struct ARegion; struct bContext; +struct Depsgraph; +struct Object; +struct SnapObjectContext; +struct wmWindowManager; +struct View3D; struct wmGizmo; /* -------------------------------------------------------------------- */ @@ -223,8 +229,9 @@ enum { }; /* -------------------------------------------------------------------- */ -/* Gizmo Drawing Functions */ +/* Specific gizmos utils */ +/* dial3d_gizmo.c */ struct Dial3dParams { int draw_options; float angle_ofs; @@ -241,6 +248,25 @@ void ED_gizmotypes_dial_3d_draw_util(const float matrix_basis[4][4], const bool select, struct Dial3dParams *params); +/* snap3d_gizmo.c */ +#define USE_SNAP_DETECT_FROM_KEYMAP_HACK +void ED_gizmotypes_snap_3d_draw_util(struct RegionView3D *rv3d, + const float loc_prev[3], + const float loc_curr[3], + const float normal[3], + const uchar color_line[4], + const uchar color_point[4], + const short snap_elem_type); +struct SnapObjectContext *ED_gizmotypes_snap_3d_context_get(struct wmGizmo *gz); +short ED_gizmotypes_snap_3d_update(struct wmGizmo *gz, + struct Depsgraph *depsgraph, + const struct ARegion *region, + const struct View3D *v3d, + const struct wmWindowManager *wm, + const float mval_fl[2], + float r_loc[3], + float r_nor[3]); + #ifdef __cplusplus } #endif |