浅谈三维场景之飞行

在实际应用中总会遇到需要将视角转换到某个位置的情况。Scene里面也提供了相应的方法来实现。Scene. Fly方法提供了几种不同的回调方法,以满足不同的需求。但是由于其他原因的考虑,有些方法在产品的发展过程中废弃了。下面从SuperMap 9D来先整理一下那些方法是可用的,那些是过时的: 
(1)可用: 
Fly (Camera camera);根据指定的目标相机对象进行飞行。 
Fly (LookAt lookat);根据指定的目标相机对象进行飞行。 
Fly(Camera camera, int milliseconds); 根据指定的目标对象和飞行时间进行飞行。 
Fly(LookAt lookAt, uint millisceonds); 根据指定的目标对象和飞行时间进行飞行。 
FlyCircle(Geometry geometry, double speedRatio); 围绕指定地点旋转飞行模式,飞行过程中可以控制飞行的速度。

(2)不可用: 
Fly(Camera camera, bool isDirect); 直接飞行过去还是先拉起再飞行过去 
Fly(Geometry targetObject, int milliseconds); 根据指定的目标对象和飞行时间进行飞行。 
Fly(Geometry targetObject, FlyingMode flyingMode); 根据指定的飞行模式和目标对象进行飞行。 
Fly(Camera camera, int milliseconds, bool isDirect); 直接飞行过去还是先拉起再飞行过去 
FlyPlay(Geometry line, double speedRatio, double distance); 沿线飞行模式,可以控制飞行速度和高度

      其中有一个方法被废弃了,就是Fly(Camera camera, bool isDirect);根据指定的目标相机对象和飞行时间以先拉起再飞行过去的方式进行飞行。但是实际使用中是经常遇到需要先拉高再飞到某位置的情况,今天主要就讲一下如何实现它。

实现步骤: 
(1)由起点和终点位置,根据需求确定一个中间高点,这里采用最简单的方案,直接将两点直接的直线距离作为高点的高程值,高点在两点之间的中间。这样就可以根据三个点确定一条三维线。

Point3D startpoint3d = new Point3D(current_camera.Longitude, current_camera.Latitude, current_camera.Altitude); Point3D endpoint3d = new Point3D(camera.Longitude, camera.Latitude, camera.Altitude); Point3D point3d = new Point3D((startpoint3d.X + endpoint3d.X) / 2, (startpoint3d.Y + endpoint3d.Y) / 2, 0); if (current_camera.Altitude > camera.Altitude) { point3d.Z = current_camera.Altitude + distance; } else { point3d.Z = camera.Altitude + distance; } Point3Ds pt3ds = new Point3Ds(); pt3ds.Add(startpoint3d); pt3ds.Add(point3d); pt3ds.Add(endpoint3d); GeoLine3D GeodesicLine3d = new GeoLine3D(pt3ds);  
(2)构建三维线后用飞行管理器来实现,即先将三维线转为路线,用FlyManager进行飞行。   Route route = new Route(); route.FromGeoLine3D(GeodesicLine3d); for (int i = 0; i < route.Stops.Count; i++) { RouteStop routestop = route.Stops[i]; Camera cc = routestop.Camera; cc.Tilt = 0; routestop.Camera = cc; } RouteStop routestopend = new RouteStop(); routestopend.Camera = camera; route.Stops.Add(routestopend); route.IsLinesVisible = false; route.IsStopsVisible = false; FlyManager flyManager = new FlyManager(); flyManager.Scene = sceneControl.Scene; flyManager.Routes.Clear(); flyManager.Routes.Add(route); flyManager.Duration = millisceonds; flyManager.Play();  
具体代码可以参考静态类:SceneFly. Fly(Scene scene, Camera camera, int millisceonds) 


<”param name=”scene”>场景 


<”param name=”camera”>目标相机对象 


<”param name=”millisceonds”>相机飞行到指定目的地所耗费的时间。单位为秒。 


链接: https://pan.baidu.com/s/1jIvinX0
 密码:8jrh  
推荐文章:
新一代三维GIS技术>>

上一篇:SuperMap iClient 9D for OpenLayers 快…

下一篇:SuperMap GIS 9D SP1新特性速览

相关资源

  1. 宋关福:GIS软件技术四大升维带来全新应用价值
  2. GIS技术升维,赋能军事应用再上新台阶
  3. 郭仁忠院士:GIS是智慧城市的操作系统
  4. 深圳大学与超图集团签订智慧城市操作系统研发合作协议
  5. 2018 GIS 软件技术大会倒计时6天
  6. 国际政府考察团赴超图调研

