|
Blender V4.3
|
Go to the source code of this file.
Classes | |
| struct | BLI_Buffer |
Macros | |
| #define | BLI_buffer_declare_static(type_, name_, flag_, static_count_) |
| #define | BLI_buffer_declare(type_, name_, flag_) |
| #define | BLI_buffer_at(buffer_, type_, index_) |
| #define | BLI_buffer_array(buffer_, type_) (&(BLI_buffer_at(buffer_, type_, 0))) |
| #define | BLI_buffer_resize_data(buffer_, type_, new_count_) ((BLI_buffer_resize(buffer_, new_count_), new_count_ ? BLI_buffer_array(buffer_, type_) : NULL)) |
| #define | BLI_buffer_reinit_data(buffer_, type_, new_count_) ((BLI_buffer_reinit(buffer_, new_count_), new_count_ ? BLI_buffer_array(buffer_, type_) : NULL)) |
| #define | BLI_buffer_append(buffer_, type_, val_) |
| #define | BLI_buffer_clear(buffer_) |
| #define | BLI_buffer_append_array(buffer_, type_, data_, count_) |
| #define | BLI_buffer_free(name_) |
| #define | BLI_buffer_field_init(name_, type_) |
| #define | BLI_buffer_field_free(name_) _bli_buffer_free(name_) |
Typedefs | |
| typedef struct BLI_Buffer | BLI_Buffer |
Enumerations | |
| enum | { BLI_BUFFER_NOP = 0 , BLI_BUFFER_USE_STATIC = (1 << 0) } |
Functions | |
| void | BLI_buffer_resize (BLI_Buffer *buffer, size_t new_count) |
| void | BLI_buffer_reinit (BLI_Buffer *buffer, size_t new_count) |
| void | _bli_buffer_append_array (BLI_Buffer *buffer, void *new_data, size_t count) |
| void | _bli_buffer_free (BLI_Buffer *buffer) |
| #define BLI_buffer_append | ( | buffer_, | |
| type_, | |||
| val_ ) |
Definition at line 52 of file BLI_buffer.h.
Referenced by bm_face_split_by_edges(), BM_mesh_separate_faces(), raycast_callback(), sph_force_cb(), and wm_gizmogroup_intersectable_gizmos_to_list().
| #define BLI_buffer_append_array | ( | buffer_, | |
| type_, | |||
| data_, | |||
| count_ ) |
Definition at line 82 of file BLI_buffer.h.
Referenced by dynamics_step_sphdata_reduce().
| #define BLI_buffer_array | ( | buffer_, | |
| type_ ) (&(BLI_buffer_at(buffer_, type_, 0))) |
Definition at line 44 of file BLI_buffer.h.
| #define BLI_buffer_at | ( | buffer_, | |
| type_, | |||
| index_ ) |
Definition at line 38 of file BLI_buffer.h.
Referenced by dynamics_step_sphdata_reduce(), and psys_sph_flush_springs().
| #define BLI_buffer_clear | ( | buffer_ | ) |
Definition at line 56 of file BLI_buffer.h.
Referenced by bm_face_split_by_edges(), and BM_mesh_separate_faces().
| #define BLI_buffer_declare | ( | type_, | |
| name_, | |||
| flag_ ) |
Definition at line 34 of file BLI_buffer.h.
| #define BLI_buffer_declare_static | ( | type_, | |
| name_, | |||
| flag_, | |||
| static_count_ ) |
Definition at line 27 of file BLI_buffer.h.
Referenced by BKE_mesh_uv_vert_map_create(), BM_mesh_separate_faces(), edbm_face_split_by_edges_exec(), isect_bvhtree_point_v3(), solidify_add_thickness(), and wm_gizmomap_highlight_find().
| #define BLI_buffer_field_free | ( | name_ | ) | _bli_buffer_free(name_) |
Definition at line 113 of file BLI_buffer.h.
Referenced by dynamics_step_sphdata_reduce(), and psys_sph_flush_springs().
| #define BLI_buffer_field_init | ( | name_, | |
| type_ ) |
A buffer embedded in a struct. Using #memcpy is allowed until first resize.
Definition at line 106 of file BLI_buffer.h.
Referenced by psys_sph_init().
| #define BLI_buffer_free | ( | name_ | ) |
Definition at line 96 of file BLI_buffer.h.
Referenced by BKE_mesh_uv_vert_map_create(), BM_mesh_separate_faces(), edbm_face_split_by_edges_exec(), isect_bvhtree_point_v3(), solidify_add_thickness(), and wm_gizmomap_highlight_find().
| #define BLI_buffer_reinit_data | ( | buffer_, | |
| type_, | |||
| new_count_ ) ((BLI_buffer_reinit(buffer_, new_count_), new_count_ ? BLI_buffer_array(buffer_, type_) : NULL)) |
Definition at line 49 of file BLI_buffer.h.
Referenced by BKE_mesh_uv_vert_map_create(), and solidify_add_thickness().
| #define BLI_buffer_resize_data | ( | buffer_, | |
| type_, | |||
| new_count_ ) ((BLI_buffer_resize(buffer_, new_count_), new_count_ ? BLI_buffer_array(buffer_, type_) : NULL)) |
Definition at line 46 of file BLI_buffer.h.
| typedef struct BLI_Buffer BLI_Buffer |
| anonymous enum |
| Enumerator | |
|---|---|
| BLI_BUFFER_NOP | |
| BLI_BUFFER_USE_STATIC | |
Definition at line 22 of file BLI_buffer.h.
| void _bli_buffer_append_array | ( | BLI_Buffer * | buffer, |
| void * | new_data, | ||
| size_t | count ) |
Append an array of elements.
Callers use BLI_buffer_append_array.
Definition at line 100 of file buffer.c.
References BLI_buffer_resize(), BLI_Buffer::count, count, BLI_Buffer::data, and BLI_Buffer::elem_size.
| void _bli_buffer_free | ( | BLI_Buffer * | buffer | ) |
Does not free the buffer structure itself.
Callers use BLI_buffer_free.
Definition at line 109 of file buffer.c.
References BLI_BUFFER_USE_STATIC, BLI_Buffer::data, BLI_Buffer::flag, and MEM_freeN().
| void BLI_buffer_reinit | ( | BLI_Buffer * | buffer, |
| size_t | new_count ) |
Ensure size, throwing away old data, respecting #BLI_BUFFER_USE_CALLOC.
Similar to BLI_buffer_resize, but use when the existing data can be:
Definition at line 77 of file buffer.c.
References BLI_Buffer::alloc_count, BLI_BUFFER_USE_STATIC, buffer_alloc(), BLI_Buffer::count, BLI_Buffer::data, BLI_Buffer::flag, MEM_freeN(), and UNLIKELY.
| void BLI_buffer_resize | ( | BLI_Buffer * | buffer, |
| size_t | new_count ) |
Definition at line 51 of file buffer.c.
References BLI_Buffer::alloc_count, BLI_BUFFER_USE_STATIC, buffer_alloc(), buffer_realloc(), BLI_Buffer::count, BLI_Buffer::data, BLI_Buffer::elem_size, BLI_Buffer::flag, and UNLIKELY.
Referenced by _bli_buffer_append_array().