|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Serializes Fabric state to an EXR texture and JSON schema. More...
#include <StateEncoder.hpp>
Collaboration diagram for MayaFlux::Nexus::StateEncoder:Public Member Functions | |
| bool | encode (const Fabric &fabric, const std::string &base_path) |
| Encode the given Fabric to {base_path}.exr and {base_path}.json. | |
| const std::string & | last_error () const |
| Last error message, empty if no error. | |
| StateEncoder & | operator= (const StateEncoder &)=delete |
| StateEncoder & | operator= (StateEncoder &&)=default |
| StateEncoder ()=default | |
| StateEncoder (const StateEncoder &)=delete | |
| StateEncoder (StateEncoder &&)=default | |
| ~StateEncoder ()=default | |
Private Attributes | |
| std::string | m_last_error |
Serializes Fabric state to an EXR texture and JSON schema.
v1 scope: encodes all three Kinds (Emitter, Sensor, Agent) that have a position set. Output: {base}.exr RGBA32F, width=N entities, height=3 rows: row 0: position.xyz, intensity row 1: color.rgb, size row 2: radius, query_radius, 0, 0 {base}.json Schema v2 with per-entity records (id, kind, fields) and per-channel ranges for denormalization.
Entities without a position are skipped. Unnamed callables emit a warning but are still encoded. Optional fields (color, size) are written as null in the schema; the EXR channels are zeroed but the decoder ignores them.
Definition at line 24 of file StateEncoder.hpp.