|
Blender V4.3
|
#include "gizmo_geometry.h"Go to the source code of this file.
Classes | |
| struct | GizmoCommonData |
| struct | GizmoInteraction |
Macros | |
| #define | DIAL_RESOLUTION 48 |
Functions | |
| float | gizmo_offset_from_value (GizmoCommonData *data, float value, bool constrained, bool inverted) |
| float | gizmo_value_from_offset (GizmoCommonData *data, GizmoInteraction *inter, float offset, bool constrained, bool inverted, bool use_precision) |
| void | gizmo_property_data_update (wmGizmo *gz, GizmoCommonData *data, wmGizmoProperty *gz_prop, bool constrained, bool inverted) |
| void | gizmo_property_value_reset (bContext *C, const wmGizmo *gz, GizmoInteraction *inter, wmGizmoProperty *gz_prop) |
| void | gizmo_color_get (const wmGizmo *gz, bool highlight, float r_color[4]) |
| bool | gizmo_window_project_2d (bContext *C, const wmGizmo *gz, const float mval[2], int axis, bool use_offset, float r_co[2]) |
| bool | gizmo_window_project_3d (bContext *C, const wmGizmo *gz, const float mval[2], bool use_offset, float r_co[3]) |
| wmGizmo * | gizmo_find_from_properties (const IDProperty *properties, const int spacetype, const int regionid) |
| void | wm_gizmo_geometryinfo_draw (const GizmoGeomInfo *info, bool select, const float color[4]) |
| void | wm_gizmo_vec_draw (const float color[4], const float(*verts)[3], uint vert_count, uint pos, uint primitive_type) |
| #define DIAL_RESOLUTION 48 |
Definition at line 16 of file gizmo_library_intern.hh.
Referenced by dial_geom_draw(), dial_ghostarc_draw(), and gizmo_primitive_draw_intern().
Definition at line 156 of file gizmo_library_utils.cc.
References wmGizmo::color, wmGizmo::color_hi, copy_v4_v4(), wmGizmo::flag, and WM_GIZMO_DRAW_HOVER.
Referenced by arrow_draw_intern(), button2d_draw_intern(), dial_draw_intern(), ed_gizmo_draw_preset_geometry(), gizmo_cage2d_draw_intern(), gizmo_cage3d_draw_intern(), gizmo_primitive_draw_intern(), and move3d_draw_intern().
| wmGizmo * gizmo_find_from_properties | ( | const IDProperty * | properties, |
| const int | spacetype, | ||
| const int | regionid ) |
Definition at line 256 of file gizmo_library_utils.cc.
References ELEM, G_MAIN, LISTBASE_FOREACH, RGN_TYPE_ANY, SPACE_TYPE_ANY, and WM_gizmomap_group_list().
Referenced by gizmo_primitive_rna_find_operator(), and gizmo_snap_rna_find_operator().
| float gizmo_offset_from_value | ( | GizmoCommonData * | data, |
| float | value, | ||
| bool | constrained, | ||
| bool | inverted ) |
Definition at line 60 of file gizmo_library_utils.cc.
References gizmo_offset_from_value_constr().
Referenced by gizmo_arrow_exit(), and gizmo_arrow_modal().
| void gizmo_property_data_update | ( | wmGizmo * | gz, |
| GizmoCommonData * | data, | ||
| wmGizmoProperty * | gz_prop, | ||
| bool | constrained, | ||
| bool | inverted ) |
Definition at line 108 of file gizmo_library_utils.cc.
References BLI_assert, wmGizmoProperty::custom_func, gizmo_offset_from_value_constr(), 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 wmGizmo * | gz, | ||
| GizmoInteraction * | inter, | ||
| wmGizmoProperty * | gz_prop ) |
Definition at line 146 of file gizmo_library_utils.cc.
References GizmoInteraction::init_value, and WM_gizmo_target_property_float_set().
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 73 of file gizmo_library_utils.cc.
References CLAMP, GIZMO_PRECISION_FAC, gizmo_value_from_offset_constr(), GizmoInteraction::init_offset, GizmoInteraction::precision_offset, and GizmoInteraction::prev_offset.
Referenced by gizmo_arrow_modal().
| bool gizmo_window_project_2d | ( | bContext * | C, |
| const 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 168 of file gizmo_library_utils.cc.
References CLOG_WARN, copy_v2_v2(), CTX_wm_region(), ED_view3d_win_to_3d_on_plane(), wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoType::idname, invert_m4_m4(), LOG, mul_m4_v3(), params, wmGizmo::parent_gzgroup, plane_from_point_normal_v3(), 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 wmGizmo * | gz, | ||
| const float | mval[2], | ||
| bool | use_offset, | ||
| float | r_co[3] ) |
Definition at line 213 of file gizmo_library_utils.cc.
References CLOG_WARN, copy_v2_v2(), CTX_wm_region(), CTX_wm_view3d(), ED_view3d_win_to_3d(), wmGizmoGroupType::flag, wmGizmoGroupType::idname, wmGizmoType::idname, invert_m4_m4(), LOG, mul_m4_v3(), 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 GizmoGeomInfo * | info, |
| bool | select, | ||
| const float | color[4] ) |
Main draw call for GizmoGeomInfo data
Definition at line 21 of file gizmo_draw_utils.cc.
References batch, GPU_batch_create_ex(), GPU_batch_discard(), GPU_batch_draw(), GPU_BATCH_OWNS_INDEX, GPU_BATCH_OWNS_VBO, GPU_batch_program_set_builtin(), GPU_batch_uniform_4fv, GPU_COMP_F32, GPU_CULL_BACK, GPU_CULL_NONE, GPU_DEPTH_LESS_EQUAL, GPU_DEPTH_NONE, GPU_depth_test(), GPU_face_culling(), GPU_FETCH_FLOAT, GPU_indexbuf_add_tri_verts(), GPU_indexbuf_build(), GPU_indexbuf_init(), GPU_PRIM_TRIS, GPU_SHADER_3D_UNIFORM_COLOR, GPU_vertbuf_attr_fill(), GPU_vertbuf_create_with_format, GPU_vertbuf_data_alloc(), GPU_vertformat_attr_add(), GizmoGeomInfo::indices, GizmoGeomInfo::ntris, GizmoGeomInfo::nverts, and GizmoGeomInfo::verts.
Referenced by arrow_draw_geom(), dial_geom_draw(), ed_gizmo_draw_preset_geometry(), and move_geom_draw().
| void wm_gizmo_vec_draw | ( | const float | color[4], |
| const float(*) | verts[3], | ||
| uint | vert_count, | ||
| uint | pos, | ||
| uint | primitive_type ) |
Definition at line 68 of file gizmo_draw_utils.cc.
References 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().