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

View-driven partition and hierarchical procedural generation scheduler. 更多...

#include <RuntimeGeneration.h>

Public 成员函数

 RuntimeGeneration (uint32_t worldSeed=1)
 Create a scheduler with a stable world seed.
 
 RuntimeGeneration (const RuntimeGeneration &)=delete
 
RuntimeGeneration & operator= (const RuntimeGeneration &)=delete
 
 RuntimeGeneration (RuntimeGeneration &&)=delete
 
RuntimeGeneration & operator= (RuntimeGeneration &&)=delete
 
void clear ()
 Remove levels, cells, queues and outputs while retaining the world seed.
 
int addLevel (float cellSize, float generationRadius, float cleanupMultiplier)
 Add a hierarchical grid level.
 
int getLevelCount () const
 Returns the level count.
 
float getLevelCellSize (int level) const
 Returns the level cell size.
 
float getLevelGenerationRadius (int level) const
 Returns the level generation radius.
 
float getLevelCleanupRadius (int level) const
 Returns the level cleanup radius.
 
void setDirectionWeight (float weight)
 Weight favoring cells in front of the source, clamped to [0,1].
 
float getDirectionWeight () const
 Returns the direction weight.
 
void setMaxGenerating (int count)
 Maximum simultaneously issued generation requests.
 
int getMaxGenerating () const
 Returns the max generating.
 
void setMaxActiveCells (int count)
 Maximum active plus in-flight cells; zero disables the resident-cell limit.
 
int getMaxActiveCells () const
 Return the resident-cell limit, or zero when unlimited.
 
void setMaxPointsPerCell (int count)
 Set the maximum points allowed in one generated cell; zero disables the limit.
 
int getMaxPointsPerCell () const
 Return the per-cell point limit, or zero when unlimited.
 
void setMaxResidentPoints (int count)
 Set the total point limit across active cell outputs; zero disables the limit.
 
int getMaxResidentPoints () const
 Return the total resident-point limit, or zero when unlimited.
 
int getResidentPointCount () const
 Return points retained by active or not-yet-acknowledged cleanup cells.
 
int getRejectedOutputCount () const
 Return generation or restore outputs rejected by point budgets.
 
int trimToResidentPoints (int target)
 Schedule lowest-priority active cells for cleanup until at most target points remain.
 
void setMaxGenerationRetries (int count)
 Set retries after the initial generation attempt; zero fails immediately.
 
int getMaxGenerationRetries () const
 Return retries allowed after the initial generation attempt.
 
void setFrameTimeBudget (float milliseconds)
 CPU issue budget in milliseconds for one frame; zero disables the limit.
 
float getFrameTimeBudget () const
 Returns the frame time budget.
 
void beginFrame ()
 Start a new budget window before consuming generation requests.
 
void setRefreshWorkBudget (int candidateCells)
 Limit source-refresh planning work performed by one call.
 
int getRefreshWorkBudget () const
 Return the per-call source-refresh candidate budget, or zero when synchronous.
 
bool isRefreshPending () const
 Return whether a staged source snapshot still needs planning work.
 
uint64_t getCommittedRefreshRevision () const
 Return the latest source revision atomically published into generation and cleanup queues.
 
Result< uint64_t > continueGenerationRefresh ()
 Advance a budgeted source refresh without changing the requested sources.
 
void updateSource (float x, float z, float directionX, float directionZ)
 Recompute desired cells for a generation source.
 
bool setGenerationSource (const std::string &id, float x, float z, float directionX, float directionZ, float radiusScale=1.f)
 Add or update a named generation source, then rebuild desired cells.
 
bool removeGenerationSource (const std::string &id)
 Removes generation source.
 
void clearGenerationSources ()
 Clears generation sources.
 
int getGenerationSourceCount () const
 Returns the generation source count.
 
std::string getGenerationSourceId (int index) const
 Returns the generation source id.
 
void refreshGenerationSources ()
 Re-evaluate generation/cleanup queues from every registered source.
 
void setFrustumCulling (bool enabled, float halfAngleDegrees, float behindRadius)
 Enable view-cone scheduling.
 
