|
Blender V4.3
|
Go to the source code of this file.
Typedefs | |
| typedef struct Dial | Dial |
Functions | |
| Dial * | BLI_dial_init (const float start_position[2], float threshold) |
| float | BLI_dial_angle (Dial *dial, const float current_position[2]) |
They just are initialized with the center of the dial and a threshold value as input.
When the distance of the current position of the dial from the center exceeds the threshold, this position is used to calculate the initial direction. After that, the angle from the initial direction is calculated based on current and previous directions of the digit, and returned to the user.
Usage examples:
Definition in file BLI_dial_2d.h.
| typedef struct Dial Dial |
Definition at line 40 of file BLI_dial_2d.h.
Definition at line 47 of file BLI_dial_2d.c.
References angle(), atan2f, copy_v2_v2(), cross_v2v2(), dot_v2v2(), fabsf, float, len_squared_v2(), M_PI, M_PI_2, normalize_v2(), and sub_v2_v2v2().
Referenced by gizmo_cage2d_modal(), radial_control_modal(), blender::ed::sculpt_paint::sculpt_update_cache_variants(), and viewroll_apply().
Definition at line 37 of file BLI_dial_2d.c.
References copy_v2_v2(), and MEM_callocN.
Referenced by gizmo_cage2d_modal(), radial_control_modal(), blender::ed::sculpt_paint::sculpt_update_cache_invariants(), and viewroll_invoke().