class
FPcgExecutor
Runs a graph: nodes in dependency order, each reading its input point sets and producing one. Same graph, same context, same result — bit for bit on one machine, and every random choice comes from integer hashing, so across machines too.
- Module
- PCG
- Header
#include "PCG/PcgExecutor.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr int32_t | kMaxSubgraphDepth | Subgraphs nest at most this deep; deeper is reported, not recursed. Default 8. |
Public functions
| Returns | Name | Description |
|---|---|---|
bool | Execute | |
bool | ExecutePartitioned | |
void | PartitionCells | |
void | MergeResults | |
uint64_t | HashResult | |
uint64_t | HashSplines | |
float | Noise | Deterministic 2D value noise in [0, 1] (fBm over octaves). |
uint64_t | HashPoints | FNV-1a over the result's points: two runs agree exactly when it does. |
bool | GetValue | A named value of a point: the fixed fields under "density", "scale", "yaw", "height", "x", "z", "slope" (degrees, read-only) and "seed" (read-only), else the attribute of that name. |
bool | SetValue | Writes a fixed field or the attribute (allocating its slot; false when all kPcgMaxAttributes slots are taken). |
Function details
Execute
C++
static bool Execute(const FPcgGraph& graph, const FPcgContext& context, FPcgResult& outResult, std::string* error = nullptr)ExecutePartitioned
C++
static bool ExecutePartitioned(const FPcgGraph& graph, const FPcgContext& context, float cellSize, bool parallel, FPcgResult& outResult, std::string* error = nullptr, std::vector<FPcgCellResult>* outCells = nullptr)PartitionCells
C++
static void PartitionCells(const FPcgContext& context, float cellSize, std::vector<FPcgCellResult>& outCells)MergeResults
C++
static void MergeResults(const std::vector<const FPcgResult*>& parts, FPcgResult& outResult)HashResult
C++
static uint64_t HashResult(const FPcgResult& result)HashSplines
C++
static uint64_t HashSplines(const std::vector<FPcgSpline>& splines)Noise
C++
static float Noise(float x, float z, uint32_t seed, int32_t octaves)Deterministic 2D value noise in [0, 1] (fBm over octaves).
HashPoints
C++
static uint64_t HashPoints(const std::vector<FPcgPoint>& points)FNV-1a over the result's points: two runs agree exactly when it does.
GetValue
C++
static bool GetValue(const FPcgResult& result, const FPcgPoint& point, const std::string& name, float& out)A named value of a point: the fixed fields under "density", "scale", "yaw", "height", "x", "z", "slope" (degrees, read-only) and "seed" (read-only), else the attribute of that name. False when unset.
SetValue
C++
static bool SetValue(FPcgResult& result, FPcgPoint& point, const std::string& name, float value)Writes a fixed field or the attribute (allocating its slot; false when all kPcgMaxAttributes slots are taken).
Generated from PCG/PcgExecutor.h via pcg.json · Oct 26, 2026Version 1.0.0