bool isFrustumCullingEnabled () const
 True when frustum culling enabled.
 
float getFrustumHalfAngle () const
 Returns the frustum half angle.
 
float getFrustumBehindRadius () const
 Returns the frustum behind radius.
 
int getPendingGenerateCount () const
 Returns the pending generate count.
 
int getGeneratingCount () const
 Returns the generating count.
 
int getActiveCellCount () const
 Returns the active cell count.
 
int getPendingCleanupCount () const
 Returns the pending cleanup count.
 
int getCancelledGenerationCount () const
 Return issued generation requests invalidated before completion.
 
int getFailedCellCount () const
 Return cells stopped after exhausting the generation retry policy.
 
int retryFailedCells ()
 Reset and requeue all terminally failed cells still tracked by the scheduler.
 
Result< std::optional< ProcgenGenerationJob > > nextGenerationJob ()
 Issue one owning worker job, or an empty optional when no work is currently admissible.
 
Result< uint64_t > completeGenerationJob (ProcgenGenerationCompletion completion)
 Atomically publish an owning worker completion.
 
Result< void > failGenerationJob (const ProcgenGenerationJob &job)
 Report an issued job failure and apply the bounded retry policy.
 
Result< std::optional< ProcgenCellRequest > > nextCleanupRequest ()
 Claim an owning cleanup ticket, or an empty optional when no cleanup is pending.
 
Result< uint64_t > completeCleanupRequest (const ProcgenCellRequest &request)
 Commit one cleanup ticket after consumers have removed its generated content.
 
bool isOwnerThread () const noexcept
 Return whether the caller is the thread that constructed this scheduler.
 
ProcgenCellRequest * nextGenerate ()
 Compatibility facade returning a heap request; prefer nextGenerationJob().
 
ProcgenCellRequest * nextCleanup ()
 Compatibility-only heap projection of nextCleanupRequest; caller owns the returned request.
 
bool isRequestCurrent (const ProcgenCellRequest *request) const
 Test whether an issued generation or cleanup request still owns its scheduler ticket.
 
bool completeGeneration (ProcgenCellRequest *request, PointSet *output)
 Compatibility-only bool projection of completeGenerationJob; request and output are borrowed.
 
bool failGeneration (ProcgenCellRequest *request)
 Compatibility-only bool projection of failGenerationJob; request is borrowed.
 
bool completeCleanup (ProcgenCellRequest *request)
 Compatibility-only bool projection of completeCleanupsAtomic; request is borrowed.
 
Result< uint64_t > completeCleanupsAtomic (const std::vector< const ProcgenCellRequest * > &requests)
 Atomically acknowledge several cleanup tickets owned by this scheduler.
 
bool hasCell (int level, int x, int z) const
 
PointSet * getCellOutput (int level, int x, int z) const
 Returns the cell output.
 
uint64_t getCellRevision (int level, int x, int z) const
 Returns the cell revision.
 
Result< uint64_t > applyCellUpdate (int level, int x, int z, uint64_t expectedRevision, const PointSet &output)
 Atomically replace an active cell through an identity-based delta.
 
Result< uint64_t > migrateCellPointIds (int level, int x, int z, uint64_t expectedRevision)
 Assign deterministic identities to a legacy active cell atomically.
 
PointDelta * getCellDelta (int level, int x, int z) const
 Return a caller-owned copy of the latest committed delta, or null when unavailable. @ownership Owned; the caller must delete the returned delta. Script bindings transfer ownership to the VM.
 
std::string serializeCell (int level, int x, int z) const
 Serialize one active cell cache entry in a deterministic versioned format.
 
bool deserializeCell (const std::string &definition)
 Atomically restore one cell produced by serializeCell for this world seed.
 
std::string debugReport () const
 Debug report.
 

友元

class Procgen
 

详细描述

View-driven partition and hierarchical procedural generation scheduler.

updateSource computes desired cells for every configured level. nextGenerate and nextCleanup provide bounded work queues; completeGeneration atomically publishes a cell output. The scheduler owns no scene or graphics objects. All state access is owner-thread-only. Only jobs and completions may cross worker boundaries; their private process-local identity is never serialized. Destroying the scheduler does not invalidate owning worker data, but its jobs cannot be committed to a replacement scheduler. No callbacks are invoked.

