载入中...
搜索中...
未找到
TerrainStampScript.cpp
浏览该文件的文档.
43 Diagnostic::error(DiagnosticCode::InvalidArgument, "terrain operation requires non-null rasters and settings"));
51 return eve::script::projectResult(vm, progress->updateRule(name, total, done, localTotal, localDone),
54 spawnProgress.addFunc("updateRuleFraction", [vm = table.getHandle()](PcgSpawnProgress* progress, float value) {
62 spawnProgress.addFunc("clear", [](PcgSpawnProgress* progress) { return static_cast<int>(progress->clear()); });
63 spawnProgress.addFunc("getProgress", [](const PcgSpawnProgress* progress) { return float(progress->progress()); });
64 spawnProgress.addFunc("getTitle", [](const PcgSpawnProgress* progress) { return progress->title(); });
65 spawnProgress.addFunc("getSubtitle", [](const PcgSpawnProgress* progress) { return progress->subtitle(); });
66 spawnProgress.addFunc("getStatus", [](const PcgSpawnProgress* progress) { return static_cast<int>(progress->status()); });
68 auto runtimeStamper = table.addClass("PcgRuntimeStamper", ssq::Class::Ctor<PcgRuntimeStamper()>());
82 runtimeStamper.addFunc("reportMissingStamp", [vm = table.getHandle()](PcgRuntimeStamper* stamper) {
85 runtimeStamper.addFunc("execute", [vm = table.getHandle()](PcgRuntimeStamper* stamper, Heightmap* target,
88 auto result = target ? stamper->execute(*target, originX, originZ, spacingX, spacingZ) : missingRaster();
114 auto biomeController = table.addClass("PcgBiomeController", ssq::Class::Ctor<PcgBiomeController()>());
124 biomeController.addFunc("fitToAllTerrains", [vm=table.getHandle()](PcgBiomeController* controller,
128 biomeController.addFunc("tierAt", [](const PcgBiomeController* controller,float x,float y,float z) {
175 treeManager.addFunc("getCount", [](const PcgTreeManager* manager){return manager->getCount();});
176 auto terrainWatcher = table.addClass("PcgTerrainWatcher", ssq::Class::Ctor<PcgTerrainWatcher()>());
194 terrainWatcher.addFunc("getChangeTerrainId", [vm=table.getHandle()](const PcgTerrainWatcher* watcher,
199 terrainWatcher.addFunc("getChangeType", [vm=table.getHandle()](const PcgTerrainWatcher* watcher,
205 splatmap.addFunc("initialize", [vm = table.getHandle()](TerrainSplatmap* target, int width, int height,
210 splatmap.addFunc("sample", [vm = table.getHandle()](const TerrainSplatmap* target, int layer, int x, int y) {
214 splatmap.addFunc("copyLayer", [vm = table.getHandle()](const TerrainSplatmap* target, int layer,
219 splatmap.addFunc("paint", [vm = table.getHandle()](TerrainSplatmap* target, const Heightmap* paint, int layer) {
224 splatmap.addFunc("getHeight", [](const TerrainSplatmap* target) { return target->getHeight(); });
225 splatmap.addFunc("getLayerCount", [](const TerrainSplatmap* target) { return target->getLayerCount(); });
229 table.addClass("TerrainTextureAlignSettings", ssq::Class::Ctor<TerrainTextureAlignSettings()>());
249 auto heightBlend = table.addClass("GtsHeightBlendSet", ssq::Class::Ctor<GtsHeightBlendSet()>());
253 auto result = height ? target->addLayer(*height, contrast, brightness, increase) : missingRaster();
256 heightBlend.addFunc("getLayerCount", [](const GtsHeightBlendSet* target) { return target->getLayerCount(); });
260 auto result = output && input && heights ? applyGtsHeightBlend(*output, *input, *heights, blendFactor)
265 auto multiSplat = table.addClass("TerrainMultiSplatWorkspace", ssq::Class::Ctor<TerrainMultiSplatWorkspace()>());
270 auto result = splat ? workspace->addTile(name, *splat, originX, originZ, width, depth, worldMap)
281 multiSplat.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiSplatWorkspace* workspace,
309 table.addClass("TerrainObjectInstanceSettings", ssq::Class::Ctor<TerrainObjectInstanceSettings()>());
330 objectInstance.addVar("scaleRandomPercentage", &TerrainObjectInstanceSettings::scaleRandomPercentage);
331 objectInstance.addVar("scaleRandomPercentageX", &TerrainObjectInstanceSettings::scaleRandomPercentageX);
332 objectInstance.addVar("scaleRandomPercentageY", &TerrainObjectInstanceSettings::scaleRandomPercentageY);
333 objectInstance.addVar("scaleRandomPercentageZ", &TerrainObjectInstanceSettings::scaleRandomPercentageZ);
341 objectInstance.addVar("alignForwardToSlope", &TerrainObjectInstanceSettings::alignForwardToSlope);
350 auto object = table.addClass("TerrainObjectPlacementSettings", ssq::Class::Ctor<TerrainObjectPlacementSettings()>());
363 object.addVar("minimumInstanceFitness", &TerrainObjectPlacementSettings::minimumInstanceFitness);
375 object.addFunc("addInstance", [vm = table.getHandle()](TerrainObjectPlacementSettings* settings,
380 object.addFunc("exportPoints", [vm = table.getHandle()](const TerrainObjectPlacementSettings* settings,
383 auto result = output && fitness && heights ? exportTerrainObjectPoints(*output, *fitness, *heights, *settings)
387 object.addFunc("removePoints", [vm = table.getHandle()](const TerrainObjectPlacementSettings* settings,
397 table.addClass("TerrainMultiObjectWorkspace", ssq::Class::Ctor<TerrainMultiObjectWorkspace()>());
420 multiObject.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiObjectWorkspace* workspace,
448 table.addClass("TerrainWorldCreationSettings", ssq::Class::Ctor<TerrainWorldCreationSettings()>());
455 worldSettings.addVar("heightmapResolution", &TerrainWorldCreationSettings::heightmapResolution);
456 worldSettings.addVar("controlTextureResolution", &TerrainWorldCreationSettings::controlTextureResolution);
462 worldSettings.addVar("defaultDetailDensity", &TerrainWorldCreationSettings::defaultDetailDensity);
482 probeSettings.addVar("reflectionResolution", &TerrainProbePlacementSettings::reflectionResolution);
483 probeSettings.addVar("reflectionClipDistance", &TerrainProbePlacementSettings::reflectionClipDistance);
484 probeSettings.addVar("reflectionShadowDistance", &TerrainProbePlacementSettings::reflectionShadowDistance);
550 table.addFunc("tickTerrainProbeBatches", [vm = table.getHandle()](int faces, int filters, int samples) {
571 spawnPlan.addFunc("addSplat", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
578 spawnPlan.addFunc("addDetail", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
589 spawnPlan.addFunc("addTrees", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
599 spawnPlan.addFunc("addObjects", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
609 spawnPlan.addFunc("addProbes", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
642 spawnPlan.addFunc("getRuleCount", [](const TerrainSpawnPlan* self) { return self->getRuleCount(); });
652 auto biomePreset = table.addClass("TerrainBiomePreset", ssq::Class::Ctor<TerrainBiomePreset()>());
671 biomePreset.addFunc("getSpawnerCount", [](const TerrainBiomePreset* self) { return self->getSpawnerCount(); });
672 biomePreset.addFunc("getAutoAssignResources", [vm = table.getHandle()](const TerrainBiomePreset* self,
686 auto world = table.addClass("TerrainWorldWorkspace", ssq::Class::Ctor<TerrainWorldWorkspace()>());
692 world.addFunc("stamp", [vm = table.getHandle()](TerrainWorldWorkspace* self, const Heightmap* stamp,
695 auto result = stamp && settings && local && global ? self->stamp(*stamp, *settings, *local, *global)
699 world.addFunc("paintSplat", [vm = table.getHandle()](TerrainWorldWorkspace* self, const Heightmap* paint,
701 auto result = paint && operation ? self->paintSplat(*paint, layer, *operation) : missingRaster();
745 world.addFunc("stepSpawn", [vm = table.getHandle()](TerrainWorldWorkspace* self, int maxRules) {
753 world.addFunc("getSpawnStatus", [](const TerrainWorldWorkspace* self) { return int(self->getSpawnStatus()); });
756 world.addFunc("applyDetail", [vm = table.getHandle()](TerrainWorldWorkspace* self, const Heightmap* fitness,
766 world.addFunc("applyTrees", [vm = table.getHandle()](TerrainWorldWorkspace* self, const Heightmap* fitness,
799 auto worldClear = table.addClass("TerrainWorldClearSettings", ssq::Class::Ctor<TerrainWorldClearSettings()>());
811 return eve::script::projectResult(vm, self->setHeightWorldUnits(heightWorldUnits, worldHeightSpan),
819 world.addFunc("copyHeightmap", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index,
824 world.addFunc("copySplatmap", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index,
829 world.addFunc("copyDetail", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index,
834 world.addFunc("copyTrees", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index,
839 world.addFunc("copyObjects", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index,
844 world.addFunc("copyProbes", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index,
849 world.addFunc("getTileName", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index) {
853 world.addFunc("getTileOriginX", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index) {
857 world.addFunc("getTileOriginZ", [vm = table.getHandle()](const TerrainWorldWorkspace* self, int index) {
867 world.addFunc("getTileCount", [](const TerrainWorldWorkspace* self) { return self->getTileCount(); });
872 world.addFunc("getOperationCount", [](const TerrainWorldWorkspace* self) { return self->getOperationCount(); });
873 world.addFunc("getAppliedCount", [](const TerrainWorldWorkspace* self) { return self->getAppliedCount(); });
875 auto tree = table.addClass("TerrainTreePlacementSettings", ssq::Class::Ctor<TerrainTreePlacementSettings()>());
914 tree.addFunc("getScaleMode", [](const TerrainTreePlacementSettings* s) { return int(s->scaleMode); });
918 tree.addFunc("getYOffsetMode", [](const TerrainTreePlacementSettings* s) { return int(s->yOffsetMode); });
936 auto rescale = table.addClass("TerrainTreeRescaleSettings", ssq::Class::Ctor<TerrainTreeRescaleSettings()>());
951 rescale.addFunc("getScaleMode", [](const TerrainTreeRescaleSettings* s) { return int(s->scaleMode); });
955 auto result = output && input && settings ? rescaleTerrainTreePoints(*output, *input, *settings)
961 table.addClass("TerrainDetailPlacementSettings", ssq::Class::Ctor<TerrainDetailPlacementSettings()>());
989 [vm = table.getHandle()](PointSet* output, const TerrainDetailLayer* layer, const Heightmap* heights,
997 auto detailSettings = table.addClass("TerrainDetailSettings", ssq::Class::Ctor<TerrainDetailSettings()>());
1005 detail.addFunc("reset", [vm = table.getHandle()](TerrainDetailLayer* s, int width, int height, int count) {
1006 return eve::script::projectResult(vm, s->reset(width, height, count), [](int n) { return eve::Value(n); });
1011 detail.addFunc("apply", [vm = table.getHandle()](TerrainDetailLayer* s, const Heightmap* fitness,
1022 auto session = table.addClass("TerrainGenerationSession", ssq::Class::Ctor<TerrainGenerationSession()>());
1023 session.addFunc("smooth", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
1028 session.addFunc("ridges", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
1033 session.addFunc("terrace", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
1038 session.addFunc("contrast", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
1043 session.addFunc("power", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask, float power) {
1047 session.addFunc("heightCurve", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
1049 auto result = mask && curve ? s->heightCurve(*mask, *curve, minimum, maximum) : missingRaster();
1055 auto result = local && global && settings ? s->heightMix(*local, *global, *settings) : missingRaster();
1058 session.addFunc("resetSimulation", [vm = table.getHandle()](TerrainGenerationSession* s, float depth) {
1059 return eve::script::projectResult(vm, s->resetSimulation(depth), [](int n) { return eve::Value(n); });
1062 [vm = table.getHandle()](TerrainGenerationSession* s, const TerrainThermalSettings* settings) {
1067 "hydraulic", [vm = table.getHandle()](TerrainGenerationSession* s, const TerrainWaterSettings* water,
1071 water && sediment && thermal ? s->hydraulic(*water, *sediment, *thermal, iterations) : missingRaster();
1074 session.addFunc("copySediment", [vm = table.getHandle()](const TerrainGenerationSession* s, Heightmap* target) {
1079 "exportWater", [vm = table.getHandle()](const TerrainGenerationSession* s, Heightmap* target, int channel) {
1080 auto result = target ? s->exportWater(*target, static_cast<TerrainWaterChannel>(channel)) : missingRaster();
1083 session.addFunc("getOperationCount", [](const TerrainGenerationSession* s) { return s->getOperationCount(); });
1084 session.addFunc("getAppliedCount", [](const TerrainGenerationSession* s) { return s->getAppliedCount(); });
1085 session.addFunc("getReplayStatus", [](const TerrainGenerationSession* s) { return int(s->getReplayStatus()); });
1088 session.addFunc("getAccess", [](const TerrainGenerationSession* s) { return int(s->getAccess()); });
1097 session.addFunc("setAccess", [vm = table.getHandle()](TerrainGenerationSession* s, int access) {
1098 return eve::script::projectResult(vm, s->setAccess(static_cast<TerrainSessionAccess>(access)));
1100 session.addFunc("operationEnabled", [vm = table.getHandle()](const TerrainGenerationSession* s, int index) {
1101 return eve::script::projectResult(vm, s->operationEnabled(index), [](bool value) { return eve::Value(value); });
1103 session.addFunc("reset", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* baseline) {
1107 session.addFunc("copyTerrain", [vm = table.getHandle()](const TerrainGenerationSession* s, Heightmap* target) {
1129 session.addFunc("stepReplay", [vm = table.getHandle()](TerrainGenerationSession* s, int maxOperations) {
1137 session.addFunc("stamp", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* stamp,
1149 auto settings = table.addClass("TerrainStampSettings", ssq::Class::Ctor<TerrainStampSettings()>());
1150 // The pinned VM uses float SQFloat; bind explicit float adapters for double world coordinates.
1151 settings.addFunc("setGrid", [](TerrainStampSettings* s, float x, float z, float dx, float dz) {
1165 settings.addFunc("setRotation", [](TerrainStampSettings* s, float radians) { s->rotation = radians; });
1171 table.addClass("TerrainHeightStitchSettings", ssq::Class::Ctor<TerrainHeightStitchSettings()>());
1174 auto multi = table.addClass("TerrainMultiTileWorkspace", ssq::Class::Ctor<TerrainMultiTileWorkspace()>());
1179 auto result = heightmap ? workspace->addTile(name, *heightmap, originX, originZ, width, depth, worldMap)
1224 multi.addFunc("getTileCount", [](const TerrainMultiTileWorkspace* workspace) { return workspace->getTileCount(); });
1242 table.addClass("TerrainMultiDetailWorkspace", ssq::Class::Ctor<TerrainMultiDetailWorkspace()>());
1243 multiDetail.addFunc("addTile", [vm = table.getHandle()](TerrainMultiDetailWorkspace* workspace,
1247 auto result = layer ? workspace->addTile(name, *layer, originX, originZ, width, depth, worldMap)
1252 "apply", [vm = table.getHandle()](TerrainMultiDetailWorkspace* workspace, const Heightmap* fitness,
1264 multiDetail.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiDetailWorkspace* workspace,
1278 multiDetail.addFunc("getLastChangedSamples", [](const TerrainMultiDetailWorkspace* workspace) {
1291 auto multiTree = table.addClass("TerrainMultiTreeWorkspace", ssq::Class::Ctor<TerrainMultiTreeWorkspace()>());
1297 auto result = trees && heights ? workspace->addTile(name, *trees, *heights, originX, originZ, width, depth,
1313 multiTree.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiTreeWorkspace* workspace,
1339 auto distance = table.addClass("TerrainDistanceMaskSettings", ssq::Class::Ctor<TerrainDistanceMaskSettings()>());
1348 auto smooth = table.addClass("TerrainSmoothSettings", ssq::Class::Ctor<TerrainSmoothSettings()>());
1352 auto ridge = table.addClass("TerrainRidgeSettings", ssq::Class::Ctor<TerrainRidgeSettings()>());
1359 auto terrace = table.addClass("TerrainTerraceSettings", ssq::Class::Ctor<TerrainTerraceSettings()>());
1364 auto mix = table.addClass("TerrainHeightMixSettings", ssq::Class::Ctor<TerrainHeightMixSettings()>());
1372 auto thermal = table.addClass("TerrainThermalSettings", ssq::Class::Ctor<TerrainThermalSettings()>());
1380 auto waterSettings = table.addClass("TerrainWaterSettings", ssq::Class::Ctor<TerrainWaterSettings()>());
1390 auto waterFlowSettings = table.addClass("TerrainWaterFlowMapSettings", ssq::Class::Ctor<TerrainWaterFlowMapSettings()>());
1394 table.addFunc("generateTerrainWaterFlowMap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1405 auto result = target && source ? generateTerrainVelocityFlowMap(*target, *source, iterations) : missingRaster();
1424 table.addFunc("filterTerrainHeightmapNeighborhood", [vm = table.getHandle()](Heightmap* target,
1433 table.addFunc("smoothTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1435 auto result = target && source ? smoothTerrainHeightmap(*target, *source, iterations) : missingRaster();
1440 auto result = target && source ? smoothTerrainHeightmapRadius(*target, *source, radius) : missingRaster();
1443 table.addFunc("convolveTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1445 auto result = target && source && kernel ? convolveTerrainHeightmap(*target, *source, *kernel) : missingRaster();
1450 auto result = target && source ? generateTerrainHeightmapSlope(*target, *source) : missingRaster();
1453 table.addFunc("quantizeTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1455 auto result = target && source ? quantizeTerrainHeightmap(*target, *source, divisor) : missingRaster();
1459 [vm = table.getHandle()](Heightmap* target, const Heightmap* source, float operand, int operation,
1480 table.addFunc("lerpTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1482 auto result = target && source && values && mask ? lerpTerrainHeightmap(*target, *source, *values, *mask)
1486 table.addFunc("transformTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1489 ? transformTerrainHeightmap(*target, *source, static_cast<TerrainHeightmapTransform>(transform),
1494 table.addFunc("copyTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1504 auto result = target && source ? copyTerrainHeightmapClamped(*target, *source, minValue, maxValue)
1508 table.addFunc("flipTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source) {
1512 table.addFunc("measureTerrainHeightmap", [vm = table.getHandle()](const Heightmap* source, int measure) {
1516 return eve::script::projectResult(vm, std::move(result), [](double value) { return eve::Value(value); });
1535 table.addFunc("fillTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, float value) {
1546 auto result = target && values ? setTerrainHeightmapRow(*target, rowX, *values) : missingRaster();
1549 table.addFunc("setTerrainHeightmapColumn", [vm = table.getHandle()](Heightmap* target, int columnZ,
1551 auto result = target && values ? setTerrainHeightmapColumn(*target, columnZ, *values) : missingRaster();
1558 table.addFunc("sampleTerrainHeightmapSafe", [vm = table.getHandle()](const Heightmap* source, int x, int z) {
1562 return eve::script::projectResult(vm, std::move(result), [](float value) { return eve::Value(value); });
1576 terraceRemoval.addVar("slopeTerraceThreshold", &TerrainTerraceRemovalSettings::slopeTerraceThreshold);
1578 terraceRemoval.addVar("verticalGradientThreshold", &TerrainTerraceRemovalSettings::verticalGradientThreshold);
1579 terraceRemoval.addVar("minimumTerraceThreshold", &TerrainTerraceRemovalSettings::minimumTerraceThreshold);
1580 terraceRemoval.addVar("maximumTerraceThreshold", &TerrainTerraceRemovalSettings::maximumTerraceThreshold);
1585 table.addFunc("analyzeTerrainTerraces", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1587 auto result = target && source && settings ? analyzeTerrainTerraces(*target, *source, *settings) : missingRaster();
1590 table.addFunc("removeTerrainTerraces", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1598 auto sedimentSettings = table.addClass("TerrainSedimentSettings", ssq::Class::Ctor<TerrainSedimentSettings()>());
1605 "exportChannel", [vm = table.getHandle()](const TerrainWaterField* field, Heightmap* target, int channel) {
1606 auto result = field && target ? field->exportChannel(*target, static_cast<TerrainWaterChannel>(channel))
1619 water.addFunc("getWidth", [](const TerrainWaterField* field) { return field ? field->getWidth() : 0; });
1620 water.addFunc("getHeight", [](const TerrainWaterField* field) { return field ? field->getHeight() : 0; });
1621 water.addFunc("reset", [vm = table.getHandle()](TerrainWaterField* field, int width, int height, float depth) {
1623 return eve::script::projectResult(vm, std::move(result), [](int count) { return eve::Value(count); });
1625 water.addFunc("advance", [vm = table.getHandle()](TerrainWaterField* field, const Heightmap* terrain,
1627 auto result = field && terrain && settings ? field->advance(*terrain, *settings) : missingRaster();
1628 return eve::script::projectResult(vm, std::move(result), [](int count) { return eve::Value(count); });
1630 water.addFunc("sample", [vm = table.getHandle()](const TerrainWaterField* field, int x, int z) {
1646 "ProcgenHeightmap", std::function<Heightmap*()>([]() -> Heightmap* { return nullptr; }), true);
1648 auto imageMask = table.addClass("TerrainImageMaskSettings", ssq::Class::Ctor<TerrainImageMaskSettings()>());
1659 auto collisionMask = table.addClass("TerrainCollisionMaskStack", ssq::Class::Ctor<TerrainCollisionMaskStack()>());
1663 auto result = mask ? self->addLayer(*mask, static_cast<TerrainCollisionMaskType>(type), active, invert)
1668 collisionMask.addFunc("getLayerCount", [](const TerrainCollisionMaskStack* self) { return self->getLayerCount(); });
1677 auto polygonMask = table.addClass("TerrainPolygonMask", ssq::Class::Ctor<TerrainPolygonMask()>());
1678 polygonMask.addFunc("addNode", [vm = table.getHandle()](TerrainPolygonMask* self, float x, float z, float radius,
1684 polygonMask.addFunc("getNodeCount", [](const TerrainPolygonMask* self) { return self->getNodeCount(); });
1685 polygonMask.addFunc("rasterize", [vm = table.getHandle()](const TerrainPolygonMask* self, Heightmap* target,
1697 auto bakedMasks = table.addClass("TerrainBakedMaskCache", ssq::Class::Ctor<TerrainBakedMaskCache()>());
1698 bakedMasks.addFunc("store", [vm = table.getHandle()](TerrainBakedMaskCache* self, const std::string& terrainId,
1705 return eve::script::projectResult(vm, self->markDirty(maskGuid), [](int n) { return eve::Value(n); });
1714 bakedMasks.addFunc("getEntryCount", [](const TerrainBakedMaskCache* self) { return self->getEntryCount(); });
1749 auto noiseMask = table.addClass("TerrainNoiseMaskSettings", ssq::Class::Ctor<TerrainNoiseMaskSettings()>());
1779 auto concavity = table.addClass("TerrainConcavitySettings", ssq::Class::Ctor<TerrainConcavitySettings()>());
1793 auto curvature = table.addClass("TerrainCurvatureSettings", ssq::Class::Ctor<TerrainCurvatureSettings()>());
1810 heightmap.addFunc("growShrinkMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1813 target && source && curve ? growShrinkTerrainMask(*target, *source, *curve, distance) : missingRaster();
1818 "applyStrength", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, const Heightmap* curve,
1827 [vm = table.getHandle()](Heightmap* target, const Heightmap* oldHeights, const Heightmap* erosion,
1838 auto sampleGrid = table.addClass("TerrainSampleGrid", ssq::Class::Ctor<TerrainSampleGrid()>());
1849 auto brushBlend = table.addClass("TerrainBrushBlendSettings", ssq::Class::Ctor<TerrainBrushBlendSettings()>());
1851 "configureWorld", [vm = table.getHandle()](TerrainBrushBlendSettings* target, const TerrainStampSettings* world,
1853 auto result = target && world && grid ? configureTerrainBrushWorld(*target, *world, width, height, *grid)
1871 heightmap.addFunc("blendBrush", [vm = table.getHandle()](Heightmap* target, const Heightmap* oldHeights,
1881 "applySediment", [vm = table.getHandle()](Heightmap* heights, Heightmap* sediment, const Heightmap* velocityX,
1889 heightmap.addFunc("applyThermal", [vm = table.getHandle()](Heightmap* heights, Heightmap* sediment,
1892 heights && sediment && settings ? applyTerrainThermal(*heights, *sediment, *settings) : missingRaster();
1896 "applyHeightCurve", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask, const Heightmap* curve,
1898 auto result = target && mask && curve ? applyTerrainHeightCurve(*target, *mask, *curve, minimum, maximum)
1902 heightmap.addFunc("applyHeightMix", [vm = table.getHandle()](Heightmap* target, const Heightmap* local,
1905 auto result = target && local && global && settings ? applyTerrainHeightMix(*target, *local, *global, *settings)
1909 heightmap.addFunc("applySmooth", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1911 auto result = target && mask && settings ? applyTerrainSmooth(*target, *mask, *settings) : missingRaster();
1914 heightmap.addFunc("applyRidges", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1916 auto result = target && mask && settings ? applyTerrainRidges(*target, *mask, *settings) : missingRaster();
1919 heightmap.addFunc("applyTerrace", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1921 auto result = target && mask && settings ? applyTerrainTerrace(*target, *mask, *settings) : missingRaster();
1924 heightmap.addFunc("applyPower", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask, float power) {
1938 return eve::script::projectResult(vm, std::move(result), [](bool value) { return eve::Value(value); });
1944 return eve::script::projectResult(vm, std::move(result), [](bool value) { return eve::Value(value); });
1946 heightmap.addFunc("blendMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, int mode,
1951 return eve::script::projectResult(vm, std::move(result), [](int changed) { return eve::Value(changed); });
1953 heightmap.addFunc("applyStamp", [vm = table.getHandle()](Heightmap* target, const Heightmap* stamp,
1957 return eve::script::projectResult(vm, missingRaster(), [](int changed) { return eve::Value(changed); });
1960 return eve::script::projectResult(vm, applyTerrainStamp(*target, *stamp, copy, *local, *global),
1964 "transformMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, const Heightmap* curve) {
1965 auto result = target && source && curve ? transformTerrainMask(*target, *source, *curve) : missingRaster();
1968 heightmap.addFunc("smoothMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* input,
1970 auto result = target && input ? smoothTerrainMask(*target, *input, verticality, blurRadius) : missingRaster();
1977 legacyHydraulic.addVar("sedimentDissolveRate", &TerrainLegacyHydraulicSettings::sedimentDissolveRate);
1991 distributedErosion.addVar("minimumThreshold", &TerrainLegacyDistributedErosionSettings::minimumThreshold);
1992 distributedErosion.addVar("maximumThreshold", &TerrainLegacyDistributedErosionSettings::maximumThreshold);
2017 "rangeMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, float minimum, float maximum,
2024 heightmap.addFunc("applyContrast", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
2026 auto result = target && mask ? applyTerrainContrast(*target, *mask, strength, size) : missingRaster();
2029 heightmap.addFunc("deriveSlope", [vm = table.getHandle()](Heightmap* target, const Heightmap* heights, float dx,
2031 auto result = target && heights ? deriveTerrainSlope(*target, *heights, dx, dz, scale) : missingRaster();
2035 "distanceMask", [vm = table.getHandle()](Heightmap* target, const TerrainDistanceMaskSettings* settings,
2041 return eve::script::projectResult(vm, generateTerrainDistanceMask(*target, copy, *curve, *strength),
std::map< std::string, std::vector< Key >, std::less<> > channels
Definition AnimCurveLibrary.cpp:19
The single Squirrel projection for common Result, Status and Value.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Caller-owned, deterministic progress state corresponding to Pcg SpawnProgressBar. @thread Spawning th...
Definition PcgSpawnProgress.h:8
void beginScan()
Begin a candidate hierarchy scan without changing the published cache.
Definition PcgTerrainWatcher.cpp:8
@ PointSet
const EditorValue * field(const EditorValue &value, const char *name)
Definition RoadNetworkEditTarget.cpp:15
Definition EvpackPointGraphLoader.h:12
TerrainStrengthMode
StrengthTransform pass order; source pass 0 named Multiply actually replaces with the curve value.
Definition TerrainMask.h:82
Result< int > resetTerrainHeightmap(Heightmap &target)
Reset a heightmap to Pcg's empty zero-by-zero state.
Definition TerrainDerivedMap.cpp:585
void exposeHeightmap(ssq::Table &table)
Register heightmap and stamp value bindings; VM-thread only, retains no table reference.
Definition TerrainStampScript.cpp:47
Result< int > removeTerrainObjectPoints(PointSet &output, const PointSet &input, const Heightmap &fitness, const TerrainObjectPlacementSettings &s, float removalStrength)
Remove matching prototype points wherever fitness is strictly above removalStrength.
Definition TerrainObjectPlacement.cpp:216
Result< int > generateTerrainVelocityFlowMap(Heightmap &target, const Heightmap &source, int iterations)
Generate Pcg HeightMap.FlowMap's normalized four-direction velocity magnitude.
Definition TerrainWaterField.cpp:77
TerrainHeightmapNeighborhood
Pcg HeightMap neighborhood mutation modes.
Definition TerrainDerivedMap.h:36
Result< int > quantizeTerrainHeightmapTerraces(Heightmap &target, const Heightmap &source, const Heightmap &startHeights, const Heightmap &curves)
Apply Pcg's curve-driven Quantize overload using one sampled curve per raster row.
Definition TerrainDerivedMap.cpp:461
Result< int > applyTerrainTerrace(Heightmap &target, const Heightmap &mask, const TerrainTerraceSettings &settings)
Terrace scalar heights using nearest-even rounding and the shader's one-sided bevel.
Definition TerrainEffect.cpp:125
Result< int > generateTerrainHeightmapSlope(Heightmap &target, const Heightmap &source)
Generate Pcg HeightMap.SlopeMap's normalized gradient magnitude.
Definition TerrainDerivedMap.cpp:237
Result< int > generateTerrainDistanceMask(Heightmap &target, const TerrainDistanceMaskSettings &s, const Heightmap &filterCurve, const Heightmap &strengthCurve)
Generate a transformed distance mask using circle, X, Z or rounded-square coordinates.
Definition TerrainMask.cpp:351
Result< int > removeTerrainTreePoints(PointSet &output, const PointSet &input, const Heightmap &fitness, const TerrainTreePlacementSettings &s)
Remove matching tree points wherever the current fitness is strictly above the threshold.
Definition TerrainTreePlacement.cpp:174
EVENGINE_API_DOMAINS Result< int > applyTerrainLegacyHydraulic(Heightmap &heights, Heightmap &sediment, const Heightmap &hardness, const Heightmap &rain, const TerrainLegacyHydraulicSettings &settings)
Apply Pcg HeightMap.ErodeHydraulic's rain, four-way water and sediment loop atomically.
Definition TerrainLegacyHydraulic.cpp:7
Result< int > generateTerrainImageMask(Heightmap &target, const Heightmap &input, const Heightmap &red, const Heightmap &green, const Heightmap &blue, const Heightmap &alpha, const Heightmap &curve, const TerrainImageMaskSettings &s, TerrainMaskBlend mode)
Generate the reference image-mask filter from borrowed RGBA scalar planes.
Definition TerrainImageMask.cpp:20
Result< int > transformTerrainMask(Heightmap &target, const Heightmap &source, const Heightmap &curve)
Transform scalar input through a clamped bilinear one-row curve texture.
Definition TerrainMask.cpp:305
Result< int > generateTerrainRangeMask(Heightmap &target, const Heightmap &source, float minimum, float maximum, const Heightmap &filterCurve, const Heightmap &strengthCurve)
Generate height/range fitness with smoothstep followed by filter and strength curves.
Definition TerrainMask.cpp:313
Result< int > generateTerrainNoiseMask(Heightmap &target, const Heightmap &input, const Heightmap &curve, const TerrainNoiseMaskSettings &s, TerrainMaskBlend mode)
Generate a transformed Pcg-style fBm noise source, curve it, then combine it with an input mask.
Definition TerrainNoiseMask.cpp:51
PcgSpawnProgressStatus
Observable lifecycle of a Pcg spawning progress operation.
Definition PcgSpawnProgress.h:6
Result< int > setTerrainHeightmapRow(Heightmap &target, int rowX, const Heightmap &values)
Set Pcg's fixed-X row from a one-dimensional strip.
Definition TerrainDerivedMap.cpp:564
TerrainProbeOperationMode
Mutation performed by a multi-terrain probe rule.
Definition TerrainProbePlacement.h:14
Result< int > analyzeTerrainTerraces(Heightmap &target, const Heightmap &source, const TerrainTerraceRemovalSettings &s)
Classify a heightmap into Pcg's black/red/green/blue important-detail categories.
Definition TerrainTerraceRemover.cpp:22
Result< int > copyTerrainHeightmapClamped(Heightmap &target, const Heightmap &source, float minValue, float maxValue)
Copy a Pcg heightmap with inclusive output clamping and normalized resampling.
Definition TerrainDerivedMap.cpp:402
Result< int > generateTerrainCurvatureMask(Heightmap &target, const Heightmap &input, const Heightmap &heights, const Heightmap &curve, const TerrainCurvatureSettings &s, TerrainMaskBlend mode)
Radially blur heights, derive source curvature, transform its curve and combine with an input mask.
Definition TerrainMask.cpp:147
Result< int > exportTerrainProbePoints(PointSet &output, const Heightmap &fitness, const Heightmap &heights, const TerrainProbePlacementSettings &s)
Export Pcg ReflectionProbe or LightProbe placements into an owned attributed PointSet.
Definition TerrainProbePlacement.cpp:37
Result< int > applyTerrainContrast(Heightmap &target, const Heightmap &mask, float strength, float featureSize)
Apply the nine-tap Pcg contrast equation to native scalar heights.
Definition TerrainEffect.cpp:26
Result< int > applyTerrainGlobalSpawnerMask(Heightmap &target, const Heightmap &input, const Heightmap &source, const Heightmap &curve, const TerrainImageMaskSettings &settings, TerrainMaskBlend mode)
Apply a scalar GlobalSpawnerMaskStack output through Pcg's image-mask transform, curve and blend pass...
Definition TerrainImageMask.cpp:89
Result< int > rescaleTerrainTreePoints(PointSet &output, const PointSet &input, const TerrainTreeRescaleSettings &s)
Atomically refresh scale, bounds and bend metadata for one tree asset while preserving identity/trans...
Definition TerrainTreePlacement.cpp:206
Result< int > configureTerrainBrushWorld(TerrainBrushBlendSettings &target, const TerrainStampSettings &w, int contextWidth, int contextHeight, const TerrainSampleGrid &h)
Configure paint-context UV matrices from world sample centers and a rotated stamp footprint.
Definition TerrainMask.cpp:29
Result< int > applyTerrainHeightmapRasterArithmetic(Heightmap &target, const Heightmap &source, const Heightmap &operand, TerrainHeightmapArithmetic operation, bool clampResult, float minValue, float maxValue)
Apply a raster Pcg HeightMap arithmetic operation, resampling a differently sized operand.
Definition TerrainDerivedMap.cpp:312
TerrainHeightmapCurvature
Pcg HeightMap.CurvatureMap modes in source enum order.
Definition TerrainDerivedMap.h:32
Result< int > flipTerrainHeightmap(Heightmap &target, const Heightmap &source)
Transpose a Pcg HeightMap exactly as HeightMap.Flip does.
Definition TerrainDerivedMap.cpp:416
Result< int > blendTerrainMask(Heightmap &target, const Heightmap &source, TerrainMaskBlend mode, float strength, bool invert)
Blend one scalar raster into an existing mask stack, in call order.
Definition TerrainStamp.cpp:15
EVENGINE_API_DOMAINS Result< int > applyTerrainLegacyDistributedErosion(Heightmap &heights, const TerrainLegacyDistributedErosionSettings &settings)
Apply Pcg HeightMap.Erode's synchronous four-neighbor material redistribution.
Definition TerrainLegacyThermal.cpp:7
EVENGINE_API_DOMAINS Result< int > applyTerrainLegacySteepestErosion(Heightmap &heights, const Heightmap &hardness, const TerrainLegacySteepestErosionSettings &settings)
Apply Pcg HeightMap.ErodeThermal's ordered steepest-cardinal transport with hardness.
Definition TerrainLegacyThermal.cpp:64
Result< int > smoothTerrainHeightmap(Heightmap &target, const Heightmap &source, int iterations)
Apply Pcg HeightMap.Smooth's in-place four-neighbor passes.
Definition TerrainDerivedMap.cpp:161
TerrainHeightmapSlopeQuery
Pcg HeightMap point slope query variants.
Definition TerrainDerivedMap.h:46
Result< int > fillTerrainHeightmap(Heightmap &target, float value)
Fill a finite Pcg heightmap with one value clamped to [0,1].
Definition TerrainDerivedMap.cpp:538
TerrainSessionRunStatus
Observable lifecycle of a caller-driven staged session replay.
Definition TerrainGenerationSession.h:20
Result< int > blendTerrainBrush(Heightmap &target, const Heightmap &oldHeights, const Heightmap &newHeights, const Heightmap &brush, const TerrainBrushBlendSettings &s)
Blend an erosion scalar output with old heights through transformed brush UVs.
Definition TerrainMask.cpp:265
Result< int > smoothTerrainHeightmapRadius(Heightmap &target, const Heightmap &source, int radius)
Apply Pcg HeightMap.SmoothRadius's scaled sliding-window filter, including its first-row omission.
Definition TerrainDerivedMap.cpp:181
Result< int > convolveTerrainHeightmap(Heightmap &target, const Heightmap &source, const Heightmap &kernel)
Apply Pcg HeightMap.Convolve with an odd square kernel and source-order in-place feedback.
Definition TerrainDerivedMap.cpp:211
Result< int > copyTerrainHeightmap(Heightmap &target, const Heightmap &source, TerrainHeightmapCopy mode)
Copy or conditionally merge a Pcg heightmap, resampling when dimensions differ.
Definition TerrainDerivedMap.cpp:383
TerrainMaskBlend
Ordered scalar-mask arithmetic; intermediate values are not clamped.
Definition TerrainStamp.h:9
Result< int > transformTerrainHeightmap(Heightmap &target, const Heightmap &source, TerrainHeightmapTransform transform, float parameter)
Apply Pcg Invert, Normalise, Power, or Contrast to a finite heightmap.
Definition TerrainDerivedMap.cpp:355
Result< int > setTerrainHeightmapColumn(Heightmap &target, int columnZ, const Heightmap &values)
Set Pcg's fixed-Z column from a one-dimensional strip.
Definition TerrainDerivedMap.cpp:574
TerrainTreeScaleMode
Pcg-compatible rules for deriving tree scale from placement fitness.
Definition TerrainTreePlacement.h:17
Result< int > smoothTerrainMask(Heightmap &target, const Heightmap &input, float verticality, float blurRadius)
Apply Pcg's two-pass Smooth ImageMask operation to a scalar mask.
Definition TerrainMask.cpp:12
Result< int > applyTerrainHeightMix(Heightmap &target, const Heightmap &local, const Heightmap &global, const TerrainHeightMixSettings &settings)
Mix centered local brush heights into terrain, then globally mask and clip.
Definition TerrainEffect.cpp:179
Result< int > applyTerrainSmooth(Heightmap &target, const Heightmap &mask, const TerrainSmoothSettings &settings)
Apply Pcg's horizontal then vertical seven-pair weighted smooth passes.
Definition TerrainEffect.cpp:49
TerrainPolygonMaskType
Pcg PolyMask topology: open strokes only, or closed flood fill plus strokes.
Definition TerrainPolygonMask.h:11
Result< int > applyTerrainPower(Heightmap &target, const Heightmap &mask, float power)
Apply the Pcg PowerOf control: lerp(height,pow(height,4-power),mask).
Definition TerrainEffect.cpp:142
Result< int > paintTerrainSplatLayer(TerrainSplatmap &target, const Heightmap &paint, int targetLayer)
Replace one terrain layer with a normalized paint raster and proportionally renormalize all other lay...
Definition TerrainSplatmap.cpp:203
TerrainNoiseType
Pcg NoiseLib families available to the native scalar mask generator.
Definition TerrainNoiseMask.h:11
Result< int > applyTerrainStrength(Heightmap &target, const Heightmap &source, const Heightmap &curve, TerrainStrengthMode mode, float strength, bool invert)
Apply the reference strength curve, inversion, mode and final interpolation.
Definition TerrainMask.cpp:239
Result< bool > terrainHeightmapHasData(const Heightmap &source)
Return whether a heightmap contains a valid positive-size sample array.
Definition TerrainDerivedMap.cpp:31
Result< int > deriveTerrainSlope(Heightmap &target, const Heightmap &heights, float spacingX, float spacingZ, float heightScale)
Derive the shader's slope metric 1-normal.y from world-scaled height gradients.
Definition TerrainMask.cpp:327
Result< float > sampleTerrainHeightmapSafe(const Heightmap &source, int x, int z)
Read a finite heightmap at an integer coordinate clamped to its nearest border.
Definition TerrainDerivedMap.cpp:7
Result< int > removeTerrainTerraces(Heightmap &target, const Heightmap &source, const Heightmap &classes, const TerrainTerraceRemovalSettings &s)
Apply Pcg's adaptive smoothing, gradient noise, 3x3 filter, and fixed 5x5 Gaussian blur.
Definition TerrainTerraceRemover.cpp:57
TerrainHeightmapTransform
Pcg HeightMap whole-raster value transforms.
Definition TerrainDerivedMap.h:40
Result< int > quantizeTerrainHeightmap(Heightmap &target, const Heightmap &source, float divisor)
Quantize every sample using Pcg HeightMap.Quantize's Mathf.Round rule.
Definition TerrainDerivedMap.cpp:262
TerrainSessionAccess
Edit policy for the owned operation history and terrain.
Definition TerrainGenerationSession.h:18
Result< bool > terrainHeightmapIsPowerOfTwo(const Heightmap &source)
Return whether both positive heightmap dimensions are powers of two; malformed storage fails.
Definition TerrainDerivedMap.cpp:40
Result< int > generateTerrainErosionMask(Heightmap &target, const Heightmap &oldHeights, const Heightmap &erosion, const Heightmap &brush, const TerrainBrushBlendSettings &spatial, const Heightmap &curve, TerrainStrengthMode mode, float strength, bool userInvert)
Compose spatial erosion-output blending and the source's inverted strength filter atomically.
Definition TerrainMask.cpp:192
TerrainWaterChannel
Stored scalar channels; Pcg erosion masks read FluxRight or VelocityX, not vector magnitude.
Definition TerrainWaterField.h:11
TerrainHeightmapMeasure
Pcg HeightMap read-only scalar measurements.
Definition TerrainDerivedMap.h:44
TerrainObjectScaleMode
Pcg-compatible scale policy for one terrain object instance resource.
Definition TerrainObjectPlacement.h:17
Result< int > applyTerrainStamp(Heightmap &target, const Heightmap &stamp, const TerrainStampSettings &s, const Heightmap &localMask, const Heightmap &globalMask)
Apply a rotated, bilinearly sampled stamp; publish only after all checks succeed.
Definition TerrainStamp.cpp:41
TerrainDetailMode
Native detail-density operation corresponding to Pcg SpawnMode.
Definition TerrainDetailLayer.h:15
Result< double > measureTerrainHeightmap(const Heightmap &source, TerrainHeightmapMeasure measure)
Measure Pcg height range, sum, average, or scanner base level from current samples.
Definition TerrainDerivedMap.cpp:434
Result< int > applyGtsHeightBlend(TerrainSplatmap &output, const TerrainSplatmap &input, const GtsHeightBlendSet &heights, float blendFactor)
Recompute all splat weights using the GTS texture-height blending equation.
Definition TerrainSplatmap.cpp:239
Result< int > generateTerrainConcavityMask(Heightmap &target, const Heightmap &input, const Heightmap &heights, const Heightmap &curve, const TerrainConcavitySettings &s, TerrainMaskBlend mode)
Generate source normalized-gradient concavity with border attenuation and indexed curve lookup.
Definition TerrainMask.cpp:73
PcgBiomeLoadMode
Pcg TerrainLoader activation modes retained by a biome controller.
Definition PcgBiomeController.h:9
TerrainWorldRunStatus
Observable lifecycle of a caller-driven staged world spawn.
Definition TerrainWorldWorkspace.h:26
Result< int > applyTerrainRidges(Heightmap &target, const Heightmap &mask, const TerrainRidgeSettings &settings)
Apply ordered horizontal/vertical ridge powers, neighbor mixing and per-pass clipping.
Definition TerrainEffect.cpp:89
Result< int > filterTerrainHeightmapNeighborhood(Heightmap &target, const Heightmap &source, int radius, TerrainHeightmapNeighborhood mode)
Apply Pcg HeightMap.DeNoise, GrowEdges, or ShrinkEdges in source traversal order.
Definition TerrainDerivedMap.cpp:123
TerrainDistanceAxis
Distance coordinates used by the Pcg distance-mask shader.
Definition TerrainMask.h:189
TerrainHeightmapCopy
Pcg HeightMap.Copy conditional modes in source enum order.
Definition TerrainDerivedMap.h:42
EVENGINE_API_DOMAINS Result< int > applyTerrainSediment(Heightmap &heights, Heightmap &sediment, const Heightmap &velocityX, const Heightmap &velocityZ, const TerrainWaterSettings &water, const TerrainSedimentSettings &settings)
Apply the source sediment reaction and backtrace equations with atomic dual output.
Definition TerrainSediment.cpp:7
TerrainTreeYOffsetMode
Height reference used when a tree does not snap directly to terrain.
Definition TerrainTreePlacement.h:20
TerrainStampOperation
Native height operations, in terrain height units (not Unity packed heights).
Definition TerrainStamp.h:12
Result< float > sampleTerrainHeightmapNormalized(const Heightmap &source, float x, float z)
Read Pcg HeightMap's normalized bilinear sample using x*width and z*depth coordinates.
Definition TerrainDerivedMap.cpp:15
Result< int > lerpTerrainHeightmap(Heightmap &target, const Heightmap &source, const Heightmap &values, const Heightmap &mask)
Lerp source toward values under a mask using Pcg's clamped Mathf.Lerp semantics.
Definition TerrainDerivedMap.cpp:336
TerrainHeightmapAspect
Pcg HeightMap.Aspect modes in source enum order.
Definition TerrainDerivedMap.h:34
Result< int > generateTerrainWaterFlowMap(Heightmap &target, const Heightmap &source, const TerrainWaterFlowMapSettings &settings)
Generate Pcg's legacy transposed water-flow accumulation map.
Definition TerrainWaterField.cpp:8
Result< int > generateTerrainHeightmapAspect(Heightmap &target, const Heightmap &source, TerrainHeightmapAspect mode)
Derive Pcg HeightMap.Aspect's aspect, northerness, or easterness raster.
Definition TerrainDerivedMap.cpp:94
Result< int > exportTerrainTreePoints(PointSet &output, const Heightmap &fitness, const Heightmap &heights, const TerrainTreePlacementSettings &s)
Scan a terrain rectangle and atomically export accepted Pcg-style tree instances.
Definition TerrainTreePlacement.cpp:61
Result< int > growShrinkTerrainMask(Heightmap &target, const Heightmap &source, const Heightmap &curve, float distance)
Ordered radial Grow/Shrink followed by the reference strength curve.
Definition TerrainMask.cpp:203
Result< int > exportTerrainObjectPoints(PointSet &output, const Heightmap &fitness, const Heightmap &heights, const TerrainObjectPlacementSettings &s)
Export Pcg-style terrain game-object resources into an attributed PointSet atomically.
Definition TerrainObjectPlacement.cpp:92
TerrainObjectYOffsetMode
Height reference used by one terrain object instance resource.
Definition TerrainObjectPlacement.h:19
Result< int > applyTerrainThermal(Heightmap &heights, Heightmap &sediment, const TerrainThermalSettings &settings)
Apply the source thermal equation, publishing height and sediment together.
Definition TerrainErosion.cpp:7
TerrainImageFilter
Reference image selection modes; MaximumRgb is not luminance.
Definition TerrainImageMask.h:8
Result< int > setTerrainHeightmapSafe(Heightmap &target, int x, int y, float value)
Set one sample after clamping its coordinates to the nearest border.
Definition TerrainDerivedMap.cpp:546
Result< int > alignTerrainSplatTextures(TerrainSplatmap &terrainA, TerrainSplatmap &terrainB, const TerrainTextureAlignSettings &settings)
Blend texture weights on adjacent terrain edges using Pcg's synchronized-noise equation.
Definition TerrainSplatmap.cpp:116
Result< int > exportTerrainDetailPoints(PointSet &output, const TerrainDetailLayer &layer, const Heightmap &heights, const TerrainDetailPlacementSettings &s)
Expand integer detail counts into the existing attributed PointSet, atomically.
Definition TerrainDetailPlacement.cpp:37
Result< int > applyTerrainHeightmapScalarArithmetic(Heightmap &target, const Heightmap &source, float operand, TerrainHeightmapArithmetic operation, bool clampResult, float minValue, float maxValue)
Apply a scalar Pcg HeightMap arithmetic operation with optional clamping.
Definition TerrainDerivedMap.cpp:293
TerrainObjectOperationMode
Mutation performed by a multi-terrain game-object operation.
Definition TerrainObjectPlacement.h:21
TerrainTreeOperationMode
Pcg SetTerrainTrees operation branch. Add and Replace both append after upstream clearing policy.
Definition TerrainTreePlacement.h:55
TerrainHeightmapArithmetic
Pcg HeightMap pointwise arithmetic operations.
Definition TerrainDerivedMap.h:38
Result< int > applyTerrainHeightCurve(Heightmap &target, const Heightmap &mask, const Heightmap &curve, float minimum, float maximum)
Apply the height-transform shader's smoothstep and one-row height curve.
Definition TerrainEffect.cpp:160
Result< double > measureTerrainHeightmapSlope(const Heightmap &source, float x, float y, TerrainHeightmapSlopeQuery mode)
Evaluate one of Pcg HeightMap's three point-slope formulas.
Definition TerrainDerivedMap.cpp:501
Result< int > generateTerrainHeightmapCurvature(Heightmap &target, const Heightmap &source, TerrainHeightmapCurvature mode)
Derive Pcg HeightMap.CurvatureMap's normalized differential curvature.
Definition TerrainDerivedMap.cpp:55
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:470
WidgetDesc progress(float fraction, std::string id, std::string overlay)
Progress bar; fraction is clamped to [0,1].
Definition Widget.cpp:395
WidgetDesc grid(int columns, std::vector< WidgetDesc > children, std::string id)
Fixed-column grid; children are placed in source order.
Definition Widget.cpp:687
@ InvalidArgument
@ Unsupported
Engine-neutral description of one generated reflection or light probe.
Definition ProcgenProbeSink.h:14
float healthyB
Definition TerrainDetailPlacement.h:16
std::string asset
Definition TerrainDetailPlacement.h:26
float maximumScale
Definition TerrainDetailPlacement.h:12
float noiseSpread
Normalized frequency control for deterministic healthy/dry color patches.
Definition TerrainDetailPlacement.h:19
uint64_t namespaceId
Definition TerrainDetailPlacement.h:22
float minimumHeight
Definition TerrainDetailPlacement.h:14
float heightScale
Definition TerrainDetailPlacement.h:11
float minimumWidth
Independent horizontal and vertical multipliers, applied after the uniform scale.
Definition TerrainDetailPlacement.h:14
float width
Definition TerrainDetailPlacement.h:11
uint32_t seed
Definition TerrainDetailPlacement.h:21
float healthyG
Definition TerrainDetailPlacement.h:16
float originZ
Definition TerrainDetailPlacement.h:11
uint64_t densityNamespaceId
Density resource layer to export; zero selects the compatibility/default layer.
Definition TerrainDetailPlacement.h:24
float healthyA
Definition TerrainDetailPlacement.h:16
int32_t noiseSeed
Definition TerrainDetailPlacement.h:20
float depth
Definition TerrainDetailPlacement.h:11
int maxPoints
Definition TerrainDetailPlacement.h:25
float maximumHeight
Definition TerrainDetailPlacement.h:14
float healthyR
Linear RGBA endpoints passed to generated points for renderer-side instance tint.
Definition TerrainDetailPlacement.h:16
float originX
Definition TerrainDetailPlacement.h:11
float maximumWidth
Definition TerrainDetailPlacement.h:14
float minimumScale
Definition TerrainDetailPlacement.h:12
float minimumFitness
Definition TerrainDetailLayer.h:18
std::uint64_t namespaceId
Stable resource namespace; zero addresses the compatibility/default layer.
Definition TerrainDetailLayer.h:22
int extraSeamSize
Definition TerrainMultiTile.h:17
float maxDifference
Definition TerrainMultiTile.h:18
float failureRate
Definition TerrainObjectPlacement.h:27
float minimumScaleX
Definition TerrainObjectPlacement.h:36
bool rotateToSlope
Definition TerrainObjectPlacement.h:46
float minimumRotationY
Definition TerrainObjectPlacement.h:42
float minimumScaleY
Definition TerrainObjectPlacement.h:37
float scaleRandomPercentageX
Definition TerrainObjectPlacement.h:40
float maximumOffsetX
Definition TerrainObjectPlacement.h:28
float maximumScaleY
Definition TerrainObjectPlacement.h:37
float minimumScale
Definition TerrainObjectPlacement.h:35
float maximumRotationY
Definition TerrainObjectPlacement.h:42
float minimumScaleZ
Definition TerrainObjectPlacement.h:38
bool yOffsetAlongSlope
Definition TerrainObjectPlacement.h:44
float scaleRandomPercentage
Definition TerrainObjectPlacement.h:39
float minimumOffsetY
Definition TerrainObjectPlacement.h:29
std::string asset
Definition TerrainObjectPlacement.h:25
float minimumRotationZ
Definition TerrainObjectPlacement.h:43
bool commonScale
Definition TerrainObjectPlacement.h:34
float minimumOffsetZ
Definition TerrainObjectPlacement.h:30
float maximumScaleX
Definition TerrainObjectPlacement.h:36
float scaleRandomPercentageY
Definition TerrainObjectPlacement.h:40
float maximumRotationX
Definition TerrainObjectPlacement.h:41
float customOffset
Definition TerrainObjectPlacement.h:32
int maximumInstances
Definition TerrainObjectPlacement.h:26
float minimumOffsetX
Definition TerrainObjectPlacement.h:28
float scaleRandomPercentageZ
Definition TerrainObjectPlacement.h:40
float maximumRotationZ
Definition TerrainObjectPlacement.h:43
float maximumOffsetY
Definition TerrainObjectPlacement.h:29
float maximumScale
Definition TerrainObjectPlacement.h:35
int minimumInstances
Definition TerrainObjectPlacement.h:26
bool alignForwardToSlope
Definition TerrainObjectPlacement.h:45
float maximumOffsetZ
Definition TerrainObjectPlacement.h:30
float minimumRotationX
Definition TerrainObjectPlacement.h:41
float maximumScaleZ
Definition TerrainObjectPlacement.h:38
float boundsRadius
Definition TerrainObjectPlacement.h:56
float spawnDensity
Definition TerrainObjectPlacement.h:52
float failureRate
Definition TerrainObjectPlacement.h:54
std::uint64_t namespaceId
Definition TerrainObjectPlacement.h:60
float originZ
Definition TerrainObjectPlacement.h:51
float jitterPercent
Definition TerrainObjectPlacement.h:52
bool boundsCollisionCheck
Definition TerrainObjectPlacement.h:57
float prototypeScale
Definition TerrainObjectPlacement.h:56
float seaLevel
Definition TerrainObjectPlacement.h:58
float spacing
Definition TerrainObjectPlacement.h:52
float depth
Definition TerrainObjectPlacement.h:51
float startOffsetX
Definition TerrainObjectPlacement.h:53
float width
Definition TerrainObjectPlacement.h:51
float minimumDirection
Definition TerrainObjectPlacement.h:55
float boundsCheckQuality
Definition TerrainObjectPlacement.h:56
float minimumInstanceFitness
Definition TerrainObjectPlacement.h:54
int maxPoints
Definition TerrainObjectPlacement.h:61
float maximumDirection
Definition TerrainObjectPlacement.h:55
float originX
Definition TerrainObjectPlacement.h:51
float minimumFitness
Definition TerrainObjectPlacement.h:54
float startOffsetZ
Definition TerrainObjectPlacement.h:53
std::string prototype
Definition TerrainObjectPlacement.h:62
std::int32_t seed
Definition TerrainObjectPlacement.h:59
float heightScale
Definition TerrainObjectPlacement.h:51
float reflectionOffset
Definition TerrainProbePlacement.h:22
std::uint64_t namespaceId
Definition TerrainProbePlacement.h:26
int reflectionResolution
Definition TerrainProbePlacement.h:23
float minimumFitness
Definition TerrainProbePlacement.h:20
int maxPoints
Definition TerrainProbePlacement.h:27
bool seaLevelActive
Definition TerrainProbePlacement.h:21
std::string name
Definition TerrainProbePlacement.h:17
float originZ
Definition TerrainProbePlacement.h:19
float originX
Definition TerrainProbePlacement.h:19
float lightOffset
Definition TerrainProbePlacement.h:22
float heightScale
Definition TerrainProbePlacement.h:19
float seaLevel
Definition TerrainProbePlacement.h:22
float reflectionShadowDistance
Definition TerrainProbePlacement.h:24
float reflectionClipDistance
Definition TerrainProbePlacement.h:24
float jitterPercent
Definition TerrainProbePlacement.h:20
std::int32_t seed
Definition TerrainProbePlacement.h:25
float spacing
Definition TerrainProbePlacement.h:20
int noiseSeed
Definition TerrainTerraceRemover.h:20
float flatThreshold
Definition TerrainTerraceRemover.h:13
bool terrainWorkflow
Definition TerrainTerraceRemover.h:19
float perlinStrength
Definition TerrainTerraceRemover.h:11
float slopeTerraceThreshold
Definition TerrainTerraceRemover.h:12
bool excludeBlack
Definition TerrainTerraceRemover.h:18
float verticalGradientThreshold
Definition TerrainTerraceRemover.h:14
float minimumTerraceThreshold
Definition TerrainTerraceRemover.h:15
float maximumTerraceThreshold
Definition TerrainTerraceRemover.h:16
bool excludeRed
Definition TerrainTerraceRemover.h:17
float perlinScale
Definition TerrainTerraceRemover.h:10
float terrainBDepth
Definition TerrainSplatmap.h:70
float blendStrength
Definition TerrainSplatmap.h:71
float adjacencyTolerance
Definition TerrainSplatmap.h:73
float terrainAWidth
Definition TerrainSplatmap.h:65
float terrainAOriginZ
Definition TerrainSplatmap.h:64
float terrainAOriginX
Definition TerrainSplatmap.h:63
float terrainADepth
Definition TerrainSplatmap.h:66
float terrainBWidth
Definition TerrainSplatmap.h:69
float terrainBOriginZ
Definition TerrainSplatmap.h:68
float terrainBOriginX
Definition TerrainSplatmap.h:67
float heightScale
Definition TerrainTreePlacement.h:24
float maximumHeight
Definition TerrainTreePlacement.h:32
float originZ
Definition TerrainTreePlacement.h:24
float bendFactor
Definition TerrainTreePlacement.h:36
float seaLevel
Definition TerrainTreePlacement.h:29
float heightRandomPercentage
Definition TerrainTreePlacement.h:33
float spawnDensity
Definition TerrainTreePlacement.h:25
float boundsRadius
Definition TerrainTreePlacement.h:36
float jitterPercent
Definition TerrainTreePlacement.h:25
float minimumHeight
Definition TerrainTreePlacement.h:32
float customOffset
Definition TerrainTreePlacement.h:29
std::uint64_t namespaceId
Definition TerrainTreePlacement.h:38
float minimumYOffset
Definition TerrainTreePlacement.h:29
float minimumWidth
Definition TerrainTreePlacement.h:31
float maximumWidth
Definition TerrainTreePlacement.h:31
bool snapToTerrain
Definition TerrainTreePlacement.h:27
float healthyR
Definition TerrainTreePlacement.h:34
float widthRandomPercentage
Definition TerrainTreePlacement.h:33
std::int32_t seed
Definition TerrainTreePlacement.h:37
float healthyA
Definition TerrainTreePlacement.h:34
float maximumYOffset
Definition TerrainTreePlacement.h:29
float originX
Definition TerrainTreePlacement.h:24
std::string asset
Definition TerrainTreePlacement.h:40
float spacing
Definition TerrainTreePlacement.h:25
float healthyB
Definition TerrainTreePlacement.h:34
int maxPoints
Definition TerrainTreePlacement.h:39
float healthyG
Definition TerrainTreePlacement.h:34
float minimumFitness
Definition TerrainTreePlacement.h:26
float failureRate
Definition TerrainTreePlacement.h:26
float maximumHeight
Definition TerrainTreePlacement.h:49
float minimumHeight
Definition TerrainTreePlacement.h:49
float previousMaximumHeight
Definition TerrainTreePlacement.h:47
float maximumWidth
Definition TerrainTreePlacement.h:48
float bendFactor
Definition TerrainTreePlacement.h:50
float previousMinimumWidth
Definition TerrainTreePlacement.h:46
float minimumWidth
Definition TerrainTreePlacement.h:48
float previousMinimumHeight
Definition TerrainTreePlacement.h:47
float boundsRadius
Definition TerrainTreePlacement.h:50
std::string asset
Definition TerrainTreePlacement.h:51
float previousMaximumWidth
Definition TerrainTreePlacement.h:46
float absorptionRate
Definition TerrainWaterField.h:29
float dropletVolume
Definition TerrainWaterField.h:28
int smoothIterations
Definition TerrainWaterField.h:30
float flowAcceleration
Signed flowRate*gravity; source default is negative.
Definition TerrainWaterField.h:17
float precipitation
Definition TerrainWaterField.h:16
std::uint64_t sourceNamespace
Zero clears any source; non-zero clears only points emitted by that stable namespace.
Definition TerrainWorldWorkspace.h:52
int controlTextureResolution
Definition TerrainWorldWorkspace.h:34
std::string nameSuffix
Definition TerrainWorldWorkspace.h:42
float tileSize
Definition TerrainWorldWorkspace.h:31
bool worldMap
Definition TerrainWorldWorkspace.h:40
int heightmapResolution
Definition TerrainWorldWorkspace.h:33
int defaultDetailDensity
Definition TerrainWorldWorkspace.h:39
float tileHeight
Definition TerrainWorldWorkspace.h:31
int detailResolution
Definition TerrainWorldWorkspace.h:35
int treeResolution
Definition TerrainWorldWorkspace.h:36
int defaultSplatLayer
Definition TerrainWorldWorkspace.h:38
float centerZ
Definition TerrainWorldWorkspace.h:32
float centerX
Definition TerrainWorldWorkspace.h:32
int splatLayers
Definition TerrainWorldWorkspace.h:38
int objectResolution
Definition TerrainWorldWorkspace.h:37
std::string namePrefix
Definition TerrainWorldWorkspace.h:41