-
Notifications
You must be signed in to change notification settings - Fork 8
/
flecs_components_transform.c
39 lines (30 loc) · 1.08 KB
/
flecs_components_transform.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#define FLECS_COMPONENTS_TRANSFORM_IMPL
#include "flecs_components_transform.h"
ECS_COMPONENT_DECLARE(EcsTransform2);
ECS_COMPONENT_DECLARE(EcsTransform3);
ECS_COMPONENT_DECLARE(EcsProject2);
ECS_COMPONENT_DECLARE(EcsProject3);
void FlecsComponentsTransformImport(
ecs_world_t *world)
{
ECS_MODULE(world, FlecsComponentsTransform);
ECS_IMPORT(world, FlecsComponentsCglm);
ecs_set_name_prefix(world, "Ecs");
ECS_META_COMPONENT(world, EcsPosition2);
ECS_META_COMPONENT(world, EcsPosition3);
ECS_META_COMPONENT(world, EcsScale2);
ECS_META_COMPONENT(world, EcsScale3);
ECS_META_COMPONENT(world, EcsRotation2);
ECS_META_COMPONENT(world, EcsRotation3);
ECS_META_COMPONENT(world, EcsQuaternion);
ECS_COMPONENT_DEFINE(world, EcsTransform2);
ECS_COMPONENT_DEFINE(world, EcsTransform3);
ECS_COMPONENT_DEFINE(world, EcsProject2);
ECS_COMPONENT_DEFINE(world, EcsProject3);
ecs_set_hooks(world, EcsTransform2, {
.ctor = flecs_default_ctor
});
ecs_set_hooks(world, EcsTransform3, {
.ctor = flecs_default_ctor
});
}