在文件 RuntimeGeneration.h 第 115 行定义.

构造及析构函数说明

◆ RuntimeGeneration() [1/3]

eve::procgen::RuntimeGeneration::RuntimeGeneration ( uint32_t  worldSeed = 1)
explicit

Create a scheduler with a stable world seed.

在文件 RuntimeGeneration.cpp 第 57 行定义.

◆ RuntimeGeneration() [2/3]

eve::procgen::RuntimeGeneration::RuntimeGeneration ( const RuntimeGeneration &  )
delete

◆ RuntimeGeneration() [3/3]

eve::procgen::RuntimeGeneration::RuntimeGeneration ( RuntimeGeneration &&  )
delete

成员函数说明

◆ addLevel()

int eve::procgen::RuntimeGeneration::addLevel ( float  cellSize,
float  generationRadius,
float  cleanupMultiplier 
)

Add a hierarchical grid level.

参数
cellSizeWorld-space XZ cell size.
generationRadiusDistance around the source that requests generation.
cleanupMultiplierCleanup radius divided by generation radius; must be at least 1.
返回
Level index, or -1 for invalid settings.

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

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

◆ applyCellUpdate()

Result< uint64_t > eve::procgen::RuntimeGeneration::applyCellUpdate ( int  level,
int  x,
int  z,
uint64_t  expectedRevision,
const PointSet &  output 
)

Atomically replace an active cell through an identity-based delta.

参数
expectedRevisionExact active revision observed by the caller.
outputComplete desired snapshot whose points have unique non-zero ids.
返回
The committed revision, or a structured stale/schema/budget failure.

在文件 RuntimeGeneration.cpp 第 644 行定义.

引用了 eve::procgen::applyPointDelta(), eve::Conflict, eve::procgen::diffPointSets(), eve::Diagnostic::error(), eve::Result< T >::failure(), found, getResidentPointCount(), level, eve::NotFound, output, eve::PreconditionViolation, eve::Result< T >::success(), x , 以及 z.

◆ beginFrame()

void eve::procgen::RuntimeGeneration::beginFrame ( )

Start a new budget window before consuming generation requests.

在文件 RuntimeGeneration.cpp 第 160 行定义.

引用了 count.

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

◆ clear()

void eve::procgen::RuntimeGeneration::clear ( )

Remove levels, cells, queues and outputs while retaining the world seed.

在文件 RuntimeGeneration.cpp 第 64 行定义.

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

◆ clearGenerationSources()

void eve::procgen::RuntimeGeneration::clearGenerationSources ( )

Clears generation sources.

在文件 RuntimeGeneration.cpp 第 209 行定义.

引用了 refreshGenerationSources().

◆ completeCleanup()

bool eve::procgen::RuntimeGeneration::completeCleanup ( ProcgenCellRequest *  request)

Compatibility-only bool projection of completeCleanupsAtomic; request is borrowed.

在文件 RuntimeGeneration.cpp 第 583 行定义.

引用了 completeCleanupsAtomic() , 以及 request.

◆ completeCleanupRequest()

Result< uint64_t > eve::procgen::RuntimeGeneration::completeCleanupRequest ( const ProcgenCellRequest &  request)

Commit one cleanup ticket after consumers have removed its generated content.

参数
requestOwning ticket borrowed only for this call; never retained.
返回
Erased cell count or structured stale/foreign/thread failure without mutation. @thread Scheduler-owning thread only; not reentrant. No callbacks are invoked.

在文件 RuntimeGeneration.cpp 第 542 行定义.

引用了 completeCleanupsAtomic() , 以及 request.

◆ completeCleanupsAtomic()

Result< uint64_t > eve::procgen::RuntimeGeneration::completeCleanupsAtomic ( const std::vector< const ProcgenCellRequest * > &  requests)

Atomically acknowledge several cleanup tickets owned by this scheduler.

