Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
lab_box.h File Reference
#include <cstddef>
#include <cstdint>
#include <expected>
#include <optional>
#include <span>
#include <string>
#include <string_view>
#include <vector>
#include "common/lab_box.hlsli"
#include "sim/command.h"
#include "sim/multires_nest.h"
#include "sim/reaction_table.h"
Include dependency graph for lab_box.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bicameral::sim::LabCellPosition
struct  bicameral::sim::LabMaterial
struct  bicameral::sim::LabMismatch
struct  bicameral::sim::LabRecording

Namespaces

namespace  bicameral
namespace  bicameral::sim

Functions

Command bicameral::sim::MakeLabFillCommand (uint64_t targetTick, uint32_t sequence, LabCellPosition cell, std::span< const SpeciesAmount > contents, uint32_t temperatureMilliKelvin)
Command bicameral::sim::MakeLabTemperatureCommand (uint64_t targetTick, uint32_t sequence, LabCellPosition cell, uint32_t temperatureMilliKelvin)
lab::LabCommand bicameral::sim::ToLabCommand (const Command &command)
std::vector< LabMaterial > bicameral::sim::MakeLabMaterials (const BakedReactionTable &table)
MultiresCapacity bicameral::sim::LabBoxCapacity (const BakedReactionTable &table)
MultiresNest bicameral::sim::MakeLabBoxNest (const BakedReactionTable &table)
RxCell bicameral::sim::LabBoxCell (const MultiresNest &nest, uint32_t index)
uint32_t bicameral::sim::ApplyLabCommands (MultiresNest &nest, const BakedReactionTable &table, std::span< const Command > commands)
void bicameral::sim::StepLabBox (MultiresNest &nest, const BakedReactionTable &table, uint64_t tick, std::span< const Command > commands)
std::optional< LabMismatch > bicameral::sim::FindLabMismatch (const MultiresNest &cpu, const MultiresNest &gpu, uint64_t tick)
std::vector< std::byte > bicameral::sim::SerializeLabRecording (const LabRecording &recording)
std::expected< LabRecording, std::string > bicameral::sim::ParseLabRecording (std::span< const std::byte > bytes)

Variables

constexpr uint32_t bicameral::sim::LAB_BOX_SLOT = 0
constexpr uint32_t bicameral::sim::LAB_BOX_EDGE = multires::MR_BLOCK_EDGE
constexpr uint32_t bicameral::sim::LAB_MAX_COMMANDS_PER_TICK = 64
constexpr uint64_t bicameral::sim::LAB_WORLD_SEED = 20261009
constexpr int32_t bicameral::sim::LAB_INITIAL_TEMPERATURE_MILLIKELVIN = 300000
constexpr MultiresStepOptions bicameral::sim::LAB_STEP_OPTIONS = {.conduction = true}