验证其可行性。只是模型太小,很难找到。在ConfigurationLoader.cs和ModelFeature类中设置断点监视:
1 public override void Initialize(DrawArgs drawArgs) 2 { 3 if(!IsVisible(drawArgs.WorldCamera)) 4 return; 5 6 try 7 { 8 if(meshFileName.EndsWith(".x")) 9 LoadDirectXMesh(drawArgs);//设置断点,反复改变球,最终找到。注意大概缩放到的经纬度(116.4E,39.9N)10 else if(meshFileName.EndsWith(".dae")||meshFileName.EndsWith(".xml"))11 LoadColladaMesh(drawArgs);12 if (mesh == null)13 throw new InvalidMeshException();14 15 vertExaggeration = World.Settings.VerticalExaggeration;16 if (isElevationRelative2Ground==true)17 currentElevation = World.TerrainAccessor.GetElevationAt(Latitude, Longitude);18 19 20 isInitialized = true;21 }22 catch(Exception caught)23 {24 Utility.Log.Write( caught );25 errorMsg = "Failed to read mesh from " + meshFileName;26 }27 }
同时修改模型的缩放因子ScaleFactor:
1 23 4 22 23Tiny1 5560.0 67 939.93 810 12116.400002 11100 13C:\tiny.x 1415 190.0 1690.0 1790.0 1810000.0 2010 2124 42 43Tiny2 25160.0 2627 2939.93 2830 32116.410002 312 33Data\Model\tiny.x 3435 390.0 36-90.0 3790.0 3810000.0 4010 4144 66Sample Line 4520000 46false 4750000 4810 495000000 5051 53-120,35,10000 -119,36,20000 -120,38,100000 -122,38,60000 5254 58255 55100 560 57true 5960 64100 61100 62100 63150 65