16 flecs::entity_t prefix = 0,
17 flecs::entity_t base = 0,
18 flecs::entity_t over = 0,
20 int32_t power = 0)
const
24 desc.
symbol =
const_cast<char*
>(symbol);
37 flecs::entity_t prefix = 0,
38 flecs::entity_t base = 0,
39 flecs::entity_t over = 0,
41 int32_t power = 0)
const
59 int32_t power = 0)
const
63 desc.
symbol =
const_cast<char*
>(symbol);
72const Self&
quantity(flecs::entity_t quantity)
const {
73 ecs_add_pair(this->
world(), this->
id(), flecs::Quantity, quantity);
78template <
typename Quantity>
void ecs_add_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Add a (component) id to an entity.
Used with ecs_unit_init().
ecs_entity_t base
Base unit, e.g.
ecs_entity_t over
Over unit, e.g.
const char * symbol
Unit symbol, e.g.
ecs_entity_t prefix
Prefix indicating order of magnitude relative to the derived unit.
ecs_unit_translation_t translation
Translation to apply to derived unit (optional).
ecs_entity_t entity
Existing entity to associate with unit (optional).
Used with ecs_unit_prefix_init().
ecs_entity_t entity
Existing entity to associate with unit prefix (optional).
const char * symbol
Unit symbol, e.g.
ecs_unit_translation_t translation
Translation to apply to derived unit (optional).
int32_t power
Power to apply to factor (e.g.
int32_t factor
Factor to apply (e.g.