|
Blender
V3.3
|
#include "gizmo_geometry.h"Go to the source code of this file.
Classes | |
| struct | GizmoCommonData |
| struct | GizmoInteraction |
Typedefs | |
| typedef struct GizmoCommonData | GizmoCommonData |
| typedef struct GizmoInteraction | GizmoInteraction |
| typedef struct GizmoCommonData GizmoCommonData |
Data for common interactions. Used in gizmo_library_utils.c functions.
| typedef struct GizmoInteraction GizmoInteraction |
| float gizmo_offset_from_value | ( | GizmoCommonData * | data, |
| float | value, | ||
| bool | constrained, | ||
| bool | inverted | ||
| ) |
Definition at line 54 of file gizmo_library_utils.c.
References data, and gizmo_offset_from_value_constr().
Referenced by gizmo_arrow_exit(), and gizmo_arrow_modal().
| void gizmo_property_data_update | ( | struct wmGizmo * | gz, |
| GizmoCommonData * | data, | ||
| wmGizmoProperty * | gz_prop, | ||
| bool | constrained, | ||
| bool | inverted | ||
| ) |
Definition at line 102 of file gizmo_library_utils.c.
References BLI_assert, wmGizmoProperty::custom_func, data, gizmo_offset_from_value_constr(), NULL, wmGizmoProperty::prop, wmGizmoProperty::value_get_fn, WM_gizmo_target_property_float_get(), and WM_gizmo_target_property_float_range_get().
Referenced by gizmo_arrow_property_update().
| void gizmo_property_value_reset | ( | bContext * | C, |
| const struct wmGizmo * | gz, | ||
| GizmoInteraction * | inter, | ||
| wmGizmoProperty * | gz_prop | ||
| ) |
Referenced by gizmo_arrow_exit().
| float gizmo_value_from_offset | ( | GizmoCommonData * | data, |
| GizmoInteraction * | inter, | ||
| float | offset, | ||
| bool | constrained, | ||
| bool | inverted, | ||
| bool | use_precision | ||
| ) |
Definition at line 67 of file gizmo_library_utils.c.
References CLAMP, data, GIZMO_PRECISION_FAC, gizmo_value_from_offset_constr(), GizmoInteraction::init_offset, max, offset, GizmoInteraction::precision_offset, and GizmoInteraction::prev_offset.
Referenced by gizmo_arrow_modal().
| bool gizmo_window_project_2d | ( | bContext * | C, |
| const struct wmGizmo * | gz, | ||
| const float | mval[2], | ||
| int | axis, | ||
| bool | use_offset, | ||
| float | r_co[2] | ||
| ) |
Takes mouse coordinates and returns them in relation to the gizmo. Both 2D & 3D supported, use so we can use 2D gizmos in the 3D view.
Definition at line 162 of file gizmo_library_utils.c.
References C, CLOG_WARN, copy_v2_v2(), CTX_wm_region(), ED_view3d_win_to_3d_on_plane(), wmGizmoGroupType::flag, wmGizmoType::idname, wmGizmoGroupType::idname, invert_m4_m4(), LOG, mul_m4_v3(), NULL, params, wmGizmo::parent_gzgroup, plane_from_point_normal_v3(), ARegion::regiondata, wmGizmo::type, wmGizmoGroup::type, unit_m4(), WM_gizmo_calc_matrix_final_params(), and WM_GIZMOGROUPTYPE_3D.
Referenced by gizmo_button2d_test_select(), gizmo_cage2d_invoke(), gizmo_cage2d_modal(), gizmo_cage2d_test_select(), gizmo_move_modal(), and gizmo_move_test_select().
| bool gizmo_window_project_3d | ( | bContext * | C, |
| const struct wmGizmo * | gz, | ||
| const float | mval[2], | ||
| bool | use_offset, | ||
| float | r_co[3] | ||
| ) |
Definition at line 211 of file gizmo_library_utils.c.
References C, CLOG_WARN, copy_v2_v2(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_win_to_3d(), wmGizmoGroupType::flag, wmGizmoType::idname, wmGizmoGroupType::idname, invert_m4_m4(), LOG, mul_m4_v3(), NULL, params, wmGizmo::parent_gzgroup, wmGizmo::type, wmGizmoGroup::type, unit_m4(), WM_gizmo_calc_matrix_final_params(), and WM_GIZMOGROUPTYPE_3D.
Referenced by gizmo_cage3d_invoke(), and gizmo_cage3d_modal().
| void wm_gizmo_geometryinfo_draw | ( | const struct GizmoGeomInfo * | info, |
| bool | select, | ||
| const float | color[4] | ||
| ) |
Main draw call for GizmoGeomInfo data
| void wm_gizmo_vec_draw | ( | const float | color[4], |
| const float(*) | verts[3], | ||
| uint | vert_count, | ||
| uint | pos, | ||
| uint | primitive_type | ||
| ) |
Definition at line 81 of file gizmo_draw_utils.c.
References color, GPU_PRIM_LINE_LOOP, GPU_PRIM_LINES, GPU_PRIM_TRI_FAN, GPU_PRIM_TRIS, immBegin(), immEnd(), immUniformColor4fv(), immVertex3fv(), pos, and verts.
Referenced by arrow_draw_geom(), and gizmo_primitive_draw_geom().