Blender V4.3
DRW_select_buffer.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2016 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11#include "DNA_ID.h"
12
13#include "BLI_array.hh"
15#include "BLI_sys_types.h" /* for bool and uint */
16
17struct ARegion;
18struct Base;
19struct Depsgraph;
20struct Object;
21struct RegionView3D;
22struct View3D;
23struct rcti;
24
27
29
30 /* Used to avoid adding to the pass more than once. */
31 bool in_pass;
32
33 /* Used to detect and remove objects that are not included in the array. */
35};
36
38 /* For convenience only. */
39 union {
42 };
43 union {
46 };
47 union {
50 };
52};
53
55 /* All context objects */
58
61
63
64 /* To check for updates. */
65 float persmat[4][4];
66 bool is_dirty(RegionView3D *rv3d);
67};
68
69/* `draw_select_buffer.cc` */
70
71bool DRW_select_buffer_elem_get(uint sel_id, uint *r_elem, uint *r_base_index, char *r_elem_type);
73 Object *object,
74 char elem_type);
79 Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect, uint *r_buf_len);
85 Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect, uint *r_bitmap_len);
93 ARegion *region,
94 View3D *v3d,
95 const int center[2],
96 int radius,
97 uint *r_bitmap_len);
105 ARegion *region,
106 View3D *v3d,
108 const rcti *rect,
109 uint *r_bitmap_len);
114 ARegion *region,
115 View3D *v3d,
116 const int center[2]);
123 ARegion *region,
124 View3D *v3d,
125 const int center[2],
126 uint id_min,
127 uint id_max,
128 uint *dist);
131 short select_mode);
unsigned int uint
ID and Library types, which are fundamental for SDNA.
uint * DRW_select_buffer_bitmap_from_rect(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect, uint *r_bitmap_len)
uint * DRW_select_buffer_bitmap_from_circle(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const int center[2], int radius, uint *r_bitmap_len)
void DRW_select_buffer_context_create(Depsgraph *depsgraph, blender::Span< Base * > bases, short select_mode)
uint DRW_select_buffer_sample_point(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const int center[2])
uint DRW_select_buffer_context_offset_for_object_elem(Depsgraph *depsgraph, Object *object, char elem_type)
bool DRW_select_buffer_elem_get(uint sel_id, uint *r_elem, uint *r_base_index, char *r_elem_type)
uint * DRW_select_buffer_read(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const rcti *rect, uint *r_buf_len)
uint * DRW_select_buffer_bitmap_from_poly(Depsgraph *depsgraph, ARegion *region, View3D *v3d, blender::Span< blender::int2 > poly, const rcti *rect, uint *r_bitmap_len)
uint DRW_select_buffer_find_nearest_to_point(Depsgraph *depsgraph, ARegion *region, View3D *v3d, const int center[2], uint id_min, uint id_max, uint *dist)
const Depsgraph * depsgraph
blender::Array< Object * > objects
blender::Array< ObjectOffsets > index_offsets
bool is_dirty(RegionView3D *rv3d)