[WorldWind学习]15.模型加载
2013-05-06 20:01
316 查看
http://blog.csdn.net/jk276993857/article/details/5951738验证其可行性。只是模型太小,很难找到。在ConfigurationLoader.cs和ModelFeature类中设置断点监视:
public override void Initialize(DrawArgs drawArgs) { if(!IsVisible(drawArgs.WorldCamera)) return; try { if(meshFileName.EndsWith(".x")) 9 LoadDirectXMesh(drawArgs);//设置断点,反复改变球,最终找到。注意大概缩放到的经纬度(116.4E,39.9N) else if(meshFileName.EndsWith(".dae")||meshFileName.EndsWith(".xml")) LoadColladaMesh(drawArgs); if (mesh == null) throw new InvalidMeshException(); vertExaggeration = World.Settings.VerticalExaggeration; if (isElevationRelative2Ground==true) currentElevation = World.TerrainAccessor.GetElevationAt(Latitude, Longitude); isInitialized = true; } catch(Exception caught) { Utility.Log.Write( caught ); errorMsg = "Failed to read mesh from " + meshFileName; } }
同时修改模型的缩放因子ScaleFactor:
<?xml version="1.0" encoding="utf-8"?> <LayerSet Name="Clark Test" ShowOnlyOneLayer="false" ShowAtStartup="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="LayerSet.xsd"> <ModelFeature ShowAtStartup="true"> <Name>Tiny1</Name> <DistanceAboveSurface>560.0</DistanceAboveSurface> <Latitude> <Value>39.93</Value> </Latitude> <Longitude> <Value>116.400002</Value> </Longitude> 12 <ScaleFactor>100</ScaleFactor> <MeshFilePath>C:\tiny.x</MeshFilePath> <Orientation> <RotationX>0.0</RotationX> <RotationY>90.0</RotationY> <RotationZ>90.0</RotationZ> </Orientation> <MaxViewRange>10000.0</MaxViewRange> <MinViewRange>10</MinViewRange> </ModelFeature> <ModelFeature ShowAtStartup="true"> <Name>Tiny2</Name> <DistanceAboveSurface>160.0</DistanceAboveSurface> <Latitude> <Value>39.93</Value> </Latitude> <Longitude> <Value>116.410002</Value> </Longitude> <ScaleFactor>2</ScaleFactor> <MeshFilePath>Data\Model\tiny.x</MeshFilePath> <Orientation> <RotationX>0.0</RotationX> <RotationY>-90.0</RotationY> <RotationZ>90.0</RotationZ> </Orientation> <MaxViewRange>10000.0</MaxViewRange> <MinViewRange>10</MinViewRange> </ModelFeature> <LineFeature ShowAtStartup="true"> <Name>Sample Line</Name> <ExtrudeHeight>20000</ExtrudeHeight> <ExtrudeUpwards>false</ExtrudeUpwards> <DistanceAboveSurface>50000</DistanceAboveSurface> <MinimumDisplayAltitude>10</MinimumDisplayAltitude> <MaximumDisplayAltitude>5000000</MaximumDisplayAltitude> <LineString> <posList>-120,35,10000 -119,36,20000 -120,38,100000 -122,38,60000</posList> </LineString> <FeatureColor> <Red>255</Red> <Green>100</Green> <Blue>0</Blue> </FeatureColor> <Outline>true</Outline> <OutlineColor> <Red>100</Red> <Green>100</Green> <Blue>100</Blue> </OutlineColor> <Opacity>150</Opacity> </LineFeature> </LayerSet>
相关文章推荐
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- cesium js学习一加载三维模型
- OpenSceneGraph Android 开发学习-正确加载模型及颜色
- Away3D 学习笔记(一): 加载3DS格式的模型文件
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- DL学习笔记【15】使用训练好的模型得到分类结果
- 学习笔记TF049:TensorFlow 模型存储加载、队列线程、加载数据、自定义操作
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- OpenGL学习--07--模型加载(obj)
- tensorflow学习之Faster R-CNN模型的保存与加载
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- OSG学习笔记2:地形构建和模型加载
- IOS学习之——字典转模型 加载plist
- tensorflow学习之Faster R-CNN模型的保存与加载
- TensorFlow 深度学习框架(7)-- 变量管理及训练模型的保存与加载
- [Android学习系列15]下拉刷新列表实现动态加载