28 using namespace ::
ant;
32 phene.material =
nullptr;
35 if (
auto element = phene_element.find(
"material");
element != phene_element.end())
46 auto pigmentation_element = data->find(
"pigmentation");
47 if (pigmentation_element == data->end())
48 throw std::runtime_error(
"Invalid pigmentation gene.");
A material is associated with exactly one shader program and contains a set of material properties wh...
static T * load(resource_manager *resourceManager, PHYSFS_File *file, const std::filesystem::path &path)
Loads resource data.
T * load(const std::filesystem::path &path)
Loads the requested resource.
nlohmann::json json
JSON data.
polyphenic_gene< phene::pigmentation > pigmentation
Polyphenic pigmentation gene.
void deserialize_gene(monophenic_gene< T > &gene, void(*deserialize_phene)(T &, const json &, resource_manager *), const json &gene_element, resource_manager *resource_manager)
Deserializes a gene.