Data-driven biome distribution rules compatible with PointGraph and scene batches. 更多...
#include <Biome.h>
Public 成员函数 | |
| void | clear () |
| Remove layers and exclusions. | |
| bool | addLayer (const std::string &name, SpatialData *spatial, int priority, float density) |
| Add a named spatial layer. Names are unique. | |
| bool | removeLayer (const std::string &name) |
| Removes layer. | |
| bool | hasLayer (const std::string &name) const |
| True when layer. | |
| int | getLayerCount () const |
| Returns the layer count. | |
| std::string | getLayerName (int index) const |
| Returns the layer name. | |
| int | getLayerPriority (const std::string &name) const |
| Returns the layer priority. | |
| float | getLayerDensity (const std::string &name) const |
| Returns the layer density. | |
| bool | addAsset (const std::string &layerName, const std::string &asset, float weight, float minScale, float maxScale, bool randomYaw) |
| Add a weighted asset rule to a layer. | |
| int | getAssetCount (const std::string &layerName) const |
| Returns the asset count. | |
| std::string | getAssetName (const std::string &layerName, int index) const |
| Returns the asset name. | |
| bool | addExclusion (SpatialData *spatial) |
| Add a copied spatial exclusion shared by every layer. | |
| int | getExclusionCount () const |
| Returns the exclusion count. | |
| PointSet * | generate (SpatialData *domain, float spacing, uint32_t seed, float jitter) |
| Generate attributed biome points. | |
| std::string | getError () const |
| Returns the error. | |
| std::string | debugReport () const |
| Debug report. | |
详细描述
Data-driven biome distribution rules compatible with PointGraph and scene batches.
Candidates are sampled from a caller-provided domain, rejected by exclusion domains, assigned to the highest-priority matching layer, then deterministically select a weighted asset and transform from their independent point seed.
成员函数说明
◆ addAsset()
| bool eve::procgen::BiomeRules::addAsset | ( | const std::string & | layerName, |
| const std::string & | asset, | ||
| float | weight, | ||
| float | minScale, | ||
| float | maxScale, | ||
| bool | randomYaw | ||
| ) |
Add a weighted asset rule to a layer.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ addExclusion()
| bool eve::procgen::BiomeRules::addExclusion | ( | SpatialData * | spatial | ) |
Add a copied spatial exclusion shared by every layer.
引用了 spatial.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ addLayer()
| bool eve::procgen::BiomeRules::addLayer | ( | const std::string & | name, |
| SpatialData * | spatial, | ||
| int | priority, | ||
| float | density | ||
| ) |
Add a named spatial layer. Names are unique.
引用了 hasLayer(), layer, name, eve::procgen::BiomeLayerRule::name, priority , 以及 spatial.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ clear()
| void eve::procgen::BiomeRules::clear | ( | ) |
◆ debugReport()
| std::string eve::procgen::BiomeRules::debugReport | ( | ) | const |
◆ generate()
| PointSet * eve::procgen::BiomeRules::generate | ( | SpatialData * | domain, |
| float | spacing, | ||
| uint32_t | seed, | ||
| float | jitter | ||
| ) |
Generate attributed biome points.
- 返回
- Caller-owned PointSet with
biomeandassetstring attributes.
引用了 eve::procgen::BiomeAssetRule::asset, eve::procgen::BiomeLayerRule::assets, eve::procgen::BiomeLayerRule::density, eve::procgen::ProcgenPoint::density, eve::procgen::PointSet::getCount(), layer, eve::procgen::BiomeAssetRule::maxScale, eve::procgen::BiomeAssetRule::minScale, eve::procgen::BiomeLayerRule::name, output, point, eve::procgen::PointSet::points(), eve::procgen::BiomeLayerRule::priority, eve::procgen::BiomeAssetRule::randomYaw, eve::procgen::SpatialData::sample(), scale, seed, size , 以及 spacing.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ getAssetCount()
| int eve::procgen::BiomeRules::getAssetCount | ( | const std::string & | layerName | ) | const |
◆ getAssetName()
| std::string eve::procgen::BiomeRules::getAssetName | ( | const std::string & | layerName, |
| int | index | ||
| ) | const |
Returns the asset name.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ getError()
| std::string eve::procgen::BiomeRules::getError | ( | ) | const |
◆ getExclusionCount()
| int eve::procgen::BiomeRules::getExclusionCount | ( | ) | const |
◆ getLayerCount()
| int eve::procgen::BiomeRules::getLayerCount | ( | ) | const |
◆ getLayerDensity()
| float eve::procgen::BiomeRules::getLayerDensity | ( | const std::string & | name | ) | const |
Returns the layer density.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ getLayerName()
| std::string eve::procgen::BiomeRules::getLayerName | ( | int | index | ) | const |
◆ getLayerPriority()
| int eve::procgen::BiomeRules::getLayerPriority | ( | const std::string & | name | ) | const |
Returns the layer priority.
被这些函数引用 eve::procgen::exposeBiomeRules().
◆ hasLayer()
| bool eve::procgen::BiomeRules::hasLayer | ( | const std::string & | name | ) | const |
◆ removeLayer()
| bool eve::procgen::BiomeRules::removeLayer | ( | const std::string & | name | ) |
Removes layer.
被这些函数引用 eve::procgen::exposeBiomeRules().
该类的文档由以下文件生成: