osgEarth的Rex引擎原理分析(二十五)地形瓦片大小尺寸和LOD的关系

本文探讨osgEarth::TerrainOption中_tileSize(默认17)与LOD(0-23)的关系,以及它们与瓦片像素尺寸_tilePixelSize(默认256)的联系。分析了_tileSize作为瓦片几何网格点数,_tilePixelSize在屏幕像素尺寸模式下的作用。同时介绍了距离模式的两种类型:到眼距离和屏幕像素尺寸,并涉及osgEarth/TerrainOption的构建时间及在RexTerrainEngineNode中的应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

目标:(十八)中的问题55

 

osgEarth::TerrainOption中_tileSize默认大小为17,LOD的默认范围为0-23,这两个值的关系是什么?

还有瓦片的像素尺寸_tilePixelSize默认为256,它和_tileSize有什么关系?

和(二十一)中创建瓦片模型时默认高程网格点数257什么关系

 

_tileSize和_tilePixelSize是这样说明的:

osgEarth/TerrainOptions

/**
 * Size of each dimension of each terrain tile, in verts. Ideally this 
 * will be a power of 2 plus 1, i.e.: a number X with that X = (2^Y)+1
 * where Y is an integer >= 1.
 *
 * Default = 17. 
 */
 optional<int>& tileSize() { return _tileSize; }
 const optional<int>& tileSize() const { return _tileSize; }




/** The size of the tile, in pixels, when using rangeMode = PIXEL_SIZE_ON_SCREEN */
 optional<float>& tilePixelSize() { return _tilePixelSize; }
 const optional<float>& tilePixelSize() const { return _tilePixelSize; }


/**
 * The minimum tile LOD range as a factor of the tile's radius.
 * Default = 7.0.
 */
 optional<float>& minTileRangeFactor() { return _minTileRangeFactor; }
 const optional<float>& minTileRangeFactor() const { return _minTileRangeFactor; }


/**
 * The maximum level of detail to which the terrain should subdivide. If you leave this
 * unset, the terrain will subdivide until the map layers stop providing data (default
 * behavior). If you set a value, the terrain will stop subdividing at the specified LOD
 * even if
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值