Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Creation & Deletion
Collaboration diagram for Creation & Deletion:

Macros

#define ecs_new_w(world, T)
 Create a new entity with a component.
#define ecs_new_w_pair(world, first, second)
 Create a new entity with a pair.
#define ecs_bulk_new(world, component, count)
 Bulk create entities with a component.

Detailed Description

Macro Definition Documentation

◆ ecs_bulk_new

#define ecs_bulk_new ( world,
component,
count )
Value:
ecs_bulk_new_w_id(world, ecs_id(component), count)
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component ID for EcsDocDescription.
const ecs_entity_t * ecs_bulk_new_w_id(ecs_world_t *world, ecs_id_t component, int32_t count)
Create N new entities.

Bulk create entities with a component.

Definition at line 307 of file flecs_c.h.

◆ ecs_new_w

#define ecs_new_w ( world,
T )
Value:
ecs_new_w_id(world, ecs_id(T))
ecs_entity_t ecs_new_w_id(ecs_world_t *world, ecs_id_t component)
Create new entity with (component) ID.

Create a new entity with a component.

Definition at line 300 of file flecs_c.h.

◆ ecs_new_w_pair

#define ecs_new_w_pair ( world,
first,
second )
Value:
ecs_new_w_id(world, ecs_pair(first, second))

Create a new entity with a pair.

Definition at line 303 of file flecs_c.h.