Blender V4.3
arrow3d_gizmo.cc File Reference
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector_types.hh"
#include "BLI_utildefines.h"
#include "DNA_view3d_types.h"
#include "BKE_context.hh"
#include "GPU_immediate.hh"
#include "GPU_immediate_util.hh"
#include "GPU_matrix.hh"
#include "GPU_select.hh"
#include "GPU_state.hh"
#include "MEM_guardedalloc.h"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_gizmo_library.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "../gizmo_geometry.h"
#include "../gizmo_library_intern.hh"

Go to the source code of this file.

Classes

struct  ArrowGizmo3D
 
struct  ArrowGizmoInteraction
 

Functions

Arrow Gizmo API
void ED_gizmo_arrow3d_set_ui_range (wmGizmo *gz, const float min, const float max)
 
void ED_gizmo_arrow3d_set_range_fac (wmGizmo *gz, const float range_fac)
 
static void GIZMO_GT_arrow_3d (wmGizmoType *gzt)
 
void ED_gizmotypes_arrow_3d ()
 

Arrow Gizmo

Simple arrow gizmo which is dragged into a certain direction. The arrow head can have varying shapes, e.g. cone, box, etc.

2D/3D Gizmo

  • matrix[0] is derived from Y and Z.
  • matrix[1] is 'up' for gizmo types that have an up.
  • matrix[2] is the arrow direction (for all arrows).
#define ARROW_SELECT_THRESHOLD_PX   (5)
 
static void gizmo_arrow_matrix_basis_get (const wmGizmo *gz, float r_matrix[4][4])
 
static void arrow_draw_geom (const ArrowGizmo3D *arrow, const bool select, const float color[4], const float arrow_length)
 
static void arrow_draw_intern (ArrowGizmo3D *arrow, const bool select, const bool highlight)
 
static void gizmo_arrow_draw_select (const bContext *, wmGizmo *gz, int select_id)
 
static void gizmo_arrow_draw (const bContext *, wmGizmo *gz)
 
static int gizmo_arrow_test_select (bContext *, wmGizmo *gz, const int mval[2])
 
static int gizmo_arrow_modal (bContext *C, wmGizmo *gz, const wmEvent *event, eWM_GizmoFlagTweak tweak_flag)
 
static void gizmo_arrow_setup (wmGizmo *gz)
 
static int gizmo_arrow_invoke (bContext *, wmGizmo *gz, const wmEvent *event)
 
static void gizmo_arrow_property_update (wmGizmo *gz, wmGizmoProperty *gz_prop)
 
static void gizmo_arrow_exit (bContext *C, wmGizmo *gz, const bool cancel)
 

Macro Definition Documentation

◆ ARROW_SELECT_THRESHOLD_PX

#define ARROW_SELECT_THRESHOLD_PX   (5)

To use custom arrows exported to geom_arrow_gizmo.cc.

Definition at line 55 of file arrow3d_gizmo.cc.

Referenced by arrow_draw_geom(), and gizmo_arrow_test_select().

Function Documentation

◆ arrow_draw_geom()

◆ arrow_draw_intern()

◆ ED_gizmo_arrow3d_set_range_fac()

void ED_gizmo_arrow3d_set_range_fac ( wmGizmo * gz,
float range_fac )

◆ ED_gizmo_arrow3d_set_ui_range()

void ED_gizmo_arrow3d_set_ui_range ( wmGizmo * gz,
float min,
float max )

◆ ED_gizmotypes_arrow_3d()

void ED_gizmotypes_arrow_3d ( )

Definition at line 579 of file arrow3d_gizmo.cc.

References GIZMO_GT_arrow_3d(), and WM_gizmotype_append().

Referenced by ED_spacetypes_init().

◆ gizmo_arrow_draw()

static void gizmo_arrow_draw ( const bContext * ,
wmGizmo * gz )
static

Definition at line 260 of file arrow3d_gizmo.cc.

References arrow_draw_intern(), wmGizmo::state, and WM_GIZMO_STATE_HIGHLIGHT.

Referenced by GIZMO_GT_arrow_3d().

◆ gizmo_arrow_draw_select()

static void gizmo_arrow_draw_select ( const bContext * ,
wmGizmo * gz,
int select_id )
static

Definition at line 254 of file arrow3d_gizmo.cc.

References arrow_draw_intern(), and GPU_select_load_id().

Referenced by GIZMO_GT_arrow_3d().

◆ gizmo_arrow_exit()

◆ gizmo_arrow_invoke()

◆ gizmo_arrow_matrix_basis_get()

static void gizmo_arrow_matrix_basis_get ( const wmGizmo * gz,
float r_matrix[4][4] )
static

◆ gizmo_arrow_modal()

◆ gizmo_arrow_property_update()

◆ gizmo_arrow_setup()

static void gizmo_arrow_setup ( wmGizmo * gz)
static

◆ gizmo_arrow_test_select()

static int gizmo_arrow_test_select ( bContext * ,
wmGizmo * gz,
const int mval[2] )
static

◆ GIZMO_GT_arrow_3d()