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()
|
inline |
Return the number of tile columns.
在文件 GtsTerrainLod.h 第 115 行定义.
◆ getLevelCount()
|
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.
- 参数
-
level Level index. worldDiameter World-space diameter used by the LOD bounds. verticalFovDegrees Camera vertical field of view in degrees.
- 返回
- Positive switch distance, or -1 for invalid arguments.
在文件 GtsTerrainLod.cpp 第 161 行定义.
被这些函数引用 eve::procgen::Procgen::configureGtsTerrainTileLods().
◆ getRowCount()
|
inline |
Return the number of tile rows.
在文件 GtsTerrainLod.h 第 117 行定义.
◆ getTileCount()
|
inline |
Return the number of tiles, including empty source cells.
在文件 GtsTerrainLod.h 第 119 行定义.
被这些函数引用 eve::procgen::planGtsTerrainLodAssets(), eve::asset_procgen::prepareGtsTerrainLodPackage(), eve::procgen::GtsTerrainLodRuntime::replace() , 以及 eve::procgen_physics::GtsTerrainColliderRuntime::replace().
◆ 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 | ) |
Atomically restore a complete LOD set from strict schema-versioned JSON.
在文件 GtsTerrainLodCodec.cpp 第 213 行定义.
引用了 columns, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::Value::fromJson(), h, eve::InvalidArgument, eve::procgen::GtsTerrainLodTile::levels, m, eve::procgen::GtsTerrainLodTile::offsetX, eve::procgen::GtsTerrainLodTile::offsetZ, previous, q, root, rows, s, settings, eve::Result< T >::success(), tiles, x , 以及 z.
◆ selectLevel()
| int eve::procgen::GtsTerrainLodSet::selectLevel | ( | float | relativeHeight | ) | const |
Select the active level for a projected screen-relative height.
- 参数
-
relativeHeight Projected 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
|
friend |
Split a terrain mesh and generate each tile's sequential GTS LOD chain.
- 参数
-
source Immutable world-space terrain mesh. xSplits Number of regular X split planes. zSplits Number of regular Z split planes. pivot Local pivot convention for every tile. levels Ordered near-to-far LOD settings with descending transition heights.
- 返回
- Owned tiles and levels, or a structured error without observable partial state.
在文件 GtsTerrainLod.cpp 第 250 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/GtsTerrainLod.h
- src/modules/procgen/GtsTerrainLod.cpp
- src/modules/procgen/GtsTerrainLodCodec.cpp