载入中...
搜索中...
未找到
TerrainStampScript.cpp
浏览该文件的文档.
45 Diagnostic::error(DiagnosticCode::InvalidArgument, "terrain operation requires non-null rasters and settings"));
53 return eve::script::projectResult(vm, progress->updateRule(name, total, done, localTotal, localDone),
56 spawnProgress.addFunc("updateRuleFraction", [vm = table.getHandle()](PcgSpawnProgress* progress, float value) {
64 spawnProgress.addFunc("clear", [](PcgSpawnProgress* progress) { return static_cast<int>(progress->clear()); });
65 spawnProgress.addFunc("getProgress", [](const PcgSpawnProgress* progress) { return float(progress->progress()); });
66 spawnProgress.addFunc("getTitle", [](const PcgSpawnProgress* progress) { return progress->title(); });
67 spawnProgress.addFunc("getSubtitle", [](const PcgSpawnProgress* progress) { return progress->subtitle(); });
68 spawnProgress.addFunc("getStatus", [](const PcgSpawnProgress* progress) { return static_cast<int>(progress->status()); });
70 auto runtimeStamper = table.addClass("PcgRuntimeStamper", ssq::Class::Ctor<PcgRuntimeStamper()>());
84 runtimeStamper.addFunc("reportMissingStamp", [vm = table.getHandle()](PcgRuntimeStamper* stamper) {
87 runtimeStamper.addFunc("execute", [vm = table.getHandle()](PcgRuntimeStamper* stamper, Heightmap* target,
90 auto result = target ? stamper->execute(*target, originX, originZ, spacingX, spacingZ) : missingRaster();
116 auto biomeController = table.addClass("PcgBiomeController", ssq::Class::Ctor<PcgBiomeController()>());
126 biomeController.addFunc("fitToAllTerrains", [vm=table.getHandle()](PcgBiomeController* controller,
130 biomeController.addFunc("tierAt", [](const PcgBiomeController* controller,float x,float y,float z) {
177 treeManager.addFunc("getCount", [](const PcgTreeManager* manager){return manager->getCount();});
178 auto terrainWatcher = table.addClass("PcgTerrainWatcher", ssq::Class::Ctor<PcgTerrainWatcher()>());
196 terrainWatcher.addFunc("getChangeTerrainId", [vm=table.getHandle()](const PcgTerrainWatcher* watcher,
201 terrainWatcher.addFunc("getChangeType", [vm=table.getHandle()](const PcgTerrainWatcher* watcher,
207 splatmap.addFunc("initialize", [vm = table.getHandle()](TerrainSplatmap* target, int width, int height,
212 splatmap.addFunc("sample", [vm = table.getHandle()](const TerrainSplatmap* target, int layer, int x, int y) {
216 splatmap.addFunc("copyLayer", [vm = table.getHandle()](const TerrainSplatmap* target, int layer,
221 splatmap.addFunc("paint", [vm = table.getHandle()](TerrainSplatmap* target, const Heightmap* paint, int layer) {
226 splatmap.addFunc("getHeight", [](const TerrainSplatmap* target) { return target->getHeight(); });
227 splatmap.addFunc("getLayerCount", [](const TerrainSplatmap* target) { return target->getLayerCount(); });
231 table.addClass("TerrainTextureAlignSettings", ssq::Class::Ctor<TerrainTextureAlignSettings()>());
251 auto heightBlend = table.addClass("GtsHeightBlendSet", ssq::Class::Ctor<GtsHeightBlendSet()>());
255 auto result = height ? target->addLayer(*height, contrast, brightness, increase) : missingRaster();
258 heightBlend.addFunc("getLayerCount", [](const GtsHeightBlendSet* target) { return target->getLayerCount(); });
262 auto result = output && input && heights ? applyGtsHeightBlend(*output, *input, *heights, blendFactor)
267 auto multiSplat = table.addClass("TerrainMultiSplatWorkspace", ssq::Class::Ctor<TerrainMultiSplatWorkspace()>());
272 auto result = splat ? workspace->addTile(name, *splat, originX, originZ, width, depth, worldMap)
283 multiSplat.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiSplatWorkspace* workspace,
311 table.addClass("TerrainObjectInstanceSettings", ssq::Class::Ctor<TerrainObjectInstanceSettings()>());
332 objectInstance.addVar("scaleRandomPercentage", &TerrainObjectInstanceSettings::scaleRandomPercentage);
333 objectInstance.addVar("scaleRandomPercentageX", &TerrainObjectInstanceSettings::scaleRandomPercentageX);
334 objectInstance.addVar("scaleRandomPercentageY", &TerrainObjectInstanceSettings::scaleRandomPercentageY);
335 objectInstance.addVar("scaleRandomPercentageZ", &TerrainObjectInstanceSettings::scaleRandomPercentageZ);
343 objectInstance.addVar("alignForwardToSlope", &TerrainObjectInstanceSettings::alignForwardToSlope);
352 auto object = table.addClass("TerrainObjectPlacementSettings", ssq::Class::Ctor<TerrainObjectPlacementSettings()>());
365 object.addVar("minimumInstanceFitness", &TerrainObjectPlacementSettings::minimumInstanceFitness);
377 object.addFunc("addInstance", [vm = table.getHandle()](TerrainObjectPlacementSettings* settings,
382 object.addFunc("exportPoints", [vm = table.getHandle()](const TerrainObjectPlacementSettings* settings,
385 auto result = output && fitness && heights ? exportTerrainObjectPoints(*output, *fitness, *heights, *settings)
389 object.addFunc("removePoints", [vm = table.getHandle()](const TerrainObjectPlacementSettings* settings,
399 table.addClass("TerrainMultiObjectWorkspace", ssq::Class::Ctor<TerrainMultiObjectWorkspace()>());
422 multiObject.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiObjectWorkspace* workspace,
451 table.addClass("TerrainProbePlacementSettings", ssq::Class::Ctor<TerrainProbePlacementSettings()>());
465 probeSettings.addVar("reflectionResolution", &TerrainProbePlacementSettings::reflectionResolution);
466 probeSettings.addVar("reflectionClipDistance", &TerrainProbePlacementSettings::reflectionClipDistance);
467 probeSettings.addVar("reflectionShadowDistance", &TerrainProbePlacementSettings::reflectionShadowDistance);
533 table.addFunc("tickTerrainProbeBatches", [vm = table.getHandle()](int faces, int filters, int samples) {
554 spawnPlan.addFunc("addSplat", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
561 spawnPlan.addFunc("addDetail", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
572 spawnPlan.addFunc("addTrees", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
582 spawnPlan.addFunc("addObjects", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
592 spawnPlan.addFunc("addProbes", [vm = table.getHandle()](TerrainSpawnPlan* self, const std::string& ruleId,
625 spawnPlan.addFunc("getRuleCount", [](const TerrainSpawnPlan* self) { return self->getRuleCount(); });
635 auto biomePreset = table.addClass("TerrainBiomePreset", ssq::Class::Ctor<TerrainBiomePreset()>());
654 biomePreset.addFunc("getSpawnerCount", [](const TerrainBiomePreset* self) { return self->getSpawnerCount(); });
655 biomePreset.addFunc("getAutoAssignResources", [vm = table.getHandle()](const TerrainBiomePreset* self,
664 biomePreset.addFunc("restoreJson", [vm = table.getHandle()](TerrainBiomePreset* self, const std::string& json) {
670 auto tree = table.addClass("TerrainTreePlacementSettings", ssq::Class::Ctor<TerrainTreePlacementSettings()>());
709 tree.addFunc("getScaleMode", [](const TerrainTreePlacementSettings* s) { return int(s->scaleMode); });
713 tree.addFunc("getYOffsetMode", [](const TerrainTreePlacementSettings* s) { return int(s->yOffsetMode); });
731 auto rescale = table.addClass("TerrainTreeRescaleSettings", ssq::Class::Ctor<TerrainTreeRescaleSettings()>());
746 rescale.addFunc("getScaleMode", [](const TerrainTreeRescaleSettings* s) { return int(s->scaleMode); });
750 auto result = output && input && settings ? rescaleTerrainTreePoints(*output, *input, *settings)
756 table.addClass("TerrainDetailPlacementSettings", ssq::Class::Ctor<TerrainDetailPlacementSettings()>());
784 [vm = table.getHandle()](PointSet* output, const TerrainDetailLayer* layer, const Heightmap* heights,
792 auto detailSettings = table.addClass("TerrainDetailSettings", ssq::Class::Ctor<TerrainDetailSettings()>());
800 detail.addFunc("reset", [vm = table.getHandle()](TerrainDetailLayer* s, int width, int height, int count) {
801 return eve::script::projectResult(vm, s->reset(width, height, count), [](int n) { return eve::Value(n); });
806 detail.addFunc("apply", [vm = table.getHandle()](TerrainDetailLayer* s, const Heightmap* fitness,
817 auto session = table.addClass("TerrainGenerationSession", ssq::Class::Ctor<TerrainGenerationSession()>());
818 session.addFunc("smooth", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
823 session.addFunc("ridges", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
828 session.addFunc("terrace", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
833 session.addFunc("contrast", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
838 session.addFunc("power", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask, float power) {
842 session.addFunc("heightCurve", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* mask,
844 auto result = mask && curve ? s->heightCurve(*mask, *curve, minimum, maximum) : missingRaster();
850 auto result = local && global && settings ? s->heightMix(*local, *global, *settings) : missingRaster();
853 session.addFunc("resetSimulation", [vm = table.getHandle()](TerrainGenerationSession* s, float depth) {
854 return eve::script::projectResult(vm, s->resetSimulation(depth), [](int n) { return eve::Value(n); });
862 "hydraulic", [vm = table.getHandle()](TerrainGenerationSession* s, const TerrainWaterSettings* water,
866 water && sediment && thermal ? s->hydraulic(*water, *sediment, *thermal, iterations) : missingRaster();
869 session.addFunc("copySediment", [vm = table.getHandle()](const TerrainGenerationSession* s, Heightmap* target) {
874 "exportWater", [vm = table.getHandle()](const TerrainGenerationSession* s, Heightmap* target, int channel) {
875 auto result = target ? s->exportWater(*target, static_cast<TerrainWaterChannel>(channel)) : missingRaster();
878 session.addFunc("getOperationCount", [](const TerrainGenerationSession* s) { return s->getOperationCount(); });
879 session.addFunc("getAppliedCount", [](const TerrainGenerationSession* s) { return s->getAppliedCount(); });
880 session.addFunc("getReplayStatus", [](const TerrainGenerationSession* s) { return int(s->getReplayStatus()); });
883 session.addFunc("getAccess", [](const TerrainGenerationSession* s) { return int(s->getAccess()); });
892 session.addFunc("setAccess", [vm = table.getHandle()](TerrainGenerationSession* s, int access) {
895 session.addFunc("operationEnabled", [vm = table.getHandle()](const TerrainGenerationSession* s, int index) {
896 return eve::script::projectResult(vm, s->operationEnabled(index), [](bool value) { return eve::Value(value); });
898 session.addFunc("reset", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* baseline) {
902 session.addFunc("copyTerrain", [vm = table.getHandle()](const TerrainGenerationSession* s, Heightmap* target) {
924 session.addFunc("stepReplay", [vm = table.getHandle()](TerrainGenerationSession* s, int maxOperations) {
932 session.addFunc("stamp", [vm = table.getHandle()](TerrainGenerationSession* s, const Heightmap* stamp,
947 table.addClass("TerrainHeightStitchSettings", ssq::Class::Ctor<TerrainHeightStitchSettings()>());
950 auto multi = table.addClass("TerrainMultiTileWorkspace", ssq::Class::Ctor<TerrainMultiTileWorkspace()>());
955 auto result = heightmap ? workspace->addTile(name, *heightmap, originX, originZ, width, depth, worldMap)
1000 multi.addFunc("getTileCount", [](const TerrainMultiTileWorkspace* workspace) { return workspace->getTileCount(); });
1018 table.addClass("TerrainMultiDetailWorkspace", ssq::Class::Ctor<TerrainMultiDetailWorkspace()>());
1019 multiDetail.addFunc("addTile", [vm = table.getHandle()](TerrainMultiDetailWorkspace* workspace,
1023 auto result = layer ? workspace->addTile(name, *layer, originX, originZ, width, depth, worldMap)
1028 "apply", [vm = table.getHandle()](TerrainMultiDetailWorkspace* workspace, const Heightmap* fitness,
1040 multiDetail.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiDetailWorkspace* workspace,
1054 multiDetail.addFunc("getLastChangedSamples", [](const TerrainMultiDetailWorkspace* workspace) {
1067 auto multiTree = table.addClass("TerrainMultiTreeWorkspace", ssq::Class::Ctor<TerrainMultiTreeWorkspace()>());
1073 auto result = trees && heights ? workspace->addTile(name, *trees, *heights, originX, originZ, width, depth,
1089 multiTree.addFunc("copyTile", [vm = table.getHandle()](const TerrainMultiTreeWorkspace* workspace,
1115 auto distance = table.addClass("TerrainDistanceMaskSettings", ssq::Class::Ctor<TerrainDistanceMaskSettings()>());
1124 auto smooth = table.addClass("TerrainSmoothSettings", ssq::Class::Ctor<TerrainSmoothSettings()>());
1128 auto ridge = table.addClass("TerrainRidgeSettings", ssq::Class::Ctor<TerrainRidgeSettings()>());
1135 auto terrace = table.addClass("TerrainTerraceSettings", ssq::Class::Ctor<TerrainTerraceSettings()>());
1140 auto mix = table.addClass("TerrainHeightMixSettings", ssq::Class::Ctor<TerrainHeightMixSettings()>());
1148 auto thermal = table.addClass("TerrainThermalSettings", ssq::Class::Ctor<TerrainThermalSettings()>());
1156 auto waterSettings = table.addClass("TerrainWaterSettings", ssq::Class::Ctor<TerrainWaterSettings()>());
1166 auto waterFlowSettings = table.addClass("TerrainWaterFlowMapSettings", ssq::Class::Ctor<TerrainWaterFlowMapSettings()>());
1170 table.addFunc("generateTerrainWaterFlowMap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1181 auto result = target && source ? generateTerrainVelocityFlowMap(*target, *source, iterations) : missingRaster();
1200 table.addFunc("filterTerrainHeightmapNeighborhood", [vm = table.getHandle()](Heightmap* target,
1209 table.addFunc("smoothTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1211 auto result = target && source ? smoothTerrainHeightmap(*target, *source, iterations) : missingRaster();
1216 auto result = target && source ? smoothTerrainHeightmapRadius(*target, *source, radius) : missingRaster();
1219 table.addFunc("convolveTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1221 auto result = target && source && kernel ? convolveTerrainHeightmap(*target, *source, *kernel) : missingRaster();
1226 auto result = target && source ? generateTerrainHeightmapSlope(*target, *source) : missingRaster();
1229 table.addFunc("quantizeTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1231 auto result = target && source ? quantizeTerrainHeightmap(*target, *source, divisor) : missingRaster();
1235 [vm = table.getHandle()](Heightmap* target, const Heightmap* source, float operand, int operation,
1256 table.addFunc("lerpTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1258 auto result = target && source && values && mask ? lerpTerrainHeightmap(*target, *source, *values, *mask)
1262 table.addFunc("transformTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1265 ? transformTerrainHeightmap(*target, *source, static_cast<TerrainHeightmapTransform>(transform),
1270 table.addFunc("copyTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1280 auto result = target && source ? copyTerrainHeightmapClamped(*target, *source, minValue, maxValue)
1284 table.addFunc("flipTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, const Heightmap* source) {
1288 table.addFunc("measureTerrainHeightmap", [vm = table.getHandle()](const Heightmap* source, int measure) {
1292 return eve::script::projectResult(vm, std::move(result), [](double value) { return eve::Value(value); });
1311 table.addFunc("fillTerrainHeightmap", [vm = table.getHandle()](Heightmap* target, float value) {
1322 auto result = target && values ? setTerrainHeightmapRow(*target, rowX, *values) : missingRaster();
1325 table.addFunc("setTerrainHeightmapColumn", [vm = table.getHandle()](Heightmap* target, int columnZ,
1327 auto result = target && values ? setTerrainHeightmapColumn(*target, columnZ, *values) : missingRaster();
1334 table.addFunc("sampleTerrainHeightmapSafe", [vm = table.getHandle()](const Heightmap* source, int x, int z) {
1338 return eve::script::projectResult(vm, std::move(result), [](float value) { return eve::Value(value); });
1352 terraceRemoval.addVar("slopeTerraceThreshold", &TerrainTerraceRemovalSettings::slopeTerraceThreshold);
1354 terraceRemoval.addVar("verticalGradientThreshold", &TerrainTerraceRemovalSettings::verticalGradientThreshold);
1355 terraceRemoval.addVar("minimumTerraceThreshold", &TerrainTerraceRemovalSettings::minimumTerraceThreshold);
1356 terraceRemoval.addVar("maximumTerraceThreshold", &TerrainTerraceRemovalSettings::maximumTerraceThreshold);
1361 table.addFunc("analyzeTerrainTerraces", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1363 auto result = target && source && settings ? analyzeTerrainTerraces(*target, *source, *settings) : missingRaster();
1366 table.addFunc("removeTerrainTerraces", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1374 auto sedimentSettings = table.addClass("TerrainSedimentSettings", ssq::Class::Ctor<TerrainSedimentSettings()>());
1381 "exportChannel", [vm = table.getHandle()](const TerrainWaterField* field, Heightmap* target, int channel) {
1382 auto result = field && target ? field->exportChannel(*target, static_cast<TerrainWaterChannel>(channel))
1395 water.addFunc("getWidth", [](const TerrainWaterField* field) { return field ? field->getWidth() : 0; });
1396 water.addFunc("getHeight", [](const TerrainWaterField* field) { return field ? field->getHeight() : 0; });
1397 water.addFunc("reset", [vm = table.getHandle()](TerrainWaterField* field, int width, int height, float depth) {
1399 return eve::script::projectResult(vm, std::move(result), [](int count) { return eve::Value(count); });
1401 water.addFunc("advance", [vm = table.getHandle()](TerrainWaterField* field, const Heightmap* terrain,
1403 auto result = field && terrain && settings ? field->advance(*terrain, *settings) : missingRaster();
1404 return eve::script::projectResult(vm, std::move(result), [](int count) { return eve::Value(count); });
1406 water.addFunc("sample", [vm = table.getHandle()](const TerrainWaterField* field, int x, int z) {
1422 "ProcgenHeightmap", std::function<Heightmap*()>([]() -> Heightmap* { return nullptr; }), true);
1424 auto imageMask = table.addClass("TerrainImageMaskSettings", ssq::Class::Ctor<TerrainImageMaskSettings()>());
1435 auto collisionMask = table.addClass("TerrainCollisionMaskStack", ssq::Class::Ctor<TerrainCollisionMaskStack()>());
1439 auto result = mask ? self->addLayer(*mask, static_cast<TerrainCollisionMaskType>(type), active, invert)
1444 collisionMask.addFunc("getLayerCount", [](const TerrainCollisionMaskStack* self) { return self->getLayerCount(); });
1453 auto polygonMask = table.addClass("TerrainPolygonMask", ssq::Class::Ctor<TerrainPolygonMask()>());
1454 polygonMask.addFunc("addNode", [vm = table.getHandle()](TerrainPolygonMask* self, float x, float z, float radius,
1460 polygonMask.addFunc("getNodeCount", [](const TerrainPolygonMask* self) { return self->getNodeCount(); });
1461 polygonMask.addFunc("rasterize", [vm = table.getHandle()](const TerrainPolygonMask* self, Heightmap* target,
1473 auto bakedMasks = table.addClass("TerrainBakedMaskCache", ssq::Class::Ctor<TerrainBakedMaskCache()>());
1474 bakedMasks.addFunc("store", [vm = table.getHandle()](TerrainBakedMaskCache* self, const std::string& terrainId,
1481 return eve::script::projectResult(vm, self->markDirty(maskGuid), [](int n) { return eve::Value(n); });
1490 bakedMasks.addFunc("getEntryCount", [](const TerrainBakedMaskCache* self) { return self->getEntryCount(); });
1525 auto noiseMask = table.addClass("TerrainNoiseMaskSettings", ssq::Class::Ctor<TerrainNoiseMaskSettings()>());
1555 auto traversal = table.addClass("TerrainTraversalSettings", ssq::Class::Ctor<TerrainTraversalSettings()>());
1562 [vm = table.getHandle()](Heightmap* target, const Heightmap* heights, const Heightmap* baseCosts,
1569 auto concavity = table.addClass("TerrainConcavitySettings", ssq::Class::Ctor<TerrainConcavitySettings()>());
1583 auto curvature = table.addClass("TerrainCurvatureSettings", ssq::Class::Ctor<TerrainCurvatureSettings()>());
1600 heightmap.addFunc("growShrinkMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source,
1603 target && source && curve ? growShrinkTerrainMask(*target, *source, *curve, distance) : missingRaster();
1608 "applyStrength", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, const Heightmap* curve,
1617 [vm = table.getHandle()](Heightmap* target, const Heightmap* oldHeights, const Heightmap* erosion,
1628 auto sampleGrid = table.addClass("TerrainSampleGrid", ssq::Class::Ctor<TerrainSampleGrid()>());
1639 auto brushBlend = table.addClass("TerrainBrushBlendSettings", ssq::Class::Ctor<TerrainBrushBlendSettings()>());
1641 "configureWorld", [vm = table.getHandle()](TerrainBrushBlendSettings* target, const TerrainStampSettings* world,
1643 auto result = target && world && grid ? configureTerrainBrushWorld(*target, *world, width, height, *grid)
1661 heightmap.addFunc("blendBrush", [vm = table.getHandle()](Heightmap* target, const Heightmap* oldHeights,
1671 "applySediment", [vm = table.getHandle()](Heightmap* heights, Heightmap* sediment, const Heightmap* velocityX,
1679 heightmap.addFunc("applyThermal", [vm = table.getHandle()](Heightmap* heights, Heightmap* sediment,
1682 heights && sediment && settings ? applyTerrainThermal(*heights, *sediment, *settings) : missingRaster();
1686 "applyHeightCurve", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask, const Heightmap* curve,
1688 auto result = target && mask && curve ? applyTerrainHeightCurve(*target, *mask, *curve, minimum, maximum)
1692 heightmap.addFunc("applyHeightMix", [vm = table.getHandle()](Heightmap* target, const Heightmap* local,
1695 auto result = target && local && global && settings ? applyTerrainHeightMix(*target, *local, *global, *settings)
1699 heightmap.addFunc("applySmooth", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1701 auto result = target && mask && settings ? applyTerrainSmooth(*target, *mask, *settings) : missingRaster();
1704 heightmap.addFunc("applyRidges", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1706 auto result = target && mask && settings ? applyTerrainRidges(*target, *mask, *settings) : missingRaster();
1709 heightmap.addFunc("applyTerrace", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1711 auto result = target && mask && settings ? applyTerrainTerrace(*target, *mask, *settings) : missingRaster();
1714 heightmap.addFunc("applyPower", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask, float power) {
1728 return eve::script::projectResult(vm, std::move(result), [](bool value) { return eve::Value(value); });
1734 return eve::script::projectResult(vm, std::move(result), [](bool value) { return eve::Value(value); });
1736 heightmap.addFunc("blendMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, int mode,
1741 return eve::script::projectResult(vm, std::move(result), [](int changed) { return eve::Value(changed); });
1743 heightmap.addFunc("applyStamp", [vm = table.getHandle()](Heightmap* target, const Heightmap* stamp,
1747 return eve::script::projectResult(vm, missingRaster(), [](int changed) { return eve::Value(changed); });
1750 return eve::script::projectResult(vm, applyTerrainStamp(*target, *stamp, copy, *local, *global),
1754 "transformMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, const Heightmap* curve) {
1755 auto result = target && source && curve ? transformTerrainMask(*target, *source, *curve) : missingRaster();
1758 heightmap.addFunc("smoothMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* input,
1760 auto result = target && input ? smoothTerrainMask(*target, *input, verticality, blurRadius) : missingRaster();
1767 legacyHydraulic.addVar("sedimentDissolveRate", &TerrainLegacyHydraulicSettings::sedimentDissolveRate);
1781 distributedErosion.addVar("minimumThreshold", &TerrainLegacyDistributedErosionSettings::minimumThreshold);
1782 distributedErosion.addVar("maximumThreshold", &TerrainLegacyDistributedErosionSettings::maximumThreshold);
1807 "rangeMask", [vm = table.getHandle()](Heightmap* target, const Heightmap* source, float minimum, float maximum,
1814 heightmap.addFunc("applyContrast", [vm = table.getHandle()](Heightmap* target, const Heightmap* mask,
1816 auto result = target && mask ? applyTerrainContrast(*target, *mask, strength, size) : missingRaster();
1819 heightmap.addFunc("deriveSlope", [vm = table.getHandle()](Heightmap* target, const Heightmap* heights, float dx,
1821 auto result = target && heights ? deriveTerrainSlope(*target, *heights, dx, dz, scale) : missingRaster();
1825 "distanceMask", [vm = table.getHandle()](Heightmap* target, const TerrainDistanceMaskSettings* settings,
1831 return eve::script::projectResult(vm, generateTerrainDistanceMask(*target, copy, *curve, *strength),
std::map< std::string, std::vector< Key >, std::less<> > channels
Definition AnimCurveLibrary.cpp:21
The single Squirrel projection for common Result, Status and Value.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
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 Value * field(const Value &value, const char *key)
Borrow an optional object field.
Definition BuildingSnapshot.cpp:96
std::vector< uint8_t > polygonMask(const std::vector< HousePolygonPoint > &poly, int width, int depth, int inset)
Rasterize an arbitrary closed polygon onto the cell grid (cell centers inside).
Definition HouseGenerationAlgorithms.cpp:111
Definition EvpackPointGraphLoader.h:12
TerrainStrengthMode
StrengthTransform pass order; source pass 0 named Multiply actually replaces with the curve value.
Definition TerrainMask.h:110
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:49
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:294
void exposeTerrainWorldBindings(ssq::Table &table)
Definition TerrainWorldScript.cpp:111
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:389
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:343
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:351
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 TerrainSurface.cpp:803
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:185
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:67
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:17
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
Result< int > generateTerrainTraversalCosts(Heightmap &target, const Heightmap &heights, const Heightmap &baseCosts, const TerrainTraversalSettings &settings)
Bake a separate terrain cost raster for one actor policy.
Definition TerrainMask.cpp:12
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
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:303
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:50
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:200
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:277
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:365
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
EVENGINE_API_DOMAINS void exposeTerrainStampSettings(ssq::Table &table)
Register stamp settings and mesh-bake builder; VM-thread only, retains no borrowed input.
Definition TerrainStampSettingsScript.cpp:9
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 TerrainSurface.cpp:838
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:230
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:43
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:236
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:111
PcgBiomeLoadMode
Pcg TerrainLoader activation modes retained by a biome controller.
Definition PcgBiomeController.h:9
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:217
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:241
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:111
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:113
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 TerrainDetailLayer.cpp:415
void exposeTerrainWorldCreationBindings(ssq::Table &table)
Definition TerrainWorldScript.cpp:88
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:540
WidgetDesc grid(int columns, std::vector< WidgetDesc > children, std::string id)
Fixed-column grid; children are placed in source order.
Definition Widget.cpp:878
@ InvalidArgument
Engine-neutral description of one generated reflection or light probe.
Definition ProcgenProbeSink.h:14
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
float terrainBDepth
Definition TerrainSplatmap.h:72
float blendStrength
Definition TerrainSplatmap.h:73
float adjacencyTolerance
Definition TerrainSplatmap.h:75
float terrainAWidth
Definition TerrainSplatmap.h:67
float terrainAOriginZ
Definition TerrainSplatmap.h:66
float terrainAOriginX
Definition TerrainSplatmap.h:65
float terrainADepth
Definition TerrainSplatmap.h:68
float terrainBWidth
Definition TerrainSplatmap.h:71
float terrainBOriginZ
Definition TerrainSplatmap.h:70
float terrainBOriginX
Definition TerrainSplatmap.h:69