载入中...
搜索中...
未找到
eve::procgen::BiomeRules类 参考

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.

在文件 Biome.h 第 40 行定义.

成员函数说明

◆ 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.

在文件 Biome.cpp 第 61 行定义.

引用了 layer , 以及 weight.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ addExclusion()

bool eve::procgen::BiomeRules::addExclusion ( SpatialData *  spatial)

Add a copied spatial exclusion shared by every layer.

在文件 Biome.cpp 第 80 行定义.

引用了 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.

在文件 Biome.cpp 第 28 行定义.

引用了 hasLayer(), layer, name, eve::procgen::BiomeLayerRule::name, priority , 以及 spatial.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ clear()

void eve::procgen::BiomeRules::clear ( )

Remove layers and exclusions.

在文件 Biome.cpp 第 20 行定义.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ debugReport()

std::string eve::procgen::BiomeRules::debugReport ( ) const

Debug report.

在文件 Biome.cpp 第 151 行定义.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ generate()

◆ getAssetCount()

int eve::procgen::BiomeRules::getAssetCount ( const std::string &  layerName) const

Returns the asset count.

在文件 Biome.cpp 第 70 行定义.

引用了 layer.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getAssetName()

std::string eve::procgen::BiomeRules::getAssetName ( const std::string &  layerName,
int  index 
) const

Returns the asset name.

在文件 Biome.cpp 第 74 行定义.

引用了 index , 以及 layer.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getError()

std::string eve::procgen::BiomeRules::getError ( ) const

Returns the error.

在文件 Biome.cpp 第 150 行定义.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getExclusionCount()

int eve::procgen::BiomeRules::getExclusionCount ( ) const

Returns the exclusion count.

在文件 Biome.cpp 第 85 行定义.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getLayerCount()

int eve::procgen::BiomeRules::getLayerCount ( ) const

Returns the layer count.

在文件 Biome.cpp 第 48 行定义.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getLayerDensity()

float eve::procgen::BiomeRules::getLayerDensity ( const std::string &  name) const

Returns the layer density.

在文件 Biome.cpp 第 56 行定义.

引用了 layer , 以及 name.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getLayerName()

std::string eve::procgen::BiomeRules::getLayerName ( int  index) const

Returns the layer name.

在文件 Biome.cpp 第 49 行定义.

引用了 index.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ getLayerPriority()

int eve::procgen::BiomeRules::getLayerPriority ( const std::string &  name) const

Returns the layer priority.

在文件 Biome.cpp 第 52 行定义.

引用了 layer , 以及 name.

被这些函数引用 eve::procgen::exposeBiomeRules().

◆ hasLayer()

bool eve::procgen::BiomeRules::hasLayer ( const std::string &  name) const

True when layer.

在文件 Biome.cpp 第 47 行定义.

引用了 name.

被这些函数引用 addLayer() , 以及 eve::procgen::exposeBiomeRules().

◆ removeLayer()

bool eve::procgen::BiomeRules::removeLayer ( const std::string &  name)

Removes layer.

在文件 Biome.cpp 第 39 行定义.

引用了 found , 以及 layer.

被这些函数引用 eve::procgen::exposeBiomeRules().


该类的文档由以下文件生成: