Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
entity_ranges.h
Go to the documentation of this file.
1
6#ifdef FLECS_ENTITY_RANGES
7
8#ifndef FLECS_ENTITY_RANGES_H
9#define FLECS_ENTITY_RANGES_H
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
26typedef struct ecs_entity_range_t {
27 uint32_t min;
28 uint32_t max;
29 uint32_t cur;
30 ecs_vec_t recycled;
32
47FLECS_API
49 ecs_world_t *world,
50 uint32_t min,
51 uint32_t max);
52
67FLECS_API
69 ecs_world_t *world,
70 const ecs_entity_range_t *range);
71
79FLECS_API
81 const ecs_world_t *world);
82
85#ifdef __cplusplus
86}
87#endif
88
89#endif
90
91#endif // FLECS_ENTITY_RANGES
FLECS_API void ecs_entity_range_set(ecs_world_t *world, const ecs_entity_range_t *range)
Set the active entity range.
FLECS_API const ecs_entity_range_t * ecs_entity_range_new(ecs_world_t *world, uint32_t min, uint32_t max)
Create a new entity range.
struct ecs_entity_range_t ecs_entity_range_t
Type that stores an entity id range.
FLECS_API const ecs_entity_range_t * ecs_entity_range_get(const ecs_world_t *world)
Get the currently active entity id range.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
Definition flecs.h:437
Type that stores an entity id range.
uint32_t max
Last id in range (inclusive, 0 = unlimited).
uint32_t cur
Last issued id in range.
ecs_vec_t recycled
Recycled entity ids (vec<entity_t>).
uint32_t min
First id in range (inclusive).