参数
requestsNon-empty unique cleanup requests.
返回
Number of erased cells, or a structured failure with no cell changed. @ownership Request references are borrowed only for this call and are not retained.

@thread Call synchronously on the scheduler-owning thread. @reentrant Not reentrant for this RuntimeGeneration.

在文件 RuntimeGeneration.cpp 第 589 行定义.

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

被这些函数引用 completeCleanup() , 以及 completeCleanupRequest().

◆ completeGeneration()

bool eve::procgen::RuntimeGeneration::completeGeneration ( ProcgenCellRequest *  request,
PointSet *  output 
)

Compatibility-only bool projection of completeGenerationJob; request and output are borrowed.

在文件 RuntimeGeneration.cpp 第 555 行定义.

引用了 completeGenerationJob(), output , 以及 request.

◆ completeGenerationJob()

Result< uint64_t > eve::procgen::RuntimeGeneration::completeGenerationJob ( ProcgenGenerationCompletion  completion)

Atomically publish an owning worker completion.

参数
completionJob identity and generated output, both consumed by this call.
返回
New cell revision, or structured stale/thread/budget failure. @thread Scheduler-owning thread only; workers must enqueue the completion for its owner. @reentrant Not reentrant for this RuntimeGeneration.

在文件 RuntimeGeneration.cpp 第 483 行定义.

引用了 cell, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::procgen::PointSet::getCount(), getResidentPointCount(), eve::InvalidArgument, eve::Result< T >::success() , 以及 trimToResidentPoints().

被这些函数引用 completeGeneration().

◆ continueGenerationRefresh()

Result< uint64_t > eve::procgen::RuntimeGeneration::continueGenerationRefresh ( )

Advance a budgeted source refresh without changing the requested sources.

返回
Candidate cells examined in this call; query isRefreshPending to distinguish completion. @thread Call synchronously on the scheduler-owning thread.

在文件 RuntimeGeneration.cpp 第 173 行定义.

引用了 eve::Result< T >::success().

◆ debugReport()

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

◆ deserializeCell()

◆ failGeneration()

bool eve::procgen::RuntimeGeneration::failGeneration ( ProcgenCellRequest *  request)

Compatibility-only bool projection of failGenerationJob; request is borrowed.

在文件 RuntimeGeneration.cpp 第 569 行定义.

引用了 failGenerationJob() , 以及 request.

◆ failGenerationJob()

Result< void > eve::procgen::RuntimeGeneration::failGenerationJob ( const ProcgenGenerationJob &  job)

Report an issued job failure and apply the bounded retry policy.

参数
jobImmutable copy of the issued job.
返回
Success when the matching ticket was requeued or made terminal. @thread Scheduler-owning thread only. @reentrant Not reentrant for this RuntimeGeneration.

在文件 RuntimeGeneration.cpp 第 504 行定义.

引用了 cell, eve::Result< T >::failure() , 以及 eve::Result< T >::success().

被这些函数引用 failGeneration().

◆ getActiveCellCount()

int eve::procgen::RuntimeGeneration::getActiveCellCount ( ) const

Returns the active cell count.

在文件 RuntimeGeneration.cpp 第 399 行定义.

被这些函数引用 debugReport() , 以及 deserializeCell().

◆ getCancelledGenerationCount()

int eve::procgen::RuntimeGeneration::getCancelledGenerationCount ( ) const

Return issued generation requests invalidated before completion.

在文件 RuntimeGeneration.cpp 第 401 行定义.

◆ getCellDelta()

PointDelta * eve::procgen::RuntimeGeneration::getCellDelta ( int  level,
int  x,
int  z 
) const

Return a caller-owned copy of the latest committed delta, or null when unavailable. @ownership Owned; the caller must delete the returned delta. Script bindings transfer ownership to the VM.

返回
A heap object owned by the caller; script bindings transfer ownership to the VM.

在文件 RuntimeGeneration.cpp 第 698 行定义.

引用了 found, level, x , 以及 z.

◆ getCellOutput()

PointSet * eve::procgen::RuntimeGeneration::getCellOutput ( int  level,
int  x,
int  z 
) const