96 Responses

  1. Vmunaw说道:

    augmentin 1000mg us levoxyl over the counter buy clomiphene online cheap

  2. Aseuel说道:

    buy generic lexapro for sale revia 50mg sale cheap revia 50mg

  3. Taasww说道:

    buy furosemide 40mg pills buy doxycycline 200mg online cheap albuterol tablet

  4. Ykshuv说道:

    strattera for sale quetiapine 50mg drug purchase sertraline generic

  5. Qvrjas说道:

    buy ursodiol cheap buy ursodiol for sale order generic zyrtec 5mg

  6. Uauvvb说道:

    buy generic azithromycin for sale azithromycin 500mg uk buy neurontin online

  7. Kyivrl说道:

    best heartburn medicine 2021 fast acting antacid otc prescription medicine for flatulence

  8. Wxxrnj说道:

    buy deltasone online cheap accutane 10mg cost cheap generic amoxil

  9. Eyfdwb说道:

    birth control pills at walmart how much does the birth control patch cost best thing for premature ejeculation

  10. Swggso说道:

    generic promethazine order promethazine 25mg pill ivermectin lotion 0.5

  11. Qacjwy说道:

    what causes gastric erosion dyspepsia diagnostic tests online what kind of antibiotics are prescribed for uti

  12. Isxzjk说道:

    best vitamin for toenail fungus blood pressure medication equivalent chart types of blood pressure medications

  13. Iqoroi说道:

    cymbalta 40mg generic provigil 200mg price provigil tablet

  14. Gfbzku说道:

    antiviral drugs list where can i buy inhalers help with diabetic drug cost

  15. Ginxtu说道:

    buy cheap generic cyproheptadine nizoral where to buy buy generic nizoral for sale

  16. Qvwery说道:

    quit smoking medication list buy online medication site strong painkillers online sale

  17. Ohltwq说道:

    provera 10mg uk medroxyprogesterone 5mg over the counter hydrochlorothiazide order

  18. Hvqifh说道:

    super strong sleeping pills drugs that cause hari loss good weight loss supplements gnc

  19. Gkdzae说道:

    buy cheap femara order albendazole 400mg generic generic aripiprazole

  20. Kfmzyq说道:

    purchase uroxatral generic can ibuprofen help stomach ache best over the counter heartburn

  21. Ejxwla说道:

    purchase minomycin pill buy minocycline 100mg sale order requip

  22. Field说道:

    As the emerging technology sector flourishes and new innovation appears, there have become several new ways to stake crypto, which include group staking, cold staking, and more. Some cryptocurrency exchanges have begun to roll out ways of staking coins on their platforms. Crypto staking is a source of much confusion. Questions like “is staking crypto worth it?”, or “is staking crypto safe?” are all over online crypto forums. It’s a puzzling mechanism, and it’s a good sign that people are willing to learn and understand it better. And so, today, this confusion ends, because I’m here to explain things! Crypto staking is an innovative way to earn passive income from cryptocurrencies. It offers a great opportunity for cryptocurrency investors to make money without having to actively trade or mine.
    https://www.play-bookmarks.win/worth-bitcoin-may-accept-cryptocurrency-payment
    Powering commercial grade rates at 300+ companies worldwide Make sure you have the amount required for the exchange and send crypto to the wallet address you see on the screen. – Fund your account – Make a deposit or buy crypto with your credit or debit card Calculate Bitcoin mining profit using one of these Bitcoin miners. Select or click a miner to have the inputs preloaded automatically. Then simply click the “Calculate Mining Profit” above. With our fast, reliable, and simple converter, you can easily get Monero for Bitcoin at a good rate. The cryptocurrency market is open 24 7 but it’s still good to know when regions and markets are active. Use our market time converter to see when markets wake up and become active. Arranging a face-to-face meeting with the local buyer to you is a fast and reliable way to exchange your currency depending on the current BTC price.

  23. Ihbhlw说道:

    strongest topical body acne medication buy oxcarbazepine for sale buy trileptal for sale

  24. Hmedjf说道:

    brand clonidine 0.1mg buy catapres tablets spiriva 9mcg us

  25. Htpnwb说道:

    rocaltrol brand fenofibrate without prescription fenofibrate 200mg pills

  26. Aowdpe说道:

    trimox pill order arimidex purchase macrobid generic

  27. Jvzndb说道:

    academia writing best online gambling poker online best

  28. Suajsw说道:

    order essays online dissertation experts buy generic cefixime online

  29. Omfehg说道:

    order aspirin online gamble with real money online free online poker games

  30. Bdfrgx说道:

    buy terbinafine 250mg sale online gambling casinos real casino games

  31. Paovwa说道:

    cefuroxime online order order ceftin 250mg pills buy robaxin 500mg pill

  32. Lgrbwh说道:

    order tadacip for sale indocin usa buy indocin generic

  33. Gluzrf说道:

    order nolvadex 10mg online buy tamoxifen 10mg pills buy symbicort inhalers for sale

  34. Sbsofk说道:

    order retin cream without prescription buy tadalis cheap stendra

  35. Nwbmsq说道:

    cleocin 150mg pill sildenafil over the counter sildenafil 50mg us

  36. Ujyztq说道:

    buy lamictal 50mg generic minipress 1mg for sale mebendazole buy online

  37. Tlszkk说道:

    generic metronidazole 200mg buy cheap generic septra order generic keflex

  38. Wuumjn说道:

    order fluconazole without prescription buy cipro pills for sale order cipro 1000mg generic

  39. Navbrm说道:

    buy sildenafil sildalis brand how to get estradiol without a prescription

  40. Ppuaro说道:

    order aldactone online oral valtrex propecia 1mg for sale

  41. Lnfftg说道:

    need essay written buy an essay cheap help writing a paper

  42. Whdgrf说道:

    buy tamsulosin 0.4mg sale buy simvastatin 10mg sale zocor drug

  43. Vwiowi说道:

    order motilium generic order domperidone pill tetracycline 250mg for sale

  44. Txryhj说道:

    zantac sale celecoxib without prescription celecoxib 100mg tablet

  45. Oroyhf说道:

    buspin tablet buspar online buy cordarone without prescription

  46. Shcqwp说道:

    buy generic sumatriptan 25mg levofloxacin for sale avodart 0.5mg pills

  47. Ridevx说道:

    buy generic zyloprim crestor over the counter purchase crestor generic

  48. Ykrxvk说道:

    esomeprazole 20mg cost mirtazapine ca buy topamax 100mg pills

  49. Remmpb说道:

    buy famotidine 20mg online prograf pills tacrolimus buy online

  50. Ubjppt说道:

    azelastine drug order zovirax buy avapro 150mg pill

  51. Aypzqv说道:

    buy warfarin 2mg online maxolon without prescription order reglan 20mg pill

  52. Hgpgeo说道:

    orlistat uk xenical pills purchase diltiazem pills

  53. Erxgfl说道:

    buy pamelor medication order methotrexate 10mg without prescription order acetaminophen pills

  54. Gumkox说道:

    inderal oral brand propranolol plavix 150mg without prescription

  55. Nrqgaq说道:

    fosamax sale alendronate where to buy macrodantin online

  56. Amgglx说道:

    order glimepiride online cheap arcoxia price cost arcoxia 120mg

  57. Sgorwn说道:

    purchase ozobax amitriptyline ca buy toradol pill

  58. Kbwiys说道:

    buy ozobax online baclofen 10mg ca ketorolac drug

  59. Jerems说道:

    buy loratadine 10mg online ramipril 5mg brand dapoxetine 90mg canada

  60. abard说道:

    2st bonusový kód: MOBJUMMAZ16 na mobilu Zákony o hazardních hrách v Německu jsou rozhodně jedinečné, aniž byste museli zabírat místo v zařízení. Totéž lze říci o hrách keno, BoVegas není jediné renomované online kasino s vynikající nabídkou online slotů. Sázková kancelář William Hill patří k největším ve Velké Británii, kde mají sportovní sázky tradici dlouhou desítky let. Bohužel tato společnost nevlastní českou licenci na provozování online sázek a tudíž nepřijímá české zákazníky. Zavedené provozovatelé online kasin může trvat delší pohled na úspěch, než začnete hrát. Staroegyptské pyramidy mají v sobě mnoho pokladů, abyste věděli.
    https://www.pure-bookmark.win/holdem-manager-2
    Casino bonusy dnesFree spiny zadarmoBonus za registráciuBonusy bez vkladuVšetky bonusyBonusové kódyPeniaze zadarmoZahraničné bonusy Mnoha hráčům se zalíbily Starburst free spins od Fortune Clock. Přitom 50 free spins Starburst no deposit nabízí i casino Slottica. Zde si máte možnost přečíst komplexní recenzi online casina Slottica Casino. Někdy můžete narazit i na 20 free spins Starburst no deposit, ale nejedná se o pravidelnou akci. Freespiny mají různé podoby a velikosti, takže je důležité vědět, na co si dát pozor při výběru bonusu za roztočení zdarma. Níže naleznete tři hlavní no deposit bonus free spins: royalkrálovský Díky publikovaným informacím naši čtenáři rychle objeví ty nejvýhodnější casino bonusy a snadno najdou odpovědi na většinu problémů či otázek, které souvisí s problematikou online casin.

  61. Pzdewn说道:

    order dilantin 100mg online buy oxytrol generic buy oxybutynin 2.5mg sale

  62. Rhoqvv说道:

    order perindopril 4mg desloratadine us fexofenadine cost

  63. Meazdf说道:

    buy levitra without a prescription buy vardenafil pill zanaflex cost

  64. Ogftih说道:

    order serophene generic order imuran 50mg pill buy imuran online

  65. Nsgvoa说道:

    methylprednisolone medicine medrol 8 mg otc order aristocort 10mg without prescription

  66. Ipxviq说道:

    blackjack game buy augmentin 375mg online buy synthroid pills

  67. Npujga说道:

    play casino games for cash stromectol order ivermectin 90 mg

  68. Bqbbiw说道:

    symmetrel pill atenolol 50mg uk avlosulfon 100mg sale

  69. Qdooyv说道:

    online blackjack with friends order ventolin pill albuterol 4mg tablet

  70. Cwrwrv说道:

    pantoprazole 20mg pill protonix 40mg usa buy phenazopyridine online

  71. Depoqg说道:

    online blackjack real money furosemide oral lasix 40mg price

  72. Eogfzp说道:

    azithromycin pills buy gabapentin generic order neurontin 600mg

  73. Ioogkt说道:

    lipitor 40mg cheap atorvastatin 10mg pills amlodipine buy online

  74. Ipaete说道:

    accutane pill order isotretinoin 20mg generic order azithromycin

  75. Dgthav说道:

    order omnicef order glycomet 1000mg pill order prevacid 15mg online cheap

  76. Etjwko说道:

    order cenforce 100mg purchase naprosyn for sale order generic chloroquine

  77. Yfmgoc说道:

    tadalafil cost tadalafil 20mg uk viagra 50mg canada

  78. Zeadgn说道:

    buy generic telmisartan 80mg buy plaquenil generic cost molnunat

  79. Ohrlhe说道:

    premarin medication buy dostinex 0.25mg for sale buy sildenafil 100mg sale

  80. Qkrpbn说道:

    brand omeprazole lopressor 50mg usa cheap lopressor 50mg

  81. Tharvb说道:

    buy betahistine generic order probenecid 500mg online buy benemid 500 mg generic

  82. Urcbax说道:

    zovirax drug latanoprost cheap buy exelon 3mg generic

  83. Uuvzny说道:

    order enalapril online cheap duphalac buy duphalac online

  84. Pqtsly说道:

    mestinon 60 mg uk mestinon generic maxalt 10mg canada

  85. Lrjhxk说道:

    order ferrous generic order generic ascorbic acid 500 mg buy betapace no prescription

  86. Zvqpch说道:

    etodolac 600 mg cheap order colospa pills cilostazol cheap

  87. Riugxy说道:

    purchase prasugrel online thorazine 100mg cheap detrol 2mg generic

  88. Ctayxg说道:

    buy florinef medication rabeprazole online loperamide pill

  89. Pfbecr说道:

    dydrogesterone medication jardiance ca empagliflozin 25mg pills

  90. Bpjcdx说道:

    order meloset sale order danazol 100mg generic buy cheap danazol

  91. Ngazzv说道:

    aspirin 75 mg price hydroquinone usa buy generic imiquimod over the counter

  92. Xsutuj说道:

    precose cheap repaglinide 2mg uk buy griseofulvin 250mg generic

  93. Ezvjcy说道:

    purchase minoxidil solution tamsulosin 0.4mg us ed pills otc

  94. Dknqqf说道:

    tadalafil 10mg uk tadalafil 5mg oral order viagra pill

  95. Cojkfd说道:

    buy zaditor medication doxepin 25mg over the counter order generic imipramine

  96. Bliqaj说道:

    buy fenofibrate 200mg online buy tricor 200mg generic order generic tricor 160mg

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

CAPTCHAis initialing...