16#include "common/reaction.hlsli"
42 const size_t wanted =
static_cast<size_t>(cell.
speciesCount) + 1;
43 if (cell.
species.size() < wanted) {
52 return {.energy = energy, .speciesCount = 0, .species = {}, .amounts = {}};
56 return {.amounts = std::vector<uint64_t>(cell.
speciesCount, 0), .heat = 0};
62 return {.energy = energy, .speciesCount = 0, .species = {}, .amounts = {}};
68 wide.
species.assign(cell.species, cell.species + cell.speciesCount);
69 wide.
amounts.assign(cell.amounts, cell.amounts + cell.speciesCount);
82 RxCell narrow = RxMakeEmptyCell(cell.
energy);
85 narrow.species[i] = cell.
species[i];
86 narrow.amounts[i] = cell.
amounts[i];
RxWideCell RxMakeEmptyWideCell(int64_t energy)
bool RxFitsInline(const RxWideCell &cell)
RxWideCell RxWidenCell(const RxCell &cell)
RxWideCell RxCellWithRoom(RxWideCell cell)
bool RxSameCell(const RxWideCell &a, const RxWideCell &b)
RxWideCell RxEmptyCellLike(const RxWideCell &, int64_t energy)
RxCell RxNarrowCell(const RxWideCell &cell)
RxWideUsage RxEmptyUsage(const RxWideCell &cell)
RxWaitStepOf< RxWideCell > RxWideWaitStep
bool RxHasRoomForSpecies(const RxWideCell &)
std::vector< uint32_t > species
std::vector< uint64_t > amounts
std::vector< uint64_t > amounts