Returns the cell output.

在文件 RuntimeGeneration.cpp 第 632 行定义.

引用了 found, level, x , 以及 z.

◆ getCellRevision()

uint64_t eve::procgen::RuntimeGeneration::getCellRevision ( int  level,
int  x,
int  z 
) const

Returns the cell revision.

在文件 RuntimeGeneration.cpp 第 639 行定义.

引用了 found, level, x , 以及 z.

◆ getCommittedRefreshRevision()

uint64_t eve::procgen::RuntimeGeneration::getCommittedRefreshRevision ( ) const

Return the latest source revision atomically published into generation and cleanup queues.

在文件 RuntimeGeneration.cpp 第 172 行定义.

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

◆ getDirectionWeight()

float eve::procgen::RuntimeGeneration::getDirectionWeight ( ) const

Returns the direction weight.

在文件 RuntimeGeneration.cpp 第 102 行定义.

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

◆ getFailedCellCount()

int eve::procgen::RuntimeGeneration::getFailedCellCount ( ) const

Return cells stopped after exhausting the generation retry policy.

在文件 RuntimeGeneration.cpp 第 402 行定义.

被这些函数引用 debugReport().

◆ getFrameTimeBudget()

float eve::procgen::RuntimeGeneration::getFrameTimeBudget ( ) const

Returns the frame time budget.

在文件 RuntimeGeneration.cpp 第 159 行定义.

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

◆ getFrustumBehindRadius()

float eve::procgen::RuntimeGeneration::getFrustumBehindRadius ( ) const

Returns the frustum behind radius.

在文件 RuntimeGeneration.cpp 第 230 行定义.

◆ getFrustumHalfAngle()

float eve::procgen::RuntimeGeneration::getFrustumHalfAngle ( ) const

Returns the frustum half angle.

在文件 RuntimeGeneration.cpp 第 229 行定义.

◆ getGeneratingCount()

int eve::procgen::RuntimeGeneration::getGeneratingCount ( ) const

Returns the generating count.

在文件 RuntimeGeneration.cpp 第 398 行定义.

被这些函数引用 debugReport() , 以及 deserializeCell().

◆ getGenerationSourceCount()

int eve::procgen::RuntimeGeneration::getGenerationSourceCount ( ) const

Returns the generation source count.

在文件 RuntimeGeneration.cpp 第 215 行定义.

◆ getGenerationSourceId()

std::string eve::procgen::RuntimeGeneration::getGenerationSourceId ( int  index) const

Returns the generation source id.

在文件 RuntimeGeneration.cpp 第 216 行定义.

引用了 index.

◆ getLevelCellSize()

float eve::procgen::RuntimeGeneration::getLevelCellSize ( int  level) const

Returns the level cell size.

在文件 RuntimeGeneration.cpp 第 87 行定义.

引用了 level.

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

◆ getLevelCleanupRadius()

float eve::procgen::RuntimeGeneration::getLevelCleanupRadius ( int  level) const

Returns the level cleanup radius.

在文件 RuntimeGeneration.cpp 第 95 行定义.

引用了 level.

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

◆ getLevelCount()

int eve::procgen::RuntimeGeneration::getLevelCount ( ) const

Returns the level count.

在文件 RuntimeGeneration.cpp 第 86 行定义.

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

◆ getLevelGenerationRadius()

float eve::procgen::RuntimeGeneration::getLevelGenerationRadius ( int  level) const

Returns the level generation radius.

在文件 RuntimeGeneration.cpp 第 90 行定义.

引用了 level.

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

◆ getMaxActiveCells()

int eve::procgen::RuntimeGeneration::getMaxActiveCells ( ) const

Return the resident-cell limit, or zero when unlimited.

在文件 RuntimeGeneration.cpp 第 106 行定义.

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

◆ getMaxGenerating()

int eve::procgen::RuntimeGeneration::getMaxGenerating ( ) const

Returns the max generating.

在文件 RuntimeGeneration.cpp 第 104 行定义.

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

◆ getMaxGenerationRetries()

int eve::procgen::RuntimeGeneration::getMaxGenerationRetries ( ) const

