class
FPcgGraph
A .pcg document: nodes, the wires between them and the graph's own seed. Text MDF, so a graph diffs and merges like every other asset.
- Module
- PCG
- Header
#include "PCG/PcgGraph.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
int32_t | seed | Default 1. |
Public functions
| Returns | Name | Description |
|---|---|---|
const std::vector<FPcgNode>& | Nodes | |
const std::vector<FPcgEdge>& | Edges | |
std::string | AddNode | |
FPcgNode* | FindNode | |
const FPcgNode* | FindNode | |
bool | RemoveNode | |
bool | Connect | A pin takes one wire, except a Merge input; a second wire into a single pin replaces the first. |
bool | Disconnect | |
bool | SetParam | |
std::string | SerializeToString | |
bool | LoadFromString | |
bool | LoadFromFile | |
bool | SaveToFile | |
FPcgGraph | MakeDefault | A starter graph: landscape surface, noise density, filters, transform and a foliage spawner. |
Function details
Nodes
C++
const std::vector<FPcgNode>& Nodes() constEdges
C++
const std::vector<FPcgEdge>& Edges() constAddNode
C++
std::string AddNode(const std::string& type, float x, float y)FindNode
C++
FPcgNode* FindNode(const std::string& id)FindNode
C++
const FPcgNode* FindNode(const std::string& id) constRemoveNode
C++
bool RemoveNode(const std::string& id)Connect
C++
bool Connect(const std::string& fromNode, const std::string& toNode, const std::string& toPin)A pin takes one wire, except a Merge input; a second wire into a single pin replaces the first. Refuses a wire that would close a cycle.
Disconnect
C++
bool Disconnect(const std::string& fromNode, const std::string& toNode, const std::string& toPin)SetParam
C++
bool SetParam(const std::string& nodeId, const std::string& key, const std::string& value)SerializeToString
C++
std::string SerializeToString() constLoadFromString
C++
bool LoadFromString(const std::string& text, std::string* error = nullptr)LoadFromFile
C++
bool LoadFromFile(const std::string& path, std::string* error = nullptr)SaveToFile
C++
bool SaveToFile(const std::string& path) constMakeDefault
C++
static FPcgGraph MakeDefault()A starter graph: landscape surface, noise density, filters, transform and a foliage spawner.
Generated from PCG/PcgGraph.h via pcg.json · Oct 26, 2026Version 1.0.0