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

Transactional runtime owner for one row-major batch of GTS terrain tile renderables. 更多...

#include <GtsTerrainLodRuntime.h>

类

struct  Impl
 

Public 成员函数

 GtsTerrainLodRuntime ()
 Gts terrain lod runtime.
 
 ~GtsTerrainLodRuntime ()
 Gts terrain lod runtime.
 
 GtsTerrainLodRuntime (const GtsTerrainLodRuntime &)=delete
 Gts terrain lod runtime.
 
GtsTerrainLodRuntime & operator= (const GtsTerrainLodRuntime &)=delete
 Operator =.
 
Result< std::uint64_t > replace (const GtsTerrainLodSet &lods, Procgen &procgen, graphics::Graphics &gfx, float worldDiameter, float verticalFovDegrees, float originX=0.f, float originY=0.f, float originZ=0.f)
 Replace the complete tile batch after configuring every non-empty candidate.
 
Result< std::uint64_t > replaceAndHideSource (const GtsTerrainLodSet &lods, Procgen &procgen, graphics::Graphics &gfx, graphics::Renderable3D &sourceTerrain, float worldDiameter, float verticalFovDegrees, float originX=0.f, float originY=0.f, float originZ=0.f)
 Replace the mesh batch and hide one source terrain only after successful publication.
 
graphics::Renderable3D * getSourceTerrain () const
 Resolve the currently hidden source terrain, or null after source destruction.
 
Result< int > clear ()
 Destroy every live tile entity and advance the revision.
 
Result< int > applyMaterial (graphics::Material &material)
 Assign one Graphics-owned material to every live tile renderable.
 
int getTileCount () const
 Return the number of row-major tile slots, including empty cells.
 
std::uint64_t getRevision () const
 Return the current committed revision.
 
graphics::Renderable3D * getRenderable (int tileIndex) const
 Borrow a live tile renderable or return nullptr for empty, stale or invalid slots. @ownership The ECS table retains ownership; the caller must not delete the pointer. @lifetime Valid until ECS mutation or the next replace/clear operation.
 

详细描述

Transactional runtime owner for one row-major batch of GTS terrain tile renderables.

在文件 GtsTerrainLodRuntime.h 第 14 行定义.

构造及析构函数说明

◆ GtsTerrainLodRuntime() [1/2]

eve::procgen::GtsTerrainLodRuntime::GtsTerrainLodRuntime ( )

Gts terrain lod runtime.

在文件 GtsTerrainLodRuntime.cpp 第 34 行定义.

◆ ~GtsTerrainLodRuntime()

eve::procgen::GtsTerrainLodRuntime::~GtsTerrainLodRuntime ( )

Gts terrain lod runtime.

在文件 GtsTerrainLodRuntime.cpp 第 35 行定义.

引用了 destroy.

◆ GtsTerrainLodRuntime() [2/2]

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

Gts terrain lod runtime.

成员函数说明

◆ applyMaterial()

Result< int > eve::procgen::GtsTerrainLodRuntime::applyMaterial ( graphics::Material &  material)

Assign one Graphics-owned material to every live tile renderable.

参数
materialBorrowed material that must outlive all configured renderables.
返回
Number of live tile renderables updated.

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

引用了 count, h, material , 以及 eve::Result< T >::success().

◆ clear()

Result< int > eve::procgen::GtsTerrainLodRuntime::clear ( )

Destroy every live tile entity and advance the revision.

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

引用了 count, destroy, h , 以及 eve::Result< T >::success().

◆ getRenderable()

graphics::Renderable3D * eve::procgen::GtsTerrainLodRuntime::getRenderable ( int  tileIndex) const

Borrow a live tile renderable or return nullptr for empty, stale or invalid slots. @ownership The ECS table retains ownership; the caller must not delete the pointer. @lifetime Valid until ECS mutation or the next replace/clear operation.

在文件 GtsTerrainLodRuntime.cpp 第 116 行定义.

引用了 index.

◆ getRevision()

std::uint64_t eve::procgen::GtsTerrainLodRuntime::getRevision ( ) const

Return the current committed revision.

在文件 GtsTerrainLodRuntime.cpp 第 115 行定义.

◆ getSourceTerrain()

graphics::Renderable3D * eve::procgen::GtsTerrainLodRuntime::getSourceTerrain ( ) const

Resolve the currently hidden source terrain, or null after source destruction.

在文件 GtsTerrainLodRuntime.cpp 第 92 行定义.

◆ getTileCount()

int eve::procgen::GtsTerrainLodRuntime::getTileCount ( ) const

Return the number of row-major tile slots, including empty cells.

在文件 GtsTerrainLodRuntime.cpp 第 114 行定义.

◆ operator=()

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

Operator =.

◆ replace()

Result< std::uint64_t > eve::procgen::GtsTerrainLodRuntime::replace ( const GtsTerrainLodSet &  lods,
Procgen &  procgen,
graphics::Graphics &  gfx,
float  worldDiameter,
float  verticalFovDegrees,
float  originX = 0.f,
float  originY = 0.f,
float  originZ = 0.f 
)

Replace the complete tile batch after configuring every non-empty candidate.

返回
New non-zero revision, or a failure that leaves the old batch and revision unchanged. @thread Main/render thread only. @reentrant Not reentrant; no script callbacks are invoked.

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

引用了 eve::procgen::Procgen::configureGtsTerrainTileLods(), destroy, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::procgen::GtsTerrainLodSet::getTileCount(), h, ox, oy, eve::Result< T >::success() , 以及 eve::procgen::GtsTerrainLodSet::tileAt().

被这些函数引用 replaceAndHideSource().

◆ replaceAndHideSource()

Result< std::uint64_t > eve::procgen::GtsTerrainLodRuntime::replaceAndHideSource ( const GtsTerrainLodSet &  lods,
Procgen &  procgen,
graphics::Graphics &  gfx,
graphics::Renderable3D &  sourceTerrain,
float  worldDiameter,
float  verticalFovDegrees,
float  originX = 0.f,
float  originY = 0.f,
float  originZ = 0.f 
)

Replace the mesh batch and hide one source terrain only after successful publication.

参数
sourceTerrainBorrowed ECS terrain renderable; its entering visibility is restored by clear or teardown.
返回
New revision, or a failure leaving both the old batch and source visibility unchanged. @thread Main/render thread only; no callbacks or scripts are invoked.

在文件 GtsTerrainLodRuntime.cpp 第 71 行定义.

引用了 eve::Diagnostic::error(), handle, eve::InvalidArgument, ox, oy, replace() , 以及 source.


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