Blender  V3.3
Classes
arrow3d_gizmo.c File Reference
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_view3d_types.h"
#include "BKE_context.h"
#include "GPU_immediate.h"
#include "GPU_immediate_util.h"
#include "GPU_matrix.h"
#include "GPU_select.h"
#include "GPU_state.h"
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_gizmo_library.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "UI_interface.h"
#include "../gizmo_geometry.h"
#include "../gizmo_library_intern.h"

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 (void)
 

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)
 
typedef struct ArrowGizmo3D ArrowGizmo3D
 
typedef struct ArrowGizmoInteraction ArrowGizmoInteraction
 
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 *UNUSED(C), wmGizmo *gz, int select_id)
 
static void gizmo_arrow_draw (const bContext *UNUSED(C), wmGizmo *gz)
 
static int gizmo_arrow_test_select (bContext *UNUSED(C), 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 *UNUSED(C), 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)

Definition at line 54 of file arrow3d_gizmo.c.

Typedef Documentation

◆ ArrowGizmo3D

typedef struct ArrowGizmo3D ArrowGizmo3D

◆ ArrowGizmoInteraction

Function Documentation

◆ arrow_draw_geom()

static void arrow_draw_geom ( const ArrowGizmo3D arrow,
const bool  select,
const float  color[4],
const float  arrow_length 
)
static

◆ arrow_draw_intern()

static void arrow_draw_intern ( ArrowGizmo3D arrow,
const bool  select,
const bool  highlight 
)
static

◆ ED_gizmo_arrow3d_set_range_fac()

void ED_gizmo_arrow3d_set_range_fac ( struct wmGizmo gz,
float  range_fac 
)

◆ ED_gizmo_arrow3d_set_ui_range()

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

◆ ED_gizmotypes_arrow_3d()

void ED_gizmotypes_arrow_3d ( void  )

Definition at line 541 of file arrow3d_gizmo.c.

References GIZMO_GT_arrow_3d(), and WM_gizmotype_append().

Referenced by ED_spacetypes_init().

◆ gizmo_arrow_draw()

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

Definition at line 222 of file arrow3d_gizmo.c.

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 UNUSEDC,
wmGizmo gz,
int  select_id 
)
static

Definition at line 216 of file arrow3d_gizmo.c.

References arrow_draw_intern(), and GPU_select_load_id().

Referenced by GIZMO_GT_arrow_3d().

◆ gizmo_arrow_exit()

static void gizmo_arrow_exit ( bContext C,
wmGizmo gz,
const bool  cancel 
)
static

◆ gizmo_arrow_invoke()

static int gizmo_arrow_invoke ( bContext UNUSEDC,
wmGizmo gz,
const wmEvent event 
)
static

◆ gizmo_arrow_matrix_basis_get()

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

◆ gizmo_arrow_modal()

static int gizmo_arrow_modal ( bContext C,
wmGizmo gz,
const wmEvent event,
eWM_GizmoFlagTweak  tweak_flag 
)
static

◆ gizmo_arrow_property_update()

static void gizmo_arrow_property_update ( wmGizmo gz,
wmGizmoProperty gz_prop 
)
static

◆ gizmo_arrow_setup()

static void gizmo_arrow_setup ( wmGizmo gz)
static

◆ gizmo_arrow_test_select()

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

◆ GIZMO_GT_arrow_3d()

static void GIZMO_GT_arrow_3d ( wmGizmoType gzt)
static