diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 12:29:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-08 12:30:05 +0300 |
commit | e89d42ddffef8892a8eb52d29e2a7329ad381204 (patch) | |
tree | 9997122e126d8da1b41e37ec414b340aa7dfba91 /source/blender/draw/DRW_select_buffer.h | |
parent | a46ff1dd38a2d23a1c0ac05cad3155398fc19e92 (diff) |
Cleanup: move public doc-strings into headers for 'draw'
Ref T92709
Diffstat (limited to 'source/blender/draw/DRW_select_buffer.h')
-rw-r--r-- | source/blender/draw/DRW_select_buffer.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/draw/DRW_select_buffer.h b/source/blender/draw/DRW_select_buffer.h index 43d4005c3a9..18134558af8 100644 --- a/source/blender/draw/DRW_select_buffer.h +++ b/source/blender/draw/DRW_select_buffer.h @@ -81,6 +81,7 @@ typedef struct SELECTID_Context { } SELECTID_Context; /* draw_select_buffer.c */ + bool DRW_select_buffer_elem_get(const uint sel_id, uint *r_elem, uint *r_base_index, @@ -88,22 +89,41 @@ bool DRW_select_buffer_elem_get(const uint sel_id, uint DRW_select_buffer_context_offset_for_object_elem(struct Depsgraph *depsgraph, struct Object *object, char elem_type); +/** + * Main function to read a block of pixels from the select frame buffer. + */ uint *DRW_select_buffer_read(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const rcti *rect, uint *r_buf_len); +/** + * \param rect: The rectangle to sample indices from (min/max inclusive). + * \returns a #BLI_bitmap the length of \a bitmap_len or NULL on failure. + */ uint *DRW_select_buffer_bitmap_from_rect(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const struct rcti *rect, uint *r_bitmap_len); +/** + * \param center: Circle center. + * \param radius: Circle radius. + * \param r_bitmap_len: Number of indices in the selection id buffer. + * \returns a #BLI_bitmap the length of \a r_bitmap_len or NULL on failure. + */ 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); +/** + * \param poly: The polygon coordinates. + * \param poly_len: Length of the polygon. + * \param rect: Polygon boundaries. + * \returns a #BLI_bitmap. + */ uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, @@ -111,10 +131,18 @@ uint *DRW_select_buffer_bitmap_from_poly(struct Depsgraph *depsgraph, const int poly_len, const struct rcti *rect, uint *r_bitmap_len); +/** + * Samples a single pixel. + */ uint DRW_select_buffer_sample_point(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, const int center[2]); +/** + * Find the selection id closest to \a center. + * \param dist: Use to initialize the distance, + * when found, this value is set to the distance of the selection that's returned. + */ uint DRW_select_buffer_find_nearest_to_point(struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, |