Return retries allowed after the initial generation attempt.

在文件 RuntimeGeneration.cpp 第 155 行定义.

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

◆ getMaxPointsPerCell()

int eve::procgen::RuntimeGeneration::getMaxPointsPerCell ( ) const

Return the per-cell point limit, or zero when unlimited.

在文件 RuntimeGeneration.cpp 第 108 行定义.

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

◆ getMaxResidentPoints()

int eve::procgen::RuntimeGeneration::getMaxResidentPoints ( ) const

Return the total resident-point limit, or zero when unlimited.

在文件 RuntimeGeneration.cpp 第 112 行定义.

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

◆ getPendingCleanupCount()

int eve::procgen::RuntimeGeneration::getPendingCleanupCount ( ) const

Returns the pending cleanup count.

在文件 RuntimeGeneration.cpp 第 400 行定义.

◆ getPendingGenerateCount()

int eve::procgen::RuntimeGeneration::getPendingGenerateCount ( ) const

Returns the pending generate count.

在文件 RuntimeGeneration.cpp 第 397 行定义.

◆ getRefreshWorkBudget()

int eve::procgen::RuntimeGeneration::getRefreshWorkBudget ( ) const

Return the per-call source-refresh candidate budget, or zero when synchronous.

在文件 RuntimeGeneration.cpp 第 170 行定义.

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

◆ getRejectedOutputCount()

int eve::procgen::RuntimeGeneration::getRejectedOutputCount ( ) const

Return generation or restore outputs rejected by point budgets.

在文件 RuntimeGeneration.cpp 第 119 行定义.

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

◆ getResidentPointCount()

int eve::procgen::RuntimeGeneration::getResidentPointCount ( ) const

Return points retained by active or not-yet-acknowledged cleanup cells.

在文件 RuntimeGeneration.cpp 第 113 行定义.

引用了 cell, count , 以及 key.

被这些函数引用 applyCellUpdate(), completeGenerationJob(), debugReport(), deserializeCell() , 以及 eve::procgen::exposeRuntimeGeneration().

◆ hasCell()

bool eve::procgen::RuntimeGeneration::hasCell ( int  level,
int  x,
int  z 
) const

在文件 RuntimeGeneration.cpp 第 627 行定义.

引用了 found, level, x , 以及 z.

◆ isFrustumCullingEnabled()

bool eve::procgen::RuntimeGeneration::isFrustumCullingEnabled ( ) const

True when frustum culling enabled.

在文件 RuntimeGeneration.cpp 第 228 行定义.

◆ isOwnerThread()

bool eve::procgen::RuntimeGeneration::isOwnerThread ( ) const
noexcept

Return whether the caller is the thread that constructed this scheduler.

在文件 RuntimeGeneration.cpp 第 62 行定义.

被这些函数引用 completeCleanupsAtomic(), isRequestCurrent(), nextCleanupRequest() , 以及 nextGenerationJob().

◆ isRefreshPending()

bool eve::procgen::RuntimeGeneration::isRefreshPending ( ) const

Return whether a staged source snapshot still needs planning work.

在文件 RuntimeGeneration.cpp 第 171 行定义.

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

◆ isRequestCurrent()

bool eve::procgen::RuntimeGeneration::isRequestCurrent ( const ProcgenCellRequest *  request) const

Test whether an issued generation or cleanup request still owns its scheduler ticket.

参数
requestBorrowed immutable request; null is never current.
返回
True while the matching cell, state and ticket still accept work for this request. @thread Call on the scheduler-owning thread between cooperative generation stages.

在文件 RuntimeGeneration.cpp 第 546 行定义.

引用了 found, isOwnerThread(), key , 以及 request.

◆ migrateCellPointIds()

Result< uint64_t > eve::procgen::RuntimeGeneration::migrateCellPointIds ( int  level,
int  x,
int  z,
uint64_t  expectedRevision 
)

Assign deterministic identities to a legacy active cell atomically.

返回
The committed revision; no revision is consumed when validation fails.

在文件 RuntimeGeneration.cpp 第 677 行定义.

