目标:(八十)中的问题158
在加载高程图像后,除了设置渲染纹理外还设置了高程栅格,如下:
osgEarthDrivers/engine_rex/TileNode.cpp
void
TileNode::merge(const TerrainTileModel* model, const RenderBindings& bindings)
{
// Elevation:
const SamplerBinding& elevation = bindings[SamplerBinding::ELEVATION];
if (elevation.isActive() && model->elevationModel().valid() && model->elevationModel()->getTexture())
{
osg::Texture* tex = model->elevationModel()->getTexture();
// always keep the elevation image around because we use it for bounding box computation:
tex->setUnRefImageDataAfterApply(false);
_renderModel._sharedSamplers[SamplerBinding::ELEVATION]._texture = tex;
_renderModel._sharedSamplers[SamplerBinding::ELEVATION]._matrix.makeIdentity();
setElevationRaster(tex->getImage(0), osg::Matrixf::identity());
newElevationData = true;
}
}
设置高程纹理是为了渲染绘制,设置高程网格是为了分析计算,目的是不一样的。
待继续分析列表:
9、earth文件中都有哪些options((九)中问题)
10、如何根据earth文件options创建不同的地理信息引擎节点((九)中问题)
11、rex地理信息引擎的四梁八柱((九)中问题)
12、osgEarth::TerrainEngineNode中setMap方法作用((十二)中问题)
13、RexTerrainEngineNode中_mapFrame的作用((十二)中问题)
14、地形变形(Terrain morphing)((十二)中问题)
15、地球瓦片过期门限的含义((十二)中问题)
16、高分辨率优先的含义((十二)中问题)
17、OSGEARTH_DEBUG_NORMALS环境变量的作用((十二)中问题)
18、活跃瓦片寄存器的作用((十二)中问题)
19、资源释放器子节点的作用((十二)中问题)
20、共享几何图形池子节点的作用((十二)中问题)
21、分页瓦片加载器子节点的作用((十二)中问题)
22、分页瓦片卸载器子节点的作用((十二)中问题)
23、栅格化器子节点的作用((十二)中问题)
24、地形子节点的作用((十二)中问题)
25、绑定渲染器的作用((十二)中问题)
26、地图回调函数的作用((十二)中问题)
27、如何将地图图层添加到rex引擎中((十二)中问题)
28、选择信息的作用((十二)中问题)
29、瓦片包围盒修改回调函数的作用((十二)中问题)
30、刷新rex引擎((十二)中问题)
31、刷新边界作用((十二)中问题)
32、osgEarth::Metrics