|
rigComponent 0.1.1
RigKit pack API - rigComponent
|
Reads and writes reflected entity properties by name. More...
#include <glm/glm.hpp>#include <optional>#include <string_view>#include "ecs/MEcs.h"#include "ecs/PropertyReflection.h"Functions | |
| bool | rigkit::ecs::writeEntityProperty (MEcs &ecs, entt::entity entity, std::string_view propertyKey, float value) |
| Write a reflected float/int/bool property on an entity by name. | |
| bool | rigkit::ecs::writeEntityProperty (MEcs &ecs, std::string_view entityName, std::string_view propertyKey, float value) |
| Resolve entity by name, then writeEntityProperty. | |
| std::optional< float > | rigkit::ecs::readEntityProperty (MEcs &ecs, entt::entity entity, std::string_view propertyKey) |
| Read a reflected float (int/bool coerced) if present. | |
| bool | rigkit::ecs::writeEntityVec2Property (MEcs &ecs, entt::entity entity, std::string_view propertyKey, glm::vec2 value) |
| Write two floats into a vec2 property, or two named float props. | |
| std::optional< sProp > | rigkit::ecs::findEntityProperty (MEcs &ecs, entt::entity entity, std::string_view propertyKey) |
| Resolve a GetProperties row by propertyKey. | |
| void | rigkit::ecs::invalidateEntityPropertyCache () |
| Drop cached GetProperties pointers. | |
Reads and writes reflected entity properties by name.
Numeric scalars only, resolved through GetProperties. Dotted contract keys such as position.y map onto the display names the components register.
| std::optional< sProp > rigkit::ecs::findEntityProperty | ( | MEcs & | ecs, |
| entt::entity | entity, | ||
| std::string_view | propertyKey ) |
Resolve a GetProperties row by propertyKey.
Same name matching as read/write (dotted aliases, display names). The returned sProp.data points into live component storage.
| void rigkit::ecs::invalidateEntityPropertyCache | ( | ) |
Drop cached GetProperties pointers.
Call when reflected data moves (e.g. pullEffectDriveSlots rebuilds driveSlots). The next write re-resolves.
| bool rigkit::ecs::writeEntityProperty | ( | MEcs & | ecs, |
| entt::entity | entity, | ||
| std::string_view | propertyKey, | ||
| float | value ) |
Write a reflected float/int/bool property on an entity by name.
Resolves propertyKey against GetProperties / registered props. Accepts dotted contract keys (position.y to Position Y) and exact prop names.