After the TIN data is loaded, the details must be depicted on the 3D object, that is, the texture. The relationship between the DEM surface points and the texture space points is established, that is, the texture ing. Overlay the image data is to regard the image as a texture, paste it on the terrain surface, so that it has a three-dimensional effect of terrain fluctuations.
This is different from the construction of 3D scenes in GlobeControl. As we mentioned in the previous blog, there are three main types of globe layers: Floating, Draped, and Elevation (Floating, stacking, and Elevation layers ), that is, you only need to set the properties of the layer to obtain the elevation value from the elevation layer by adding layers and floating layers. For details about how to overlay images in SceneControl, see "right-click" --> "attribute" --> "Basic height" --> "elevation obtained from the surface" in ArcScene ", set to float on the custom surface.
Here we mainly use the I3DProperties interface. The Code is as follows:
ISceneGraph pSceneGraph = axSceneControl1.SceneGraph; IScene pScene = pSceneGraph. scene; ITinLayer pTinLayer = null; IRasterLayer pRasterlayer = null; // get TIN, DOM for (int I = 0; I <pScene. layerCount; I ++) {ILayer pLayer = pScene. get_Layer (I); if (pLayer is ITinLayer) {pTinLayer = pLayer as ITinLayer;} if (pLayer is IRasterLayer) {pRasterlayer = pLayer as IRasterLayer ;}} // set the 3D attribute ITinAdvanced tinAdvanced = pTinLayer. dataset as ITinAdvanced; ISurface surface = tinAdvanced. surface; ILayerExtensions layerExtensions = pRasterlayer as ILayerExtensions; I3DProperties p3DProperties = null; for (int I = 0; I <layerExtensions. extensionCount; I ++) {if (layerExtensions. get_Extension (I) is I3DProperties) {p3DProperties = layerExtensions. get_Extension (I) as I3DProperties;} p3DProperties. baseOption = esriBaseOption. esriBaseSurface; p3DProperties. baseSurface = surface; p3DProperties. apply3DProperties (pRasterlayer );