示例#1
0
        private void CreateFlybyFromPathAnimation(ESRI.ArcGIS.GlobeCore.IGlobe globe, ESRI.ArcGIS.Geodatabase.IFeature lineFeature, ESRI.ArcGIS.Animation.IAGImportPathOptions AGImportPathOptionsCls)
        {
            ESRI.ArcGIS.GlobeCore.IGlobeDisplay globeDisplay = globe.GlobeDisplay;
            ESRI.ArcGIS.Analyst3D.IScene        scene        = globeDisplay.Scene;

            // Get a handle to the animation extension
            ESRI.ArcGIS.Analyst3D.IBasicScene2        basicScene2        = (ESRI.ArcGIS.Analyst3D.IBasicScene2)scene; // Explicit Cast
            ESRI.ArcGIS.Animation.IAnimationExtension animationExtension = basicScene2.AnimationExtension;

            // Get the geometry of the line feature
            ESRI.ArcGIS.Geometry.IGeometry geometry = lineFeature.Shape;

            // Create AGAnimationUtils and AGImportPathOptions objects
            ESRI.ArcGIS.Animation.IAGAnimationUtils AGAnimationUtilsCls = new ESRI.ArcGIS.Animation.AGAnimationUtilsClass();
            AGImportPathOptionsCls.PathGeometry = geometry;

            AGImportPathOptionsCls.AnimationEnvironment = animationExtension.AnimationEnvironment;
            ESRI.ArcGIS.Animation.IAGAnimationContainer AGAnimationContainer = animationExtension.AnimationTracks.AnimationObjectContainer;

            // Call "CreateFlybyFromPath" method
            AGAnimationUtilsCls.CreateFlybyFromPath(AGAnimationContainer, AGImportPathOptionsCls);
        }
		private void CreateFlybyFromPathAnimation(ESRI.ArcGIS.GlobeCore.IGlobe globe, ESRI.ArcGIS.Geodatabase.IFeature lineFeature, ESRI.ArcGIS.Animation.IAGImportPathOptions AGImportPathOptionsCls)
		{
			ESRI.ArcGIS.GlobeCore.IGlobeDisplay globeDisplay = globe.GlobeDisplay;
			ESRI.ArcGIS.Analyst3D.IScene scene = globeDisplay.Scene;

			// Get a handle to the animation extension
			ESRI.ArcGIS.Analyst3D.IBasicScene2 basicScene2 = (ESRI.ArcGIS.Analyst3D.IBasicScene2)scene; // Explicit Cast
			ESRI.ArcGIS.Animation.IAnimationExtension animationExtension = basicScene2.AnimationExtension;

			// Get the geometry of the line feature
			ESRI.ArcGIS.Geometry.IGeometry geometry = lineFeature.Shape;

			// Create AGAnimationUtils and AGImportPathOptions objects
			ESRI.ArcGIS.Animation.IAGAnimationUtils AGAnimationUtilsCls = new ESRI.ArcGIS.Animation.AGAnimationUtilsClass();
			AGImportPathOptionsCls.PathGeometry = geometry;

			AGImportPathOptionsCls.AnimationEnvironment = animationExtension.AnimationEnvironment;
			ESRI.ArcGIS.Animation.IAGAnimationContainer AGAnimationContainer = animationExtension.AnimationTracks.AnimationObjectContainer;

			// Call "CreateFlybyFromPath" method
			AGAnimationUtilsCls.CreateFlybyFromPath(AGAnimationContainer, AGImportPathOptionsCls);
		}