This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > GlobeCore > ESRI.ArcGIS.GlobeCore > Interfaces > IG > IGlobeDisplayLayers Interface > IGlobeDisplayLayers.SetLayerShadingMode Method (ArcObjects .NET 10.5 SDK) |
Indicates if the layer is smoothly shaded.
[Visual Basic .NET] Public Sub SetLayerShadingMode ( _ ByVal pLayer As ILayer, _ ByVal isSmooth As Boolean _ )
[C#] public void SetLayerShadingMode ( ILayer pLayer, bool isSmooth );
[C++]
HRESULT SetLayerShadingMode(
ILayer* pLayer,
VARIANT_BOOL isSmooth
);
[C++]
Parameters pLayer [in]
pLayer is a parameter of type ILayer isSmooth [in] isSmooth is a parameter of type VARIANT_BOOL
Use this method to set the shading mode for a layer.
Note that if you add a layer to globe via code and want the shading mode to be persisted when the globe document is saved then you should explicitly add the I3DProperties extension to your layer as follows:
ESRI.ArcGIS.Analyst3D.I3DProperties p3DProperties;
p3DProperties=new Feature3DPropertiesClass();
ESRI.ArcGIS.Carto.ILayerExtensions layerExtension=ftrLayer as ESRI.ArcGIS.Carto.ILayerExtensions;
layerExtension.AddExtension(p3DProperties);
//Now set the layer shading
glbDisplayLayers.SetLayerShadingMode(ftrLayer as ESRI.ArcGIS.Carto.ILayer, true);
glbDisplayLayers.RefreshLayer(ftrLayer as ESRI.ArcGIS.Carto.ILayer);