|
Blender
V3.3
|
#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 (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) |
| uint * | DRW_select_buffer_read (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const rcti *rect, uint *r_buf_len) |
| uint * | DRW_select_buffer_bitmap_from_rect (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const struct rcti *rect, uint *r_bitmap_len) |
| uint * | DRW_select_buffer_bitmap_from_circle (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int center[2], int radius, uint *r_bitmap_len) |
| uint * | DRW_select_buffer_bitmap_from_poly (struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int poly[][2], 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], uint id_min, uint id_max, uint *dist) |
| void | DRW_select_buffer_context_create (struct Base **bases, uint bases_len, short select_mode) |
| typedef struct SELECTID_Context SELECTID_Context |
| typedef struct SELECTID_ObjectData SELECTID_ObjectData |
| uint* DRW_select_buffer_bitmap_from_circle | ( | struct Depsgraph * | depsgraph, |
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const int | center[2], | ||
| int | radius, | ||
| uint * | r_bitmap_len | ||
| ) |
| center | Circle center. |
| radius | Circle radius. |
| r_bitmap_len | Number of indices in the selection id buffer. |
Definition at line 148 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().
| uint* DRW_select_buffer_bitmap_from_poly | ( | struct Depsgraph * | depsgraph, |
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const int | poly[][2], | ||
| int | poly_len, | ||
| const struct rcti * | rect, | ||
| uint * | r_bitmap_len | ||
| ) |
| poly | The polygon coordinates. |
| poly_len | Length of the polygon. |
| rect | Polygon boundaries. |
Referenced by do_lasso_select_mesh(), do_lasso_select_paintface(), and do_lasso_select_paintvert().
| uint* DRW_select_buffer_bitmap_from_rect | ( | struct Depsgraph * | depsgraph, |
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const struct rcti * | rect, | ||
| uint * | r_bitmap_len | ||
| ) |
| rect | The rectangle to sample indices from (min/max inclusive). |
Referenced by do_mesh_box_select(), do_paintface_box_select(), and do_paintvert_box_select().
Definition at line 460 of file draw_select_buffer.c.
References DRW_select_engine_context_get(), SELECTID_Context::index_offsets, MEM_reallocN, Base::object, SELECTID_Context::objects, SELECTID_Context::objects_drawn, SELECTID_Context::objects_len, SELECTID_Context::persmat, Object::runtime, Object_Runtime::select_id, and SELECTID_Context::select_mode.
Referenced by EDBM_edge_find_nearest_ex(), EDBM_face_find_nearest_ex(), EDBM_vert_find_nearest_ex(), editselect_buf_cache_init(), and validate_object_select_id().
| uint DRW_select_buffer_context_offset_for_object_elem | ( | struct Depsgraph * | depsgraph, |
| struct Object * | object, | ||
| char | elem_type | ||
| ) |
Definition at line 424 of file draw_select_buffer.c.
References BLI_assert, DEG_get_evaluated_object(), depsgraph, draw_engine_select_type, SELECTID_ObjectData::drawn_index, DRW_drawdata_get(), DRW_select_engine_context_get(), ObjectOffsets::edge_start, ObjectOffsets::face_start, Object::id, SELECTID_Context::index_offsets, SELECTID_ObjectData::is_drawn, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, and ObjectOffsets::vert_start.
Referenced by do_lasso_select_mesh(), do_mesh_box_select(), edbm_backbuf_check_and_select_edges(), edbm_backbuf_check_and_select_faces(), and edbm_backbuf_check_and_select_verts().
| bool DRW_select_buffer_elem_get | ( | uint | sel_id, |
| uint * | r_elem, | ||
| uint * | r_base_index, | ||
| char * | r_elem_type | ||
| ) |
Definition at line 375 of file draw_select_buffer.c.
References DEG_get_original_object(), DRW_select_engine_context_get(), ObjectOffsets::edge, ObjectOffsets::edge_start, ObjectOffsets::face, ObjectOffsets::face_start, SELECTID_Context::index_offsets, SELECTID_Context::objects_drawn, SELECTID_Context::objects_drawn_len, Object::runtime, SCE_SELECT_EDGE, SCE_SELECT_FACE, SCE_SELECT_VERTEX, Object_Runtime::select_id, ObjectOffsets::vert, and ObjectOffsets::vert_start.
Referenced by edbm_select_id_bm_elem_get().
| uint DRW_select_buffer_find_nearest_to_point | ( | struct Depsgraph * | depsgraph, |
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const int | center[2], | ||
| uint | id_min, | ||
| uint | id_max, | ||
| uint * | dist | ||
| ) |
Find the selection id closest to center.
| dist | Use to initialize the distance, when found, this value is set to the distance of the selection that's returned. |
Definition at line 325 of file draw_select_buffer.c.
References blender::math::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, offset, 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().
| uint* DRW_select_buffer_read | ( | struct Depsgraph * | depsgraph, |
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const rcti * | rect, | ||
| uint * | r_buf_len | ||
| ) |
Main function to read a block of pixels from the select frame buffer.
Definition at line 35 of file draw_select_buffer.c.
References BLI_assert, BLI_rcti_compare(), BLI_rcti_isect(), BLI_rcti_size_x(), BLI_rcti_size_y(), depsgraph, DRW_draw_select_id(), DRW_engine_select_framebuffer_get(), DRW_engine_select_texture_get(), DRW_opengl_context_disable(), DRW_opengl_context_enable(), DRW_select_engine_context_get(), GPU_DATA_UINT, GPU_framebuffer_bind(), GPU_framebuffer_read_color(), GPU_framebuffer_restore(), GPU_select_buffer_stride_realign(), GPU_texture_height(), GPU_texture_width(), SELECTID_Context::index_drawn_len, MEM_mallocN, NULL, r, ARegion::winx, ARegion::winy, rcti::xmin, and rcti::ymin.
Referenced by DRW_select_buffer_bitmap_from_circle(), DRW_select_buffer_bitmap_from_poly(), DRW_select_buffer_bitmap_from_rect(), DRW_select_buffer_find_nearest_to_point(), and DRW_select_buffer_sample_point().
| uint DRW_select_buffer_sample_point | ( | struct Depsgraph * | depsgraph, |
| struct ARegion * | region, | ||
| struct View3D * | v3d, | ||
| const int | center[2] | ||
| ) |
Samples a single pixel.
Definition at line 280 of file draw_select_buffer.c.
References BLI_assert, center, depsgraph, DRW_select_buffer_read(), MEM_freeN, ret, and rcti::xmin.
Referenced by ED_mesh_pick_face(), ED_mesh_pick_vert(), EDBM_face_find_nearest_ex(), and imapaint_pick_face().