引用了 eve::procgen::PointSet::assignPointIds(), eve::Conflict, eve::procgen::derivePointId(), eve::Diagnostic::error(), eve::Result< T >::failure(), found, key, level, eve::NotFound, eve::Result< T >::success(), x , 以及 z.

◆ nextCleanup()

ProcgenCellRequest * eve::procgen::RuntimeGeneration::nextCleanup ( )

Compatibility-only heap projection of nextCleanupRequest; caller owns the returned request.

在文件 RuntimeGeneration.cpp 第 520 行定义.

引用了 nextCleanupRequest() , 以及 request.

◆ nextCleanupRequest()

Result< std::optional< ProcgenCellRequest > > eve::procgen::RuntimeGeneration::nextCleanupRequest ( )

Claim an owning cleanup ticket, or an empty optional when no cleanup is pending.

返回
Independent request value or a structured wrong-thread diagnostic. @thread Scheduler-owning thread only; not reentrant. No callbacks are invoked. @ownership Copies survive scheduler destruction, but cannot commit to another scheduler.

在文件 RuntimeGeneration.cpp 第 527 行定义.

引用了 eve::Conflict, eve::Diagnostic::error(), found, isOwnerThread() , 以及 key.

被这些函数引用 nextCleanup().

◆ nextGenerate()

ProcgenCellRequest * eve::procgen::RuntimeGeneration::nextGenerate ( )

Compatibility facade returning a heap request; prefer nextGenerationJob().

在文件 RuntimeGeneration.cpp 第 422 行定义.

引用了 nextGenerationJob() , 以及 request.

◆ nextGenerationJob()

Result< std::optional< ProcgenGenerationJob > > eve::procgen::RuntimeGeneration::nextGenerationJob ( )

Issue one owning worker job, or an empty optional when no work is currently admissible.

返回
Job query result; failure means the call was made off the scheduler-owning thread. @thread Scheduler-owning thread only. @reentrant Not reentrant for this RuntimeGeneration.

在文件 RuntimeGeneration.cpp 第 459 行定义.

引用了 eve::Conflict, eve::Diagnostic::error() , 以及 isOwnerThread().

被这些函数引用 nextGenerate().

◆ operator=() [1/2]

RuntimeGeneration & eve::procgen::RuntimeGeneration::operator= ( const RuntimeGeneration &  )
delete

◆ operator=() [2/2]

RuntimeGeneration & eve::procgen::RuntimeGeneration::operator= ( RuntimeGeneration &&  )
delete

◆ refreshGenerationSources()

void eve::procgen::RuntimeGeneration::refreshGenerationSources ( )

Re-evaluate generation/cleanup queues from every registered source.

在文件 RuntimeGeneration.cpp 第 232 行定义.

被这些函数引用 clearGenerationSources(), removeGenerationSource(), setFrustumCulling() , 以及 setGenerationSource().

◆ removeGenerationSource()

bool eve::procgen::RuntimeGeneration::removeGenerationSource ( const std::string &  id)

Removes generation source.

在文件 RuntimeGeneration.cpp 第 201 行定义.

引用了 refreshGenerationSources().

◆ retryFailedCells()

int eve::procgen::RuntimeGeneration::retryFailedCells ( )

Reset and requeue all terminally failed cells still tracked by the scheduler.

在文件 RuntimeGeneration.cpp 第 408 行定义.

引用了 cell, count , 以及 key.

◆ serializeCell()

std::string eve::procgen::RuntimeGeneration::serializeCell ( int  level,
int  x,
int  z 
) const

Serialize one active cell cache entry in a deterministic versioned format.

在文件 RuntimeGenerationAsset.cpp 第 11 行定义.

引用了 eve::procgen::Bool, column, eve::procgen::Float, found, index, eve::procgen::Int, level, name, point, points, eve::procgen::String, value, eve::procgen::Vector, x , 以及 z.

◆ setDirectionWeight()

void eve::procgen::RuntimeGeneration::setDirectionWeight ( float  weight)

Weight favoring cells in front of the source, clamped to [0,1].

在文件 RuntimeGeneration.cpp 第 99 行定义.

