30 std::uint8_t lateral_ocelli_present{0};
31 ctx.
read8(
reinterpret_cast<std::byte*
>(&lateral_ocelli_present), 1);
37 std::uint8_t median_ocellus_present{0};
38 ctx.
read8(
reinterpret_cast<std::byte*
>(&median_ocellus_present), 1);
44 std::uint8_t model_filename_length{0};
45 ctx.
read8(
reinterpret_cast<std::byte*
>(&model_filename_length), 1);
46 std::string model_filename(model_filename_length,
'\0');
47 ctx.
read8(
reinterpret_cast<std::byte*
>(model_filename.data()), model_filename_length);
60 std::unique_ptr<ant_ocelli_gene> gene = std::make_unique<ant_ocelli_gene>();
void load_ant_gene(ant_gene< T > &gene, resource_manager &resource_manager, deserialize_context &ctx, void(*load_phene)(T &, ::resource_manager &, deserialize_context &))
Loads an ant gene.
static std::unique_ptr< T > load(::resource_manager &resource_manager, deserialize_context &ctx)
Loads a resource.
Manages the loading, caching, and saving of resources.
std::shared_ptr< T > load(const std::filesystem::path &path)
Loads and caches a resource.
float lateral_ocelli_width
Lateral ocelli width, in mesosomal lengths.
float lateral_ocelli_height
Lateral ocelli height, in mesosomal lengths.
float median_ocellus_height
Median ocellus height, in mesosomal lengths.
bool lateral_ocelli_present
Lateral ocelli present.
bool median_ocellus_present
Median ocellus present.
float median_ocellus_width
Median ocellus width, in mesosomal lengths.
std::shared_ptr< render::model > model
3D model of the ocelli, if present.
Provides access to a deserialization state.
std::size_t read32(std::byte *data, std::size_t count) noexcept(false)
Reads 32-bit (double word) data.
virtual std::size_t read8(std::byte *data, std::size_t count) noexcept(false)=0
Reads 8-bit (byte) data.