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

Owned result of the GTS split-and-sequential-simplify pipeline. 更多...

#include <GtsTerrainLod.h>

Public 成员函数

int getColumnCount () const
 Return the number of tile columns.
 
int getRowCount () const
 Return the number of tile rows.
 
int getTileCount () const
 Return the number of tiles, including empty source cells.
 
int getLevelCount () const
 Return the common number of LOD levels per tile.
 
const GtsTerrainLodTile * tileAt (int index) const
 Return one tile or nullptr for an invalid index. @ownership The LOD set retains ownership; the caller must not delete the pointer. @lifetime Valid until this LOD set is destroyed or replaced.
 
const GtsTerrainLodLevelSettings * levelAt (int index) const
 Return one level setting or nullptr for an invalid index. @ownership The LOD set retains ownership; the caller must not delete the pointer. @lifetime Valid until this LOD set is destroyed or replaced.
 
int selectLevel (float relativeHeight) const
 Select the active level for a projected screen-relative height.
 
float getLevelSwitchDistance (int level, float worldDiameter, float verticalFovDegrees) const
 Convert one level's screen-relative threshold to a perspective-camera distance.
 
int selectLevelForCamera (float distance, float worldDiameter, float verticalFovDegrees) const
 Select a level directly from perspective-camera distance and bounds diameter.
 
Result< std::string > snapshotJson () const
 Serialize the complete owned LOD set as schema-versioned JSON.
 
Result< void > restoreJson (const std::string &json)
 Atomically restore a complete LOD set from strict schema-versioned JSON.
 

友元

EVENGINE_API_DOMAINS Result< GtsTerrainLodSet > buildGtsTerrainLods (const MeshBuild &, int, int, GtsMeshPivot, const std::vector< GtsTerrainLodLevelSettings > &)
 Split a terrain mesh and generate each tile's sequential GTS LOD chain.
 

详细描述

Owned result of the GTS split-and-sequential-simplify pipeline.

在文件 GtsTerrainLod.h 第 112 行定义.

成员函数说明

◆ getColumnCount()

int eve::procgen::GtsTerrainLodSet::getColumnCount ( ) const
inline

Return the number of tile columns.

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

◆ getLevelCount()

int eve::procgen::GtsTerrainLodSet::getLevelCount ( ) const
inline

Return the common number of LOD levels per tile.

在文件 GtsTerrainLod.h 第 121 行定义.

被这些函数引用 eve::asset_procgen::prepareGtsTerrainLodPackage() , 以及 eve::procgen_physics::GtsTerrainColliderRuntime::replace().

◆ getLevelSwitchDistance()

float eve::procgen::GtsTerrainLodSet::getLevelSwitchDistance ( int  level,
float  worldDiameter,
float  verticalFovDegrees 
) const

Convert one level's screen-relative threshold to a perspective-camera distance.

参数
levelLevel index.
worldDiameterWorld-space diameter used by the LOD bounds.
verticalFovDegreesCamera vertical field of view in degrees.
返回
Positive switch distance, or -1 for invalid arguments.

在文件 GtsTerrainLod.cpp 第 161 行定义.

引用了 level , 以及 tangent.

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

◆ getRowCount()

int eve::procgen::GtsTerrainLodSet::getRowCount ( ) const
inline

Return the number of tile rows.

在文件 GtsTerrainLod.h 第 117 行定义.

◆ getTileCount()

int eve::procgen::GtsTerrainLodSet::getTileCount ( ) const
inline

◆ levelAt()

const GtsTerrainLodLevelSettings * eve::procgen::GtsTerrainLodSet::levelAt ( int  index) const

Return one level setting or nullptr for an invalid index. @ownership The LOD set retains ownership; the caller must not delete the pointer. @lifetime Valid until this LOD set is destroyed or replaced.

在文件 GtsTerrainLod.cpp 第 97 行定义.

引用了 index.

◆ restoreJson()

Result< void > eve::procgen::GtsTerrainLodSet::restoreJson ( const std::string &  json)

◆ selectLevel()

int eve::procgen::GtsTerrainLodSet::selectLevel ( float  relativeHeight) const

Select the active level for a projected screen-relative height.

参数
relativeHeightProjected object height divided by viewport height.
返回
Level index, -1 when below the last culling threshold, or -2 for invalid input.

在文件 GtsTerrainLod.cpp 第 154 行定义.

被这些函数引用 selectLevelForCamera().

◆ selectLevelForCamera()

int eve::procgen::GtsTerrainLodSet::selectLevelForCamera ( float  distance,
float  worldDiameter,
float  verticalFovDegrees 
) const

Select a level directly from perspective-camera distance and bounds diameter.

返回
Level index, -1 when culled, or -2 for invalid arguments.

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

引用了 distance , 以及 selectLevel().

◆ snapshotJson()

Result< std::string > eve::procgen::GtsTerrainLodSet::snapshotJson ( ) const

Serialize the complete owned LOD set as schema-versioned JSON.

在文件 GtsTerrainLodCodec.cpp 第 183 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, options, s, settings , 以及 tiles.

◆ tileAt()

const GtsTerrainLodTile * eve::procgen::GtsTerrainLodSet::tileAt ( int  index) const

Return one tile or nullptr for an invalid index. @ownership The LOD set retains ownership; the caller must not delete the pointer. @lifetime Valid until this LOD set is destroyed or replaced.

在文件 GtsTerrainLod.cpp 第 93 行定义.

引用了 index.

被这些函数引用 eve::procgen::Procgen::configureGtsTerrainTileLods(), eve::procgen::planGtsTerrainLodAssets(), eve::asset_procgen::prepareGtsTerrainLodPackage(), eve::procgen::GtsTerrainLodRuntime::replace() , 以及 eve::procgen_physics::GtsTerrainColliderRuntime::replace().

友元及相关函数文档

◆ buildGtsTerrainLods

EVENGINE_API_DOMAINS Result< GtsTerrainLodSet > buildGtsTerrainLods ( const MeshBuild &  ,
int  ,
int  ,
GtsMeshPivot  ,
const std::vector< GtsTerrainLodLevelSettings > &   
)
friend

Split a terrain mesh and generate each tile's sequential GTS LOD chain.

参数
sourceImmutable world-space terrain mesh.
xSplitsNumber of regular X split planes.
zSplitsNumber of regular Z split planes.
pivotLocal pivot convention for every tile.
levelsOrdered near-to-far LOD settings with descending transition heights.
返回
Owned tiles and levels, or a structured error without observable partial state.

在文件 GtsTerrainLod.cpp 第 250 行定义.


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