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

Caller-owned world-space tree index matching Pcg TreeManager's rectangular queries. @ownership Copies positions and prototype indices; PointSet inputs are borrowed only during calls. @thread Caller-thread affine; methods invoke no callbacks and read no hidden time or RNG. 更多...

#include <PcgTreeManager.h>

Public 成员函数

Result< void > reset (float minimumX, float minimumZ, float width, float depth)
 Atomically reset the index to finite positive world XZ bounds.
 
Result< int > addTree (float worldX, float worldZ, int prototypeIndex)
 Add one tree when its finite position is within the configured half-open world bounds.
 
Result< int > addTrees (const PointSet &trees, int prototypeIndex)
 Atomically append every world-space XZ position from a PointSet under one prototype index.
 
Result< int > countInRange (float worldX, float worldZ, float range) const
 Count trees in the inclusive axis-aligned square centered at XZ with the supplied range.
 
int getCount () const noexcept
 

详细描述

Caller-owned world-space tree index matching Pcg TreeManager's rectangular queries. @ownership Copies positions and prototype indices; PointSet inputs are borrowed only during calls. @thread Caller-thread affine; methods invoke no callbacks and read no hidden time or RNG.

在文件 PcgTreeManager.h 第 15 行定义.

成员函数说明

◆ addTree()

Result< int > eve::procgen::PcgTreeManager::addTree ( float  worldX,
float  worldZ,
int  prototypeIndex 
)

Add one tree when its finite position is within the configured half-open world bounds.

在文件 PcgTreeManager.cpp 第 23 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ addTrees()

Result< int > eve::procgen::PcgTreeManager::addTrees ( const PointSet &  trees,
int  prototypeIndex 
)

Atomically append every world-space XZ position from a PointSet under one prototype index.

在文件 PcgTreeManager.cpp 第 37 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, point, points , 以及 eve::Result< T >::success().

◆ countInRange()

Result< int > eve::procgen::PcgTreeManager::countInRange ( float  worldX,
float  worldZ,
float  range 
) const

Count trees in the inclusive axis-aligned square centered at XZ with the supplied range.

在文件 PcgTreeManager.cpp 第 55 行定义.

引用了 count, eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, range , 以及 eve::Result< T >::success().

◆ getCount()

int eve::procgen::PcgTreeManager::getCount ( ) const
noexcept

在文件 PcgTreeManager.cpp 第 68 行定义.

◆ reset()

Result< void > eve::procgen::PcgTreeManager::reset ( float  minimumX,
float  minimumZ,
float  width,
float  depth 
)

Atomically reset the index to finite positive world XZ bounds.

在文件 PcgTreeManager.cpp 第 12 行定义.

引用了 depth, eve::Diagnostic::error(), eve::Result< T >::failure(), finite, eve::InvalidArgument, eve::Result< T >::success() , 以及 width.


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