引用了 weight.

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

◆ setFrameTimeBudget()

void eve::procgen::RuntimeGeneration::setFrameTimeBudget ( float  milliseconds)

CPU issue budget in milliseconds for one frame; zero disables the limit.

在文件 RuntimeGeneration.cpp 第 156 行定义.

引用了 milliseconds.

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

◆ setFrustumCulling()

void eve::procgen::RuntimeGeneration::setFrustumCulling ( bool  enabled,
float  halfAngleDegrees,
float  behindRadius 
)

Enable view-cone scheduling.

参数
halfAngleDegreesHorizontal cone half angle in [1,180].
behindRadiusCells nearer than this distance generate even outside the cone.

在文件 RuntimeGeneration.cpp 第 221 行定义.

引用了 enabled , 以及 refreshGenerationSources().

◆ setGenerationSource()

bool eve::procgen::RuntimeGeneration::setGenerationSource ( const std::string &  id,
float  x,
float  z,
float  directionX,
float  directionZ,
float  radiusScale = 1.f 
)

Add or update a named generation source, then rebuild desired cells.

在文件 RuntimeGeneration.cpp 第 184 行定义.

引用了 id, refreshGenerationSources(), source, x , 以及 z.

被这些函数引用 updateSource().

◆ setMaxActiveCells()

void eve::procgen::RuntimeGeneration::setMaxActiveCells ( int  count)

Maximum active plus in-flight cells; zero disables the resident-cell limit.

在文件 RuntimeGeneration.cpp 第 105 行定义.

引用了 count.

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

◆ setMaxGenerating()

void eve::procgen::RuntimeGeneration::setMaxGenerating ( int  count)

Maximum simultaneously issued generation requests.

在文件 RuntimeGeneration.cpp 第 103 行定义.

引用了 count.

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

◆ setMaxGenerationRetries()

void eve::procgen::RuntimeGeneration::setMaxGenerationRetries ( int  count)

Set retries after the initial generation attempt; zero fails immediately.

在文件 RuntimeGeneration.cpp 第 152 行定义.

引用了 count.

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

◆ setMaxPointsPerCell()

void eve::procgen::RuntimeGeneration::setMaxPointsPerCell ( int  count)

Set the maximum points allowed in one generated cell; zero disables the limit.

在文件 RuntimeGeneration.cpp 第 107 行定义.

引用了 count.

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

◆ setMaxResidentPoints()

void eve::procgen::RuntimeGeneration::setMaxResidentPoints ( int  count)

Set the total point limit across active cell outputs; zero disables the limit.

在文件 RuntimeGeneration.cpp 第 109 行定义.

引用了 count.

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

◆ setRefreshWorkBudget()

void eve::procgen::RuntimeGeneration::setRefreshWorkBudget ( int  candidateCells)

Limit source-refresh planning work performed by one call.

参数
candidateCellsBounding-grid candidates examined per call; zero preserves synchronous refresh.

A positive budget stages desired cells without changing published queues until one complete source snapshot commits. Source changes arriving during a plan are coalesced into a later snapshot instead of restarting it.

在文件 RuntimeGeneration.cpp 第 166 行定义.

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

◆ trimToResidentPoints()

int eve::procgen::RuntimeGeneration::trimToResidentPoints ( int  target)

Schedule lowest-priority active cells for cleanup until at most target points remain.

返回
Number of cells newly scheduled for cleanup.

在文件 RuntimeGeneration.cpp 第 120 行定义.

引用了 a, b, cell, key, scheduled , 以及 target.

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

◆ updateSource()

void eve::procgen::RuntimeGeneration::updateSource ( float  x,
float  z,
float  directionX,
float  directionZ 
)

Recompute desired cells for a generation source.

参数
x,zWorld position.
directionX,directionZHorizontal view direction; zero disables direction priority.

在文件 RuntimeGeneration.cpp 第 180 行定义.

引用了 setGenerationSource(), x , 以及 z.

友元及相关函数文档

◆ Procgen

friend class Procgen
friend

在文件 RuntimeGeneration.h 第 358 行定义.


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