Struct ecs_bulk_desc_t


#include <include/flecs.h>

typedef struct ecs_bulk_desc_t


Used with ecs_bulk_init


Lines 640-664 in include/flecs.h.

typedef struct ecs_bulk_desc_t { 
    int32_t _canary;

    ecs_entity_t *entities;  /* Entities to bulk insert. Entity ids provided by 
                         * the application application must be empty (cannot
                         * have components). If no entity ids are provided, the
                         * operation will create 'count' new entities. */

    int32_t count;      /* Number of entities to create/populate */

    ecs_id_t ids[ECS_ID_CACHE_SIZE]; /* Ids to create the entities with */

    void **data;       /* Array with component data to insert. Each element in 
                        * the array must correspond with an element in the ids
                        * array. If an element in the ids array is a tag, the
                        * data array must contain a NULL. An element may be
                        * set to NULL for a component, in which case the
                        * component will not be set by the operation. */

    ecs_table_t *table; /* Table to insert the entities into. Should not be set
                         * at the same time as ids. When 'table' is set at the
                         * same time as 'data', the elements in the data array
                         * must correspond with the ids in the table's type. */

} ecs_bulk_desc_t;