Blender  V2.93
Classes | Typedefs | Functions
DRW_select_buffer.h File Reference
#include "BLI_sys_types.h"

Go to the source code of this file.

Classes

struct  SELECTID_ObjectData
 
struct  ObjectOffsets
 
struct  SELECTID_Context
 

Typedefs

typedef struct SELECTID_ObjectData SELECTID_ObjectData
 
typedef struct SELECTID_Context SELECTID_Context
 

Functions

bool DRW_select_buffer_elem_get (const uint sel_id, uint *r_elem, uint *r_base_index, char *r_elem_type)
 
uint DRW_select_buffer_context_offset_for_object_elem (struct Depsgraph *depsgraph, struct Object *object, char elem_type)
 
uintDRW_select_buffer_read (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const rcti *rect, uint *r_buf_len)
 
uintDRW_select_buffer_bitmap_from_rect (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const struct rcti *rect, uint *r_bitmap_len)
 
uintDRW_select_buffer_bitmap_from_circle (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int center[2], const int radius, uint *r_bitmap_len)
 
uintDRW_select_buffer_bitmap_from_poly (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int poly[][2], const int poly_len, const struct rcti *rect, uint *r_bitmap_len)
 
uint DRW_select_buffer_sample_point (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int center[2])
 
uint DRW_select_buffer_find_nearest_to_point (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int center[2], const uint id_min, const uint id_max, uint *dist)
 
void DRW_select_buffer_context_create (struct Base **bases, const uint bases_len, short select_mode)
 

Typedef Documentation

◆ SELECTID_Context

◆ SELECTID_ObjectData

Function Documentation

◆ DRW_select_buffer_bitmap_from_circle()

uint* DRW_select_buffer_bitmap_from_circle ( struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
const int  center[2],
const int  radius,
uint r_bitmap_len 
)
Parameters
centerCircle center.
radiusCircle radius.
r_bitmap_lenNumber of indices in the selection id buffer.
Returns
a BLI_bitmap the length of r_bitmap_len or NULL on failure.

Definition at line 174 of file draw_select_buffer.c.

References BLI_assert, BLI_BITMAP_ENABLE, BLI_BITMAP_NEW, center, depsgraph, DRW_select_buffer_read(), DRW_select_engine_context_get(), SELECTID_Context::index_drawn_len, MEM_freeN, NULL, and rcti::xmin.

Referenced by mesh_circle_select(), paint_facesel_circle_select(), and paint_vertsel_circle_select().

◆ DRW_select_buffer_bitmap_from_poly()

uint* DRW_select_buffer_bitmap_from_poly ( struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
const int  poly[][2],
const int  poly_len,
const struct rcti rect,
uint r_bitmap_len 
)

◆ DRW_select_buffer_bitmap_from_rect()

uint* DRW_select_buffer_bitmap_from_rect ( struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
const struct rcti rect,
uint r_bitmap_len 
)

◆ DRW_select_buffer_context_create()

void DRW_select_buffer_context_create ( struct Base **  bases,
const uint  bases_len,
short  select_mode 
)

◆ DRW_select_buffer_context_offset_for_object_elem()

uint DRW_select_buffer_context_offset_for_object_elem ( struct Depsgraph depsgraph,
struct Object object,
char  elem_type 
)

◆ DRW_select_buffer_elem_get()

bool DRW_select_buffer_elem_get ( const uint  sel_id,
uint r_elem,
uint r_base_index,
char *  r_elem_type 
)

◆ DRW_select_buffer_find_nearest_to_point()

uint DRW_select_buffer_find_nearest_to_point ( struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
const int  center[2],
const uint  id_min,
const uint  id_max,
uint dist 
)

Find the selection id closest to center.

Parameters
distUse to initialize the distance, when found, this value is set to the distance of the selection that's returned.

Definition at line 365 of file draw_select_buffer.c.

References abs(), BLI_array_iter_spiral_square, BLI_rcti_init_pt_radius(), BLI_rcti_size_x(), center, data, depsgraph, DRW_select_buffer_read(), height, SelectReadData::id_max, SelectReadData::id_min, MEM_freeN, NULL, select_buffer_test_fn(), width, rcti::xmax, and rcti::ymax.

Referenced by ED_mesh_pick_face(), ED_mesh_pick_vert(), EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), and EDBM_vert_find_nearest_ex().

◆ DRW_select_buffer_read()

uint* DRW_select_buffer_read ( struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
const rcti rect,
uint r_buf_len 
)

◆ DRW_select_buffer_sample_point()

uint DRW_select_buffer_sample_point ( struct Depsgraph depsgraph,
struct ARegion region,
struct View3D v3d,
const int  center[2] 
)