cesium 0.13.2 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/Cesium.js +2 -2
- data/app/assets/javascripts/Core/Clock.js +81 -81
- data/app/assets/javascripts/Core/ClockRange.js +5 -3
- data/app/assets/javascripts/Core/ClockStep.js +7 -1
- data/app/assets/javascripts/Core/Event.js +12 -11
- data/app/assets/javascripts/Core/JulianDate.js +16 -0
- data/app/assets/javascripts/DynamicScene/CompositeDynamicObjectCollection.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicBillboardVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicConeVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicConeVisualizerUsingCustomSensor.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicEllipsoidVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicLabelVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicPathVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicPointVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicPolygonVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicPolylineVisualizer.js +1 -1
- data/app/assets/javascripts/DynamicScene/DynamicPyramidVisualizer.js +1 -1
- data/app/assets/javascripts/Renderer/ClearCommand.js +1 -1
- data/app/assets/javascripts/Renderer/Context.js +23 -0
- data/app/assets/javascripts/Renderer/DrawCommand.js +1 -1
- data/app/assets/javascripts/Scene/BillboardCollection.js +14 -24
- data/app/assets/javascripts/Scene/EllipsoidPrimitive.js +8 -31
- data/app/assets/javascripts/Scene/PerformanceDisplay.js +13 -4
- data/app/assets/javascripts/Scene/Tile.js +11 -6
- data/app/assets/javascripts/Scene/ViewportQuad.js +21 -36
- data/app/assets/javascripts/Shaders/BillboardCollectionFS.js +15 -11
- data/app/assets/javascripts/Shaders/BillboardCollectionVS.js +47 -27
- data/app/assets/javascripts/Shaders/BuiltinFunctions.js +886 -228
- data/app/assets/javascripts/Shaders/CentralBodyFS.js +173 -40
- data/app/assets/javascripts/Shaders/CentralBodyFSDepth.js +17 -14
- data/app/assets/javascripts/Shaders/CentralBodyFSPole.js +25 -19
- data/app/assets/javascripts/Shaders/CentralBodyVS.js +61 -31
- data/app/assets/javascripts/Shaders/CentralBodyVSDepth.js +5 -4
- data/app/assets/javascripts/Shaders/CentralBodyVSPole.js +9 -7
- data/app/assets/javascripts/Shaders/ComplexConicSensorVolumeFS.js +392 -299
- data/app/assets/javascripts/Shaders/ComplexConicSensorVolumeVS.js +12 -8
- data/app/assets/javascripts/Shaders/ConstructiveSolidGeometry.js +836 -530
- data/app/assets/javascripts/Shaders/CustomSensorVolumeFS.js +95 -58
- data/app/assets/javascripts/Shaders/CustomSensorVolumeVS.js +7 -6
- data/app/assets/javascripts/Shaders/EllipsoidFS.js +34 -26
- data/app/assets/javascripts/Shaders/EllipsoidVS.js +21 -5
- data/app/assets/javascripts/Shaders/Materials/AsphaltMaterial.js +19 -11
- data/app/assets/javascripts/Shaders/Materials/BlobMaterial.js +13 -9
- data/app/assets/javascripts/Shaders/Materials/BrickMaterial.js +33 -22
- data/app/assets/javascripts/Shaders/Materials/BumpMapMaterial.js +24 -17
- data/app/assets/javascripts/Shaders/Materials/CementMaterial.js +14 -10
- data/app/assets/javascripts/Shaders/Materials/CheckerboardMaterial.js +32 -20
- data/app/assets/javascripts/Shaders/Materials/DotMaterial.js +11 -6
- data/app/assets/javascripts/Shaders/Materials/ErosionMaterial.js +18 -13
- data/app/assets/javascripts/Shaders/Materials/FacetMaterial.js +12 -7
- data/app/assets/javascripts/Shaders/Materials/FresnelMaterial.js +9 -6
- data/app/assets/javascripts/Shaders/Materials/GrassMaterial.js +23 -16
- data/app/assets/javascripts/Shaders/Materials/NormalMapMaterial.js +14 -11
- data/app/assets/javascripts/Shaders/Materials/ReflectionMaterial.js +10 -8
- data/app/assets/javascripts/Shaders/Materials/RefractionMaterial.js +10 -8
- data/app/assets/javascripts/Shaders/Materials/RimLightingMaterial.js +12 -7
- data/app/assets/javascripts/Shaders/Materials/StripeMaterial.js +21 -12
- data/app/assets/javascripts/Shaders/Materials/TieDyeMaterial.js +11 -7
- data/app/assets/javascripts/Shaders/Materials/Water.js +46 -45
- data/app/assets/javascripts/Shaders/Materials/WoodMaterial.js +29 -19
- data/app/assets/javascripts/Shaders/Noise.js +408 -173
- data/app/assets/javascripts/Shaders/PolygonFS.js +20 -10
- data/app/assets/javascripts/Shaders/PolygonFSPick.js +3 -3
- data/app/assets/javascripts/Shaders/PolygonVS.js +27 -22
- data/app/assets/javascripts/Shaders/PolygonVSPick.js +23 -19
- data/app/assets/javascripts/Shaders/PolylineFS.js +3 -3
- data/app/assets/javascripts/Shaders/PolylineVS.js +24 -19
- data/app/assets/javascripts/Shaders/Ray.js +496 -315
- data/app/assets/javascripts/Shaders/ReprojectWebMercatorFS.js +16 -6
- data/app/assets/javascripts/Shaders/ReprojectWebMercatorVS.js +5 -2
- data/app/assets/javascripts/Shaders/SensorVolume.js +32 -15
- data/app/assets/javascripts/Shaders/SkyAtmosphereFS.js +61 -16
- data/app/assets/javascripts/Shaders/SkyAtmosphereVS.js +106 -53
- data/app/assets/javascripts/Shaders/SkyBoxFS.js +4 -2
- data/app/assets/javascripts/Shaders/SkyBoxVS.js +5 -3
- data/app/assets/javascripts/Shaders/ViewportQuadFS.js +14 -10
- data/app/assets/javascripts/Shaders/ViewportQuadVS.js +6 -5
- data/app/assets/javascripts/ThirdParty/knockout.js +88 -0
- data/app/assets/javascripts/Widgets/Animation/Animation.css +141 -0
- data/app/assets/javascripts/Widgets/Animation/Animation.js +944 -0
- data/app/assets/javascripts/Widgets/Animation/AnimationViewModel.js +503 -0
- data/app/assets/javascripts/Widgets/Animation/darker.css +69 -0
- data/app/assets/javascripts/Widgets/ClockViewModel.js +167 -0
- data/app/assets/javascripts/Widgets/Command.js +33 -0
- data/app/assets/javascripts/Widgets/Dojo/CesiumViewerWidget.css +54 -77
- data/app/assets/javascripts/Widgets/Dojo/CesiumViewerWidget.html +6 -27
- data/app/assets/javascripts/Widgets/Dojo/CesiumViewerWidget.js +124 -187
- data/app/assets/javascripts/Widgets/Fullscreen/FullscreenViewModel.js +88 -0
- data/app/assets/javascripts/Widgets/Fullscreen/FullscreenWidget.css +16 -0
- data/app/assets/javascripts/Widgets/Fullscreen/FullscreenWidget.js +50 -0
- data/app/assets/javascripts/Widgets/Fullscreen/darker.css +14 -0
- data/app/assets/javascripts/Widgets/Images/enterFullscreen-darker.svg +18 -0
- data/app/assets/javascripts/Widgets/Images/enterFullscreen.svg +18 -0
- data/app/assets/javascripts/Widgets/Images/exitFullscreen-darker.svg +18 -0
- data/app/assets/javascripts/Widgets/Images/exitFullscreen.svg +18 -0
- data/app/assets/javascripts/Widgets/Observable.js +29 -0
- data/app/assets/javascripts/Widgets/{Timeline.css → Timeline/Timeline.css} +18 -21
- data/app/assets/javascripts/Widgets/{Timeline.js → Timeline/Timeline.js} +12 -7
- data/app/assets/javascripts/Widgets/{TimelineHighlightRange.js → Timeline/TimelineHighlightRange.js} +0 -0
- data/app/assets/javascripts/Widgets/{TimelineTrack.js → Timeline/TimelineTrack.js} +1 -1
- data/app/assets/javascripts/Widgets/Timeline/darker.css +20 -0
- data/app/assets/javascripts/Widgets/ToggleButtonViewModel.js +40 -0
- data/app/assets/javascripts/Widgets/createCommand.js +41 -0
- data/lib/cesium/version.rb +1 -1
- data/test/dummy/log/development.log +3300 -0
- data/test/dummy/tmp/cache/assets/C0D/D90/sprockets%2F297417de8571859510683b028659bf97 +0 -0
- data/test/dummy/tmp/cache/assets/C5E/6E0/sprockets%2F990a847694744e4ac598dc125572a243 +0 -0
- data/test/dummy/tmp/cache/assets/C64/470/sprockets%2Fa605a34504c3a61f1e0309374154a4f2 +0 -0
- data/test/dummy/tmp/cache/assets/C6C/D20/sprockets%2F8214271b512224e3f7a73a322e85b15c +0 -0
- data/test/dummy/tmp/cache/assets/C6E/8C0/sprockets%2F13ad4320ee685ee062033b0806b07756 +0 -0
- data/test/dummy/tmp/cache/assets/C71/D40/sprockets%2F191b5a7162930434c9ea09419d2c0c42 +0 -0
- data/test/dummy/tmp/cache/assets/C75/FC0/sprockets%2F7100611b808c367104f4537af8b467ca +0 -0
- data/test/dummy/tmp/cache/assets/C77/C90/sprockets%2F5c6d277228741022bef80d17b5422c55 +0 -0
- data/test/dummy/tmp/cache/assets/C7B/2E0/sprockets%2F049f5400e934154d876d9e7a110d0b72 +0 -0
- data/test/dummy/tmp/cache/assets/C7D/290/sprockets%2F07b270a59082157be139ee653b4435b9 +0 -0
- data/test/dummy/tmp/cache/assets/C82/860/sprockets%2Fbd185743a7cf9fa41b72715364178414 +0 -0
- data/test/dummy/tmp/cache/assets/C83/5B0/sprockets%2F11288f143903cfc5595d8a5771f51f20 +0 -0
- data/test/dummy/tmp/cache/assets/C84/210/sprockets%2F5e7c3418b40688a85916fd18512fc213 +0 -0
- data/test/dummy/tmp/cache/assets/C85/2A0/sprockets%2F409dfb449462105286e47c6a8c32860e +0 -0
- data/test/dummy/tmp/cache/assets/C87/790/sprockets%2F49d9e234d84217773d540a5b4813fc64 +0 -0
- data/test/dummy/tmp/cache/assets/C8C/C50/sprockets%2F87a1327314e4aa2a3ea44a33a4730420 +0 -0
- data/test/dummy/tmp/cache/assets/C9C/B20/sprockets%2Fc3000c708c2d95253d8a414d6c087d10 +0 -0
- data/test/dummy/tmp/cache/assets/C9E/DC0/sprockets%2F2f7b17e380320fe9d0650d3aa4614432 +0 -0
- data/test/dummy/tmp/cache/assets/C9F/9B0/sprockets%2Faeb280e1126521372c0bd6660e22969b +0 -0
- data/test/dummy/tmp/cache/assets/CA0/9A0/sprockets%2Fc1e9542f7960491862764447bf6d7f9e +0 -0
- data/test/dummy/tmp/cache/assets/CA1/C10/sprockets%2F804602800eb2e183aa91825b5f881b0d +0 -0
- data/test/dummy/tmp/cache/assets/CA6/DD0/sprockets%2F8b2532b8158e7333d5392bb505ca512f +0 -0
- data/test/dummy/tmp/cache/assets/CA8/4C0/sprockets%2Fbe667b320658d0297c210cb43c77b760 +0 -0
- data/test/dummy/tmp/cache/assets/CA9/340/sprockets%2Fd3c10509ea49a62e909622f77f4b3220 +0 -0
- data/test/dummy/tmp/cache/assets/CA9/430/sprockets%2F68e71052d60ebac0303e9e883c541265 +0 -0
- data/test/dummy/tmp/cache/assets/CAB/380/sprockets%2Fc2d6119b9334706b0b40e54f93f431f7 +0 -0
- data/test/dummy/tmp/cache/assets/CAC/820/sprockets%2F6b14c16171e49a1128966926eade622b +0 -0
- data/test/dummy/tmp/cache/assets/CB2/A60/sprockets%2F5583541ee042c37a846d149d80c8a36d +0 -0
- data/test/dummy/tmp/cache/assets/CB2/F30/sprockets%2Fcd4160d432937934435655ca7c56c5fa +0 -0
- data/test/dummy/tmp/cache/assets/CB3/280/sprockets%2F7e73589c2b0009c3748f7a068242cc7a +0 -0
- data/test/dummy/tmp/cache/assets/CB4/A90/sprockets%2F8fa8411bd1707443dcf02695b9a80776 +0 -0
- data/test/dummy/tmp/cache/assets/CB4/F10/sprockets%2F06ee620db145798202a9fd4c1849944b +0 -0
- data/test/dummy/tmp/cache/assets/CB8/3B0/sprockets%2Fd03836e3d10fb91125597086f6dcc848 +0 -0
- data/test/dummy/tmp/cache/assets/CB9/280/sprockets%2F0e4025fc9a78a70774353617a9b7e96a +0 -0
- data/test/dummy/tmp/cache/assets/CBB/3F0/sprockets%2F410c0a86475946a391fc849c9c34e5e4 +0 -0
- data/test/dummy/tmp/cache/assets/CBE/B60/sprockets%2F872738245c2698dd11952e55f1d2cd5f +0 -0
- data/test/dummy/tmp/cache/assets/CC2/090/sprockets%2F1f4c818e07baa8b05de5987748339952 +0 -0
- data/test/dummy/tmp/cache/assets/CC3/D90/sprockets%2Fd7e90e060a9924b61d0b2c6d102c0024 +0 -0
- data/test/dummy/tmp/cache/assets/CC8/310/sprockets%2F3d942c768ca693e08155d8a9b2195e99 +0 -0
- data/test/dummy/tmp/cache/assets/CC8/9F0/sprockets%2Fbc7ef55837e5097405e3f5097fe35961 +0 -0
- data/test/dummy/tmp/cache/assets/CC8/A80/sprockets%2F887a36c292044706f9d58ee02f659eb9 +0 -0
- data/test/dummy/tmp/cache/assets/CC8/E20/sprockets%2F27297a29159534cf493ff55576c9faa5 +0 -0
- data/test/dummy/tmp/cache/assets/CCD/040/sprockets%2Faf449bc1503080d6262424c20bb97b6d +0 -0
- data/test/dummy/tmp/cache/assets/CCD/210/sprockets%2F33c821e4b3b2538af0c79006df1318d0 +0 -0
- data/test/dummy/tmp/cache/assets/CCD/8B0/sprockets%2F738651415c65eb022af5ec9230a6b2b1 +0 -0
- data/test/dummy/tmp/cache/assets/CCF/180/sprockets%2F39ad17e27f30e3d0080675315bdae602 +0 -0
- data/test/dummy/tmp/cache/assets/CD0/CB0/sprockets%2F139767c003a27a8b5da08fc3714c072b +0 -0
- data/test/dummy/tmp/cache/assets/CD2/6E0/sprockets%2F161543077a1e9c52a2d577bbc3d41e62 +0 -0
- data/test/dummy/tmp/cache/assets/CD3/5A0/sprockets%2F3b02ea5d52854a16dea8336c339c5090 +0 -0
- data/test/dummy/tmp/cache/assets/CD5/9F0/sprockets%2F72d2b1b535d37251fb45c4754d62e2a6 +0 -0
- data/test/dummy/tmp/cache/assets/CDA/170/sprockets%2Ffae3735873d2d340da1827ee6246500e +0 -0
- data/test/dummy/tmp/cache/assets/CDA/C40/sprockets%2F1d06e02833dd2620777ee9818ec61bb0 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/080/sprockets%2Fb33c033c645ff28315cc958538cd5b13 +0 -0
- data/test/dummy/tmp/cache/assets/CDC/990/sprockets%2F913dd1f104b8b71495b00d798c2922de +0 -0
- data/test/dummy/tmp/cache/assets/CDD/090/sprockets%2F62a239aa6b1847f0cd82f6e5b7187303 +0 -0
- data/test/dummy/tmp/cache/assets/CDF/E30/sprockets%2F27d4b1eb52518a0667aef8525455b57c +0 -0
- data/test/dummy/tmp/cache/assets/CE6/E20/sprockets%2F0c20945489c7228a66bb54fd7cc449f0 +0 -0
- data/test/dummy/tmp/cache/assets/CE8/F00/sprockets%2Fd5833932a705129ff7ce6072ee0fb945 +0 -0
- data/test/dummy/tmp/cache/assets/CE9/C20/sprockets%2F5c49d701727e703847268f9fffdba020 +0 -0
- data/test/dummy/tmp/cache/assets/CED/610/sprockets%2F678ef9639f922616c1ced8f3b1b12931 +0 -0
- data/test/dummy/tmp/cache/assets/CEE/300/sprockets%2Fc27f86c561d6e1e8c08d5f852857b025 +0 -0
- data/test/dummy/tmp/cache/assets/CEF/B50/sprockets%2F877a93d34cbc7b4cf1837a56398f0185 +0 -0
- data/test/dummy/tmp/cache/assets/CF2/6B0/sprockets%2F8c7e5aab44b8703a6379569d887145be +0 -0
- data/test/dummy/tmp/cache/assets/CF3/2A0/sprockets%2Fcf7fca385a816577b9a3a8583117696d +0 -0
- data/test/dummy/tmp/cache/assets/CF5/5E0/sprockets%2Fdaf7891f7f08019202f8576899bb51ce +0 -0
- data/test/dummy/tmp/cache/assets/CF5/F60/sprockets%2Fbf00d9de7199bf7775c55128a295b677 +0 -0
- data/test/dummy/tmp/cache/assets/CF6/F60/sprockets%2Fc8e90a0ee2521916c1aa1a41b6463a63 +0 -0
- data/test/dummy/tmp/cache/assets/CF8/AB0/sprockets%2F7755643d4dc601cdf47e9886b4f379a5 +0 -0
- data/test/dummy/tmp/cache/assets/CF8/FA0/sprockets%2F853bda27091dea80f5121d20a08b53a7 +0 -0
- data/test/dummy/tmp/cache/assets/CFC/970/sprockets%2Fbe27af53c78bc90a6113a41620a448e1 +0 -0
- data/test/dummy/tmp/cache/assets/D01/160/sprockets%2Fa74c8a20e3158be3fb170499a11093db +0 -0
- data/test/dummy/tmp/cache/assets/D01/4A0/sprockets%2F9e53138a5fa453940a6190c1ba3ac36e +0 -0
- data/test/dummy/tmp/cache/assets/D09/360/sprockets%2Fe5d09aa6884c385437dbb18ca301e353 +0 -0
- data/test/dummy/tmp/cache/assets/D0D/990/sprockets%2F9cbe1835abd85d521b876411a56cb672 +0 -0
- data/test/dummy/tmp/cache/assets/D0E/610/sprockets%2F3e14d0cbb1493615f7d23438bf8fd068 +0 -0
- data/test/dummy/tmp/cache/assets/D0F/870/sprockets%2F7597efb306ce615354e507d02edd14d4 +0 -0
- data/test/dummy/tmp/cache/assets/D10/590/sprockets%2F80386d276f6569b0a12ae1be155f9b3e +0 -0
- data/test/dummy/tmp/cache/assets/D11/060/sprockets%2F6d0bee24e84229bd6014301c878ff6d6 +0 -0
- data/test/dummy/tmp/cache/assets/D11/6A0/sprockets%2Ff21a9f2e8f4075086e68cda0059b25e2 +0 -0
- data/test/dummy/tmp/cache/assets/D11/A30/sprockets%2F210c5ab2fecdef47005c7308685e9297 +0 -0
- data/test/dummy/tmp/cache/assets/D12/460/sprockets%2F9c0db7ab725c7c7b15d2450657fe2369 +0 -0
- data/test/dummy/tmp/cache/assets/D12/760/sprockets%2F03c39aaab0669a6e9670a29f048db686 +0 -0
- data/test/dummy/tmp/cache/assets/D12/A90/sprockets%2F5f4bf0f279ca050491c07688df6d7c02 +0 -0
- data/test/dummy/tmp/cache/assets/D14/020/sprockets%2F0c3544de7e7bd74ee6e2040477f04a88 +0 -0
- data/test/dummy/tmp/cache/assets/D15/9B0/sprockets%2F015d78bcd557b68b039a7abd33b47679 +0 -0
- data/test/dummy/tmp/cache/assets/D19/B40/sprockets%2F1f58b7a260a18bcc697883f96e266a1b +0 -0
- data/test/dummy/tmp/cache/assets/D1A/520/sprockets%2Fe32e6a17fb333c5883939fcb234d2f69 +0 -0
- data/test/dummy/tmp/cache/assets/D1C/6B0/sprockets%2F3c7df42c4a83942ffb31d85d827595b4 +0 -0
- data/test/dummy/tmp/cache/assets/D1C/BD0/sprockets%2Ff389718cb2ba6fe3e0e0c420398f9486 +0 -0
- data/test/dummy/tmp/cache/assets/D21/E90/sprockets%2F2fe752c3566ccd57f7ee339086fc3427 +0 -0
- data/test/dummy/tmp/cache/assets/D23/CD0/sprockets%2F20f79a5d5570f3efef4de79621355e49 +0 -0
- data/test/dummy/tmp/cache/assets/D23/D30/sprockets%2F71867caa2cf28987ed0048cf7d3a7569 +0 -0
- data/test/dummy/tmp/cache/assets/D24/EF0/sprockets%2F776d054d84f539061bd8ddffa66906c8 +0 -0
- data/test/dummy/tmp/cache/assets/D25/4D0/sprockets%2Fde6d162f5e2a587d9564e88d90c773a3 +0 -0
- data/test/dummy/tmp/cache/assets/D27/A90/sprockets%2F1a25693899836d58cad4cbfe8c7a7707 +0 -0
- data/test/dummy/tmp/cache/assets/D2D/F30/sprockets%2Fc75a2beb051b582840cf3800d55b26dc +0 -0
- data/test/dummy/tmp/cache/assets/D2D/F80/sprockets%2F0293aae3c8d8a4fda11a0883c48b5222 +0 -0
- data/test/dummy/tmp/cache/assets/D2E/600/sprockets%2Fda9f7539b9df0aa7d763d14999870d94 +0 -0
- data/test/dummy/tmp/cache/assets/D33/040/sprockets%2F6593d8c52e0b617a12ae2c49aa6e3b07 +0 -0
- data/test/dummy/tmp/cache/assets/D34/7A0/sprockets%2F4b4a0c9775248b2e49c1bae8a72a05c3 +0 -0
- data/test/dummy/tmp/cache/assets/D36/770/sprockets%2F2942b9a5caa50e9107de74eca152619c +0 -0
- data/test/dummy/tmp/cache/assets/D37/9C0/sprockets%2Fdfa99409821a9d0d1d6f30b5461b1ae5 +0 -0
- data/test/dummy/tmp/cache/assets/D38/930/sprockets%2F1dd724d3466a12a84bb248dc7e6d06c6 +0 -0
- data/test/dummy/tmp/cache/assets/D39/7E0/sprockets%2F0a236c2722565068da14f7ecf7b7a8da +0 -0
- data/test/dummy/tmp/cache/assets/D3A/420/sprockets%2Fbd47498d7cbba00ab9c8201883915f2a +0 -0
- data/test/dummy/tmp/cache/assets/D3B/BB0/sprockets%2Ff533a1adca88a3594ec94233f71eb812 +0 -0
- data/test/dummy/tmp/cache/assets/D3B/E20/sprockets%2Fd20320e720f8dc2779b4ec627eb15fb6 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/080/sprockets%2F007ac06f3c784668b28baba6902eec76 +0 -0
- data/test/dummy/tmp/cache/assets/D3D/D30/sprockets%2F5fa8cd221b97c829234dc81721eea60e +0 -0
- data/test/dummy/tmp/cache/assets/D3E/1F0/sprockets%2F6e84e3f3e420bd5ad7f336ce41750d36 +0 -0
- data/test/dummy/tmp/cache/assets/D3F/960/sprockets%2F237931317e014eabd96932637ffadddc +0 -0
- data/test/dummy/tmp/cache/assets/D42/460/sprockets%2Fb195b37929fa63c85fbfb573aa05d209 +0 -0
- data/test/dummy/tmp/cache/assets/D42/F90/sprockets%2F632555653af85b04e418abb9dee238cf +0 -0
- data/test/dummy/tmp/cache/assets/D44/400/sprockets%2F3cdc153bbcae4ac07e75193678d61996 +0 -0
- data/test/dummy/tmp/cache/assets/D46/D10/sprockets%2F3399d1c2c5dbc7c9e0f2106296d82fd7 +0 -0
- data/test/dummy/tmp/cache/assets/D47/A70/sprockets%2F526b1eb3f0c2369b0c16c96ddf775f96 +0 -0
- data/test/dummy/tmp/cache/assets/D48/180/sprockets%2Ffce9aa3720b73d2259e644a2e3a99c89 +0 -0
- data/test/dummy/tmp/cache/assets/D48/6F0/sprockets%2F7a67d797a92f48d3104ecf5e42b5bc71 +0 -0
- data/test/dummy/tmp/cache/assets/D4A/7B0/sprockets%2F8cbd4e8cdea7e3e486565d92b2271561 +0 -0
- data/test/dummy/tmp/cache/assets/D4C/2C0/sprockets%2F096baecb9254aaa68d12c0a3c34a2121 +0 -0
- data/test/dummy/tmp/cache/assets/D4E/440/sprockets%2F141dfe7665828ab1d5ee647d0e797e5a +0 -0
- data/test/dummy/tmp/cache/assets/D4F/D90/sprockets%2F1e4fde9a33bb918796edc96eb0805564 +0 -0
- data/test/dummy/tmp/cache/assets/D50/390/sprockets%2F04f3299f7c28fa65842d4bda257df9d5 +0 -0
- data/test/dummy/tmp/cache/assets/D51/330/sprockets%2F0e113bb1dc7050041be6f8d28c4ebb41 +0 -0
- data/test/dummy/tmp/cache/assets/D57/370/sprockets%2F102e7ebfa287ea2e1b58052b052c1ee2 +0 -0
- data/test/dummy/tmp/cache/assets/D57/C50/sprockets%2F28a22bacabfe4b780402b3ca83a54843 +0 -0
- data/test/dummy/tmp/cache/assets/D57/D00/sprockets%2Fbb9c7666fe4175a054557fff4ccf5983 +0 -0
- data/test/dummy/tmp/cache/assets/D59/E30/sprockets%2Fa8a09c836fc128ee889ce97d72e6444c +0 -0
- data/test/dummy/tmp/cache/assets/D5C/800/sprockets%2Fdd1b21cea3433ac792403e3de4f84f11 +0 -0
- data/test/dummy/tmp/cache/assets/D5D/140/sprockets%2Ffca988958f2a37ce8eb6b77337e793c0 +0 -0
- data/test/dummy/tmp/cache/assets/D5F/630/sprockets%2Ff2df01200f9420db5285f15bbdf4e34e +0 -0
- data/test/dummy/tmp/cache/assets/D61/420/sprockets%2F79102ecb63d32f0f43e46f481acab0c7 +0 -0
- data/test/dummy/tmp/cache/assets/D61/B10/sprockets%2F56a7f22ca114fc32e60a2ca8e5c946e1 +0 -0
- data/test/dummy/tmp/cache/assets/D61/C00/sprockets%2F71ad51ea200867d43de03b8b25eb3e6f +0 -0
- data/test/dummy/tmp/cache/assets/D63/400/sprockets%2F30721d1c6698a64ac1cdc7e8d3ad37a0 +0 -0
- data/test/dummy/tmp/cache/assets/D65/3D0/sprockets%2Fc70f23593414be8a0daf25149ecb06fd +0 -0
- data/test/dummy/tmp/cache/assets/D68/020/sprockets%2Fc393ddcb5c7dbaf1665bc90491523d23 +0 -0
- data/test/dummy/tmp/cache/assets/D68/9F0/sprockets%2F0a2eac996cb10aab983963ec21c9d166 +0 -0
- data/test/dummy/tmp/cache/assets/D68/FA0/sprockets%2F315d926695d2ababc102ded8362e7c7b +0 -0
- data/test/dummy/tmp/cache/assets/D69/810/sprockets%2F8a4fedc6fc72ca37c7403924c01b374d +0 -0
- data/test/dummy/tmp/cache/assets/D6A/400/sprockets%2F7797a681a0c8c541bad4febaa526920e +0 -0
- data/test/dummy/tmp/cache/assets/D6A/800/sprockets%2F9e3ba44ae81df1dc8c541a05e0239c79 +0 -0
- data/test/dummy/tmp/cache/assets/D6B/890/sprockets%2Fdacdb6e192b1709870319bbb0feb3669 +0 -0
- data/test/dummy/tmp/cache/assets/D6D/DD0/sprockets%2Ffbfa79e06a10e3016c741fff74c5e652 +0 -0
- data/test/dummy/tmp/cache/assets/D6E/540/sprockets%2F1ec9a9013efe375e03b9ba538af9b515 +0 -0
- data/test/dummy/tmp/cache/assets/D70/D70/sprockets%2Fd7f6a9d69e31ff706e22c0b283b6a1e4 +0 -0
- data/test/dummy/tmp/cache/assets/D70/F70/sprockets%2Ff296c418125b7be0bc89c34eec50e82d +0 -0
- data/test/dummy/tmp/cache/assets/D71/6E0/sprockets%2F8c3e23061d8826cf63999adbe4a0d5ba +0 -0
- data/test/dummy/tmp/cache/assets/D73/3D0/sprockets%2Fbad4cc5e382119c131bd5947dd7c96e7 +0 -0
- data/test/dummy/tmp/cache/assets/D74/9D0/sprockets%2F1893ad2efa07114b729fd1f09ae97f4e +0 -0
- data/test/dummy/tmp/cache/assets/D74/EE0/sprockets%2Fe68a01853f554a88bb865bc94ba1bbd9 +0 -0
- data/test/dummy/tmp/cache/assets/D75/900/sprockets%2F857ad23ff231bc76bec12fd9a966538a +0 -0
- data/test/dummy/tmp/cache/assets/D76/060/sprockets%2Fd80d293a509fdecc872163f94b8fcc13 +0 -0
- data/test/dummy/tmp/cache/assets/D76/350/sprockets%2F66508d9698453a0ffabcf1368ca7a1fc +0 -0
- data/test/dummy/tmp/cache/assets/D79/820/sprockets%2F99bcacecd3fb76124a968b4b8341e729 +0 -0
- data/test/dummy/tmp/cache/assets/D7E/130/sprockets%2F1affef8c994fdc43ba85491b2724627f +0 -0
- data/test/dummy/tmp/cache/assets/D7E/C00/sprockets%2F8ed69e6fd77505a244caf6dde36822e3 +0 -0
- data/test/dummy/tmp/cache/assets/D80/7A0/sprockets%2F68e74ee988b46d128ff3020bc0e9c7fd +0 -0
- data/test/dummy/tmp/cache/assets/D82/800/sprockets%2F9f0d326f40e88f324ff3a367d9b3fc9f +0 -0
- data/test/dummy/tmp/cache/assets/D84/650/sprockets%2Fea05e644410721afbbd8fd1a3a7a1c08 +0 -0
- data/test/dummy/tmp/cache/assets/D89/3A0/sprockets%2F53ef2870ac0bb142a8322eee9adca207 +0 -0
- data/test/dummy/tmp/cache/assets/D8B/240/sprockets%2Faddf06da0d70aa150d16b97b6816d0d6 +0 -0
- data/test/dummy/tmp/cache/assets/D8B/3B0/sprockets%2Fd0c134b0b275ea2f800380fcaebc95f5 +0 -0
- data/test/dummy/tmp/cache/assets/D8D/F70/sprockets%2F70d5fc5c803f7ba21c3a7374003bfcdd +0 -0
- data/test/dummy/tmp/cache/assets/D8F/B90/sprockets%2F5468bccabc20d4cf562bd110508df3d8 +0 -0
- data/test/dummy/tmp/cache/assets/D92/3B0/sprockets%2Fc03a95a4b2eb432d9f5ceda3fb082860 +0 -0
- data/test/dummy/tmp/cache/assets/D93/FE0/sprockets%2Fac1c5a644564a7fd2861539dbaf2a0fb +0 -0
- data/test/dummy/tmp/cache/assets/D95/500/sprockets%2Fa3c0fdf5260f72d128f7cbb2a64fd408 +0 -0
- data/test/dummy/tmp/cache/assets/D97/2E0/sprockets%2F93c35b873a3c8ea35f1628e1ad2deb2b +0 -0
- data/test/dummy/tmp/cache/assets/D97/4A0/sprockets%2F2fae66f8ad04be7ce8109005c735acf1 +0 -0
- data/test/dummy/tmp/cache/assets/D98/E90/sprockets%2F04cdcb52b072efd49452f2cde9721fb4 +0 -0
- data/test/dummy/tmp/cache/assets/D9C/E90/sprockets%2F7d2da4bd8ee5b4ff754581d41806aba2 +0 -0
- data/test/dummy/tmp/cache/assets/DA0/2C0/sprockets%2F61c0dfd9a973f9891cd3d6b322bc33ea +0 -0
- data/test/dummy/tmp/cache/assets/DA0/C70/sprockets%2Ff29a718bce262c8d86f3abe9443b41cb +0 -0
- data/test/dummy/tmp/cache/assets/DA3/A00/sprockets%2F7e7df285dbb4694a5f1583fba12ab84d +0 -0
- data/test/dummy/tmp/cache/assets/DA3/EC0/sprockets%2F159d528ec53e415cbc9d29be3a2b96fb +0 -0
- data/test/dummy/tmp/cache/assets/DA5/170/sprockets%2F6a564a0e1afd718a07d87f069bc48dff +0 -0
- data/test/dummy/tmp/cache/assets/DA6/730/sprockets%2F5758d9d4ad2c22c9ffd113a78f6d36bb +0 -0
- data/test/dummy/tmp/cache/assets/DA7/6F0/sprockets%2F3e39ce593cda9b3bce9c3c8e014829b5 +0 -0
- data/test/dummy/tmp/cache/assets/DA9/0B0/sprockets%2F66e39ce1e6e7adc58cb01550fe58c93d +0 -0
- data/test/dummy/tmp/cache/assets/DAD/9D0/sprockets%2Fc99ec7c84f8f79200eda8424c6bda6e1 +0 -0
- data/test/dummy/tmp/cache/assets/DAE/B70/sprockets%2F278f525bc64f4ead949d9dfa1f1a37c8 +0 -0
- data/test/dummy/tmp/cache/assets/DB3/740/sprockets%2F3fc2be88f7fa50a9992fe961ffc50a83 +0 -0
- data/test/dummy/tmp/cache/assets/DB3/770/sprockets%2F47998ff4ce9a2b5383b95bd54ded3c3d +0 -0
- data/test/dummy/tmp/cache/assets/DB6/6C0/sprockets%2Fe710d8fbf4ca41d29a742b22a21a0fec +0 -0
- data/test/dummy/tmp/cache/assets/DBC/330/sprockets%2Ffc79d797d11878bc435b668cdfbc94cf +0 -0
- data/test/dummy/tmp/cache/assets/DBF/270/sprockets%2F820ebc60d1be685f4044d1cb8cabdd17 +0 -0
- data/test/dummy/tmp/cache/assets/DBF/E80/sprockets%2F41d82531e91fc1ca0c806beacf0cfc84 +0 -0
- data/test/dummy/tmp/cache/assets/DC1/E40/sprockets%2F57aebd4c69abf9331b4770bd3ced100d +0 -0
- data/test/dummy/tmp/cache/assets/DC1/FD0/sprockets%2Ff97fb61e211912bbc1eaed82c4ad740c +0 -0
- data/test/dummy/tmp/cache/assets/DC2/250/sprockets%2Ffddac1268ff054c12ea32cc6619c46ac +0 -0
- data/test/dummy/tmp/cache/assets/DC2/5F0/sprockets%2F68dc2f8cab31bbd8ab65220c685eb15b +0 -0
- data/test/dummy/tmp/cache/assets/DC3/7C0/sprockets%2Fa78b7c0aa57b250e05d5ad1e56ac9ed5 +0 -0
- data/test/dummy/tmp/cache/assets/DC9/330/sprockets%2Fc5fe138ffe1adb009a407c172fcb9b49 +0 -0
- data/test/dummy/tmp/cache/assets/DCC/F10/sprockets%2F4fb860d9bb2c56165fae6ecc193bd1f2 +0 -0
- data/test/dummy/tmp/cache/assets/DCE/0E0/sprockets%2Fc1845aeaffa0d9c887108b5cf1a77dc2 +0 -0
- data/test/dummy/tmp/cache/assets/DCE/920/sprockets%2F5208ac969dfa6f4dd531ef2d2afb454b +0 -0
- data/test/dummy/tmp/cache/assets/DCE/950/sprockets%2F2d0d1caef1b638f88de704d1eb07be88 +0 -0
- data/test/dummy/tmp/cache/assets/DCE/9C0/sprockets%2Fc6b7fd0b623a5b66692ed21dafe5ee18 +0 -0
- data/test/dummy/tmp/cache/assets/DD2/190/sprockets%2F3662cdc2f2f551c51ec9bddb9177deb7 +0 -0
- data/test/dummy/tmp/cache/assets/DD2/C80/sprockets%2Fe94b85ec5d4eeb0616972dd03cadf06f +0 -0
- data/test/dummy/tmp/cache/assets/DD3/B30/sprockets%2Ff1eab781d903ebdf7d9379cca92533ba +0 -0
- data/test/dummy/tmp/cache/assets/DD5/8F0/sprockets%2F4bfcc6fffb235da87a162efc721985e2 +0 -0
- data/test/dummy/tmp/cache/assets/DD6/8B0/sprockets%2F8ab6728b7ab04dbec482fe5fb7ef8604 +0 -0
- data/test/dummy/tmp/cache/assets/DD6/E50/sprockets%2F1ce8c04cfee001955cf5fd9ed7d59a52 +0 -0
- data/test/dummy/tmp/cache/assets/DD9/D30/sprockets%2F9abfa5c86dbf28fd7be89b650c3d5225 +0 -0
- data/test/dummy/tmp/cache/assets/DE7/E30/sprockets%2F18bca0215ecdc63ba01a2ee5cd7c34f8 +0 -0
- data/test/dummy/tmp/cache/assets/DE8/C20/sprockets%2Fc91409dc1b447ba1beaa0be9b33ef14d +0 -0
- data/test/dummy/tmp/cache/assets/DED/270/sprockets%2Fdee70d8becb01a00e2d7420c6a646dff +0 -0
- data/test/dummy/tmp/cache/assets/DF4/2D0/sprockets%2Ffd83bba93ef8ca1a70c63ee4b625a6b0 +0 -0
- data/test/dummy/tmp/cache/assets/DF8/E50/sprockets%2Fbb1bdc05e895b8c08cb6ca4491ed51cf +0 -0
- data/test/dummy/tmp/cache/assets/DFB/EC0/sprockets%2F94ccf06d9a630eaa4a9865d7e74aaaba +0 -0
- data/test/dummy/tmp/cache/assets/DFC/FC0/sprockets%2Fd8badee5b41f9328df1d3fe153eef401 +0 -0
- data/test/dummy/tmp/cache/assets/DFD/F30/sprockets%2Fd60da4793bab6bff313a6bfc25985dfb +0 -0
- data/test/dummy/tmp/cache/assets/DFE/230/sprockets%2Fd260ce7fb8bf41f914b57c0dde9b0af6 +0 -0
- data/test/dummy/tmp/cache/assets/DFE/2E0/sprockets%2F813f277df6cd78babbdb7f5c34f3ab05 +0 -0
- data/test/dummy/tmp/cache/assets/DFE/E50/sprockets%2F59b3e0cbbf99e92737aab0bcfc205f5f +0 -0
- data/test/dummy/tmp/cache/assets/DFF/9F0/sprockets%2Fb4677ae08ff6f9edaf3b2bcbb115a963 +0 -0
- data/test/dummy/tmp/cache/assets/E05/480/sprockets%2F789f3eb9b0ee9d3fb684066acaebd4a1 +0 -0
- data/test/dummy/tmp/cache/assets/E08/8A0/sprockets%2F3cb6916a9933fdfd43d6defe3e4a6d1d +0 -0
- data/test/dummy/tmp/cache/assets/E09/A00/sprockets%2F77913b88dec083cedb3875beae2efd5a +0 -0
- data/test/dummy/tmp/cache/assets/E16/E60/sprockets%2Ffe5e3c5af908e8cc7ff70976fdc14db7 +0 -0
- data/test/dummy/tmp/cache/assets/E28/B70/sprockets%2Fb2fa75ae01dda6654abd60c78c8bf5cf +0 -0
- data/test/dummy/tmp/cache/assets/E30/8A0/sprockets%2F5d3fccefabad47a78655a5c92adb3c76 +0 -0
- data/test/dummy/tmp/cache/assets/E36/9F0/sprockets%2Fb2bdf95afd8ecf06ce9b8407a2f9b1b8 +0 -0
- data/test/dummy/tmp/cache/assets/E3E/C60/sprockets%2F8b3bfb5dbc23d849d4f2fc6dd7fe45d9 +0 -0
- data/test/dummy/tmp/cache/assets/E3F/B10/sprockets%2F7b1af74e67b27fff762f3cdfebe5f4a7 +0 -0
- data/test/dummy/tmp/cache/assets/E50/740/sprockets%2F0578ebbffb5c27d00cc86b1dd7b1eada +0 -0
- data/test/dummy/tmp/cache/assets/E50/9F0/sprockets%2Fddfa62aba6a56ed6ab5e44ae36b175ad +0 -0
- data/test/dummy/tmp/cache/assets/E5D/160/sprockets%2F44a9be8a9b567fceec2bdc4ab074bbb9 +0 -0
- data/test/dummy/tmp/cache/assets/E61/FB0/sprockets%2F97c2b65cafddc7ac59ae4a5e2a18afe8 +0 -0
- data/test/dummy/tmp/cache/assets/E73/680/sprockets%2F1a4d0b08b6fdbacbfe0d1cb7df5db251 +0 -0
- data/test/dummy/tmp/cache/assets/ED1/C10/sprockets%2Fa9a13ad3bb3a6ccbb6faac3fac0b6c8e +0 -0
- data/test/dummy/tmp/cache/assets/EF0/E30/sprockets%2F3ac422b66adec6cffa8edecf9bdea48d +0 -0
- data/test/dummy/tmp/pids/server.pid +1 -1
- metadata +33 -15
- data/app/assets/javascripts/Core/AnimationController.js +0 -148
- data/app/assets/javascripts/Scene/ImageryProviderError.js +0 -149
- data/app/assets/javascripts/Widgets/Dojo/TimelineWidget.css +0 -1
- data/app/assets/javascripts/Widgets/Dojo/TimelineWidget.js +0 -47
- data/app/assets/javascripts/Widgets/Images/Bing_Logo_51x19_White.png +0 -0
- data/app/assets/javascripts/Widgets/Images/animationBar.png +0 -0
- data/app/assets/javascripts/Workers/createVerticesFromExtent.js +0 -24
@@ -3,21 +3,31 @@
|
|
3
3
|
define(function() {
|
4
4
|
"use strict";
|
5
5
|
return "uniform float u_morphTime;\n\
|
6
|
+
\n\
|
6
7
|
varying vec3 v_positionMC;\n\
|
7
8
|
varying vec3 v_positionEC;\n\
|
8
9
|
varying vec2 v_textureCoordinates;\n\
|
10
|
+
\n\
|
9
11
|
void main()\n\
|
10
12
|
{\n\
|
11
|
-
czm_materialInput materialInput;\n\
|
12
|
-
|
13
|
-
|
14
|
-
materialInput.
|
15
|
-
materialInput.
|
16
|
-
materialInput.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
czm_materialInput materialInput;\n\
|
14
|
+
\n\
|
15
|
+
// TODO: Real 1D distance, and better 3D coordinate\n\
|
16
|
+
materialInput.st = v_textureCoordinates;\n\
|
17
|
+
materialInput.str = vec3(v_textureCoordinates, 0.0);\n\
|
18
|
+
materialInput.positionMC = v_positionMC;\n\
|
19
|
+
\n\
|
20
|
+
//Convert tangent space material normal to eye space\n\
|
21
|
+
materialInput.normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n\
|
22
|
+
materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n\
|
23
|
+
\n\
|
24
|
+
//Convert view vector to world space\n\
|
25
|
+
vec3 positionToEyeEC = -v_positionEC; \n\
|
26
|
+
materialInput.positionToEyeEC = positionToEyeEC;\n\
|
27
|
+
\n\
|
28
|
+
czm_material material = czm_getMaterial(materialInput);\n\
|
29
|
+
\n\
|
30
|
+
gl_FragColor = czm_phong(normalize(positionToEyeEC), material);\n\
|
21
31
|
}\n\
|
22
32
|
";
|
23
33
|
});
|
@@ -7,33 +7,38 @@ attribute vec3 position3DLow;\n\
|
|
7
7
|
attribute vec2 position2DHigh;\n\
|
8
8
|
attribute vec2 position2DLow;\n\
|
9
9
|
attribute vec2 textureCoordinates;\n\
|
10
|
+
\n\
|
10
11
|
uniform float u_morphTime;\n\
|
11
|
-
uniform float u_height
|
12
|
+
uniform float u_height; // in meters\n\
|
13
|
+
\n\
|
12
14
|
varying vec3 v_positionMC;\n\
|
13
15
|
varying vec3 v_positionEC;\n\
|
14
16
|
varying vec2 v_textureCoordinates;\n\
|
15
|
-
|
17
|
+
\n\
|
18
|
+
void main() \n\
|
16
19
|
{\n\
|
17
|
-
vec4 p;\n\
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
czm_translateRelativeToEye(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
20
|
+
vec4 p;\n\
|
21
|
+
\n\
|
22
|
+
if (u_morphTime == 1.0)\n\
|
23
|
+
{\n\
|
24
|
+
p = vec4(czm_translateRelativeToEye(position3DHigh, position3DLow), 1.0);\n\
|
25
|
+
}\n\
|
26
|
+
else if (u_morphTime == 0.0)\n\
|
27
|
+
{\n\
|
28
|
+
p = vec4(czm_translateRelativeToEye(vec3(u_height, position2DHigh), vec3(u_height, position2DLow)), 1.0);\n\
|
29
|
+
}\n\
|
30
|
+
else\n\
|
31
|
+
{\n\
|
32
|
+
p = czm_columbusViewMorph(\n\
|
33
|
+
czm_translateRelativeToEye(vec3(u_height, position2DHigh), vec3(u_height, position2DLow)),\n\
|
34
|
+
czm_translateRelativeToEye(position3DHigh, position3DLow), \n\
|
35
|
+
u_morphTime);\n\
|
36
|
+
}\n\
|
37
|
+
\n\
|
38
|
+
v_positionMC = position3DHigh + position3DLow; // position in model coordinates\n\
|
39
|
+
v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n\
|
40
|
+
v_textureCoordinates = textureCoordinates;\n\
|
41
|
+
gl_Position = czm_modelViewProjectionRelativeToEye * p; // position in clip coordinates\n\
|
37
42
|
}\n\
|
38
43
|
";
|
39
44
|
});
|
@@ -6,27 +6,31 @@ define(function() {
|
|
6
6
|
attribute vec3 position3DLow;\n\
|
7
7
|
attribute vec2 position2DHigh;\n\
|
8
8
|
attribute vec2 position2DLow;\n\
|
9
|
+
\n\
|
9
10
|
uniform float u_morphTime;\n\
|
10
|
-
uniform float u_height
|
11
|
-
|
11
|
+
uniform float u_height; // in meters\n\
|
12
|
+
\n\
|
13
|
+
void main() \n\
|
12
14
|
{\n\
|
13
|
-
vec4 p;\n\
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
czm_translateRelativeToEye(
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
vec4 p;\n\
|
16
|
+
\n\
|
17
|
+
if (u_morphTime == 1.0)\n\
|
18
|
+
{\n\
|
19
|
+
p = vec4(czm_translateRelativeToEye(position3DHigh, position3DLow), 1.0);\n\
|
20
|
+
}\n\
|
21
|
+
else if (u_morphTime == 0.0)\n\
|
22
|
+
{\n\
|
23
|
+
p = vec4(czm_translateRelativeToEye(vec3(u_height, position2DHigh), vec3(u_height, position2DLow)), 1.0);\n\
|
24
|
+
}\n\
|
25
|
+
else\n\
|
26
|
+
{\n\
|
27
|
+
p = czm_columbusViewMorph(\n\
|
28
|
+
czm_translateRelativeToEye(vec3(u_height, position2DHigh), vec3(u_height, position2DLow)),\n\
|
29
|
+
czm_translateRelativeToEye(position3DHigh, position3DLow), \n\
|
30
|
+
u_morphTime);\n\
|
31
|
+
}\n\
|
32
|
+
\n\
|
33
|
+
gl_Position = czm_modelViewProjectionRelativeToEye * p;\n\
|
30
34
|
}\n\
|
31
35
|
";
|
32
36
|
});
|
@@ -8,28 +8,33 @@ attribute vec3 position2DHigh;\n\
|
|
8
8
|
attribute vec3 position2DLow;\n\
|
9
9
|
attribute vec4 color;\n\
|
10
10
|
attribute float show;\n\
|
11
|
+
\n\
|
11
12
|
varying vec4 v_color;\n\
|
13
|
+
\n\
|
12
14
|
uniform float u_morphTime;\n\
|
13
|
-
|
15
|
+
\n\
|
16
|
+
void main() \n\
|
14
17
|
{\n\
|
15
|
-
vec4 p;\n\
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
czm_translateRelativeToEye(
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
vec4 p;\n\
|
19
|
+
\n\
|
20
|
+
if (u_morphTime == 1.0)\n\
|
21
|
+
{\n\
|
22
|
+
p = vec4(czm_translateRelativeToEye(position3DHigh, position3DLow), 1.0);\n\
|
23
|
+
}\n\
|
24
|
+
else if (u_morphTime == 0.0)\n\
|
25
|
+
{\n\
|
26
|
+
p = vec4(czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy), 1.0);\n\
|
27
|
+
}\n\
|
28
|
+
else\n\
|
29
|
+
{\n\
|
30
|
+
p = czm_columbusViewMorph(\n\
|
31
|
+
czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\n\
|
32
|
+
czm_translateRelativeToEye(position3DHigh, position3DLow), \n\
|
33
|
+
u_morphTime);\n\
|
34
|
+
}\n\
|
35
|
+
\n\
|
36
|
+
gl_Position = czm_modelViewProjectionRelativeToEye * p * show; // position in clip coordinates\n\
|
37
|
+
v_color = color;\n\
|
33
38
|
}\n\
|
34
39
|
";
|
35
40
|
});
|
@@ -2,356 +2,537 @@
|
|
2
2
|
/*global define*/
|
3
3
|
define(function() {
|
4
4
|
"use strict";
|
5
|
-
return "
|
5
|
+
return "/**\n\
|
6
|
+
* DOC_TBA\n\
|
7
|
+
*\n\
|
8
|
+
* @name czm_raySegmentCollectionCapacity\n\
|
9
|
+
* @glslConstant \n\
|
10
|
+
*\n\
|
11
|
+
* @see czm_raySegmentCollection\n\
|
12
|
+
*/\n\
|
13
|
+
const int czm_raySegmentCollectionCapacity = 4;\n\
|
14
|
+
\n\
|
15
|
+
/**\n\
|
16
|
+
* DOC_TBA\n\
|
17
|
+
*\n\
|
18
|
+
* @name czm_raySegmentCollection\n\
|
19
|
+
* @glslStruct\n\
|
20
|
+
*\n\
|
21
|
+
* @see czm_raySegmentCollectionCapacity\n\
|
22
|
+
* @see czm_raySegment\n\
|
23
|
+
*/\n\
|
6
24
|
struct czm_raySegmentCollection\n\
|
7
25
|
{\n\
|
8
|
-
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
9
|
-
int count;\n\
|
26
|
+
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
27
|
+
int count;\n\
|
10
28
|
};\n\
|
29
|
+
\n\
|
30
|
+
/**\n\
|
31
|
+
* DOC_TBA\n\
|
32
|
+
*\n\
|
33
|
+
* @name czm_raySegmentCollectionNew\n\
|
34
|
+
* @glslFunction\n\
|
35
|
+
*\n\
|
36
|
+
*/\n\
|
11
37
|
czm_raySegmentCollection czm_raySegmentCollectionNew()\n\
|
12
38
|
{\n\
|
13
|
-
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
14
|
-
czm_raySegmentCollection i = czm_raySegmentCollection(intervals, 0);\n\
|
15
|
-
return i;\n\
|
39
|
+
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
40
|
+
czm_raySegmentCollection i = czm_raySegmentCollection(intervals, 0);\n\
|
41
|
+
return i;\n\
|
16
42
|
}\n\
|
43
|
+
\n\
|
17
44
|
czm_raySegmentCollection czm_raySegmentCollectionNew(czm_raySegment segment)\n\
|
18
45
|
{\n\
|
19
|
-
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
20
|
-
intervals[0] = segment;\n\
|
21
|
-
czm_raySegmentCollection i = czm_raySegmentCollection(intervals, 1);\n\
|
22
|
-
return i;\n\
|
46
|
+
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
47
|
+
intervals[0] = segment;\n\
|
48
|
+
czm_raySegmentCollection i = czm_raySegmentCollection(intervals, 1);\n\
|
49
|
+
return i;\n\
|
23
50
|
}\n\
|
51
|
+
\n\
|
24
52
|
czm_raySegmentCollection czm_raySegmentCollectionNew(czm_raySegment first, czm_raySegment second)\n\
|
25
53
|
{\n\
|
26
|
-
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
27
|
-
intervals[0] = first;\n\
|
28
|
-
intervals[1] = second;\n\
|
29
|
-
czm_raySegmentCollection i = czm_raySegmentCollection(intervals, 2);\n\
|
30
|
-
return i;\n\
|
31
|
-
}\n\
|
54
|
+
czm_raySegment intervals[czm_raySegmentCollectionCapacity];\n\
|
55
|
+
intervals[0] = first;\n\
|
56
|
+
intervals[1] = second;\n\
|
57
|
+
czm_raySegmentCollection i = czm_raySegmentCollection(intervals, 2);\n\
|
58
|
+
return i;\n\
|
59
|
+
}\n\
|
60
|
+
\n\
|
61
|
+
///////////////////////////////////////////////////////////////////////////////\n\
|
62
|
+
\n\
|
63
|
+
/**\n\
|
64
|
+
* DOC_TBA\n\
|
65
|
+
*\n\
|
66
|
+
* @name czm_removeAt\n\
|
67
|
+
* @glslFunction\n\
|
68
|
+
*\n\
|
69
|
+
*/\n\
|
32
70
|
void czm_removeAt(inout czm_raySegmentCollection collection, int index)\n\
|
33
71
|
{\n\
|
34
|
-
--collection.count;\n\
|
35
|
-
for (int i = 0; i < czm_raySegmentCollectionCapacity; ++i)\n\
|
36
|
-
{\n\
|
37
|
-
if (i >= index && i < collection.count)\n\
|
38
|
-
{\n\
|
39
|
-
collection.intervals[i] = collection.intervals[i + 1];\n\
|
40
|
-
}\n\
|
41
|
-
else if (i == collection.count)\n\
|
42
|
-
{\n\
|
43
|
-
break;\n\
|
44
|
-
}\n\
|
45
|
-
}\n\
|
46
|
-
}\n\
|
72
|
+
--collection.count;\n\
|
73
|
+
for (int i = 0; i < czm_raySegmentCollectionCapacity; ++i)\n\
|
74
|
+
{\n\
|
75
|
+
if (i >= index && i < collection.count)\n\
|
76
|
+
{\n\
|
77
|
+
collection.intervals[i] = collection.intervals[i + 1];\n\
|
78
|
+
}\n\
|
79
|
+
else if (i == collection.count)\n\
|
80
|
+
{\n\
|
81
|
+
break;\n\
|
82
|
+
}\n\
|
83
|
+
}\n\
|
84
|
+
}\n\
|
85
|
+
\n\
|
86
|
+
///////////////////////////////////////////////////////////////////////////////\n\
|
87
|
+
\n\
|
88
|
+
/**\n\
|
89
|
+
* DOC_TBA\n\
|
90
|
+
*\n\
|
91
|
+
* @name czm_insertAt\n\
|
92
|
+
* @glslFunction\n\
|
93
|
+
*\n\
|
94
|
+
*/\n\
|
47
95
|
void czm_insertAt(inout czm_raySegmentCollection collection, czm_raySegment segment, int index)\n\
|
48
96
|
{\n\
|
49
|
-
for (int i = czm_raySegmentCollectionCapacity - 1; i >= 0; --i)\n\
|
50
|
-
{\n\
|
51
|
-
if (i <= collection.count && i > index)\n\
|
52
|
-
{\n\
|
53
|
-
collection.intervals[i] = collection.intervals[i - 1];\n\
|
54
|
-
}\n\
|
55
|
-
else if (i == index)\n\
|
56
|
-
{\n\
|
57
|
-
collection.intervals[i] = segment;\n\
|
58
|
-
}\n\
|
59
|
-
else if (i < index)\n\
|
60
|
-
{\n\
|
61
|
-
break;\n\
|
62
|
-
}\n\
|
63
|
-
}\n\
|
64
|
-
++collection.count;\n\
|
65
|
-
}\n\
|
97
|
+
for (int i = czm_raySegmentCollectionCapacity - 1; i >= 0; --i)\n\
|
98
|
+
{\n\
|
99
|
+
if (i <= collection.count && i > index)\n\
|
100
|
+
{\n\
|
101
|
+
collection.intervals[i] = collection.intervals[i - 1];\n\
|
102
|
+
}\n\
|
103
|
+
else if (i == index)\n\
|
104
|
+
{\n\
|
105
|
+
collection.intervals[i] = segment;\n\
|
106
|
+
}\n\
|
107
|
+
else if (i < index)\n\
|
108
|
+
{\n\
|
109
|
+
break;\n\
|
110
|
+
}\n\
|
111
|
+
}\n\
|
112
|
+
++collection.count;\n\
|
113
|
+
}\n\
|
114
|
+
\n\
|
66
115
|
void czm_insertAt(inout czm_raySegmentCollection collection, czm_raySegmentCollection segments, int index)\n\
|
67
116
|
{\n\
|
68
|
-
if (segments.count == 1)\n\
|
69
|
-
{\n\
|
70
|
-
czm_insertAt(collection, segments.intervals[0], index);\n\
|
71
|
-
}\n\
|
72
|
-
else\n\
|
73
|
-
{\n\
|
74
|
-
for (int i = czm_raySegmentCollectionCapacity - 1; i >= 0; --i)\n\
|
75
|
-
{\n\
|
76
|
-
if (i < segments.count)\n\
|
77
|
-
{\n\
|
78
|
-
czm_insertAt(collection, segments.intervals[i], index);\n\
|
79
|
-
}\n\
|
80
|
-
}\n\
|
81
|
-
}\n\
|
82
|
-
}\n\
|
117
|
+
if (segments.count == 1)\n\
|
118
|
+
{\n\
|
119
|
+
czm_insertAt(collection, segments.intervals[0], index);\n\
|
120
|
+
}\n\
|
121
|
+
else\n\
|
122
|
+
{\n\
|
123
|
+
for (int i = czm_raySegmentCollectionCapacity - 1; i >= 0; --i)\n\
|
124
|
+
{\n\
|
125
|
+
if (i < segments.count)\n\
|
126
|
+
{\n\
|
127
|
+
czm_insertAt(collection, segments.intervals[i], index);\n\
|
128
|
+
}\n\
|
129
|
+
}\n\
|
130
|
+
}\n\
|
131
|
+
}\n\
|
132
|
+
\n\
|
133
|
+
///////////////////////////////////////////////////////////////////////////////\n\
|
134
|
+
\n\
|
135
|
+
/**\n\
|
136
|
+
* DOC_TBA\n\
|
137
|
+
*\n\
|
138
|
+
* @name czm_complement\n\
|
139
|
+
* @glslFunction\n\
|
140
|
+
*\n\
|
141
|
+
*/\n\
|
83
142
|
void czm_complement(czm_raySegment segment, out czm_raySegmentCollection collection)\n\
|
84
143
|
{\n\
|
85
|
-
if (czm_isEmpty(segment))\n\
|
86
|
-
{\n\
|
87
|
-
collection = czm_raySegmentCollectionNew(czm_fullRaySegment);\n\
|
88
|
-
}\n\
|
89
|
-
else if (segment.stop == czm_infinity)\n\
|
90
|
-
{\n\
|
91
|
-
if (segment.start == 0.0)\n\
|
92
|
-
{\n\
|
93
|
-
collection = czm_raySegmentCollectionNew();\n\
|
94
|
-
}\n\
|
95
|
-
else\n\
|
96
|
-
{\n\
|
97
|
-
collection = czm_raySegmentCollectionNew(czm_raySegment(0.0, segment.start));\n\
|
98
|
-
}\n\
|
99
|
-
}\n\
|
100
|
-
else if (segment.start == 0.0)\n\
|
101
|
-
{\n\
|
102
|
-
collection = czm_raySegmentCollectionNew(czm_raySegment(segment.stop, czm_infinity));\n\
|
103
|
-
}\n\
|
104
|
-
else\n\
|
105
|
-
{\n\
|
106
|
-
czm_raySegment head = czm_raySegment(0.0, segment.start);\n\
|
107
|
-
czm_raySegment tail = czm_raySegment(segment.stop, czm_infinity);\n\
|
108
|
-
collection = czm_raySegmentCollectionNew(head, tail);\n\
|
109
|
-
}\n\
|
110
|
-
}\n\
|
144
|
+
if (czm_isEmpty(segment))\n\
|
145
|
+
{\n\
|
146
|
+
collection = czm_raySegmentCollectionNew(czm_fullRaySegment);\n\
|
147
|
+
}\n\
|
148
|
+
else if (segment.stop == czm_infinity)\n\
|
149
|
+
{\n\
|
150
|
+
if (segment.start == 0.0)\n\
|
151
|
+
{\n\
|
152
|
+
collection = czm_raySegmentCollectionNew();\n\
|
153
|
+
}\n\
|
154
|
+
else\n\
|
155
|
+
{\n\
|
156
|
+
collection = czm_raySegmentCollectionNew(czm_raySegment(0.0, segment.start));\n\
|
157
|
+
}\n\
|
158
|
+
}\n\
|
159
|
+
else if (segment.start == 0.0)\n\
|
160
|
+
{\n\
|
161
|
+
collection = czm_raySegmentCollectionNew(czm_raySegment(segment.stop, czm_infinity));\n\
|
162
|
+
}\n\
|
163
|
+
else\n\
|
164
|
+
{\n\
|
165
|
+
czm_raySegment head = czm_raySegment(0.0, segment.start);\n\
|
166
|
+
czm_raySegment tail = czm_raySegment(segment.stop, czm_infinity);\n\
|
167
|
+
collection = czm_raySegmentCollectionNew(head, tail);\n\
|
168
|
+
} \n\
|
169
|
+
}\n\
|
170
|
+
\n\
|
111
171
|
czm_raySegmentCollection czm_complement(czm_raySegmentCollection collection)\n\
|
112
172
|
{\n\
|
113
|
-
if (collection.count == 0)\n\
|
114
|
-
{\n\
|
115
|
-
czm_raySegmentCollection result = czm_raySegmentCollectionNew(czm_fullRaySegment);\n\
|
116
|
-
return result;\n\
|
117
|
-
}\n\
|
118
|
-
else if (collection.count == 1)\n\
|
119
|
-
{\n\
|
120
|
-
czm_raySegmentCollection result;\n\
|
121
|
-
czm_complement(collection.intervals[0], result);\n\
|
122
|
-
return result;\n\
|
123
|
-
}\n\
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
{\n\
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
if (
|
151
|
-
{\n\
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
173
|
+
if (collection.count == 0)\n\
|
174
|
+
{\n\
|
175
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew(czm_fullRaySegment);\n\
|
176
|
+
return result;\n\
|
177
|
+
}\n\
|
178
|
+
else if (collection.count == 1)\n\
|
179
|
+
{\n\
|
180
|
+
czm_raySegmentCollection result;\n\
|
181
|
+
czm_complement(collection.intervals[0], result);\n\
|
182
|
+
return result;\n\
|
183
|
+
}\n\
|
184
|
+
\n\
|
185
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew();\n\
|
186
|
+
\n\
|
187
|
+
for (int i = 0; i < czm_raySegmentCollectionCapacity; ++i)\n\
|
188
|
+
{\n\
|
189
|
+
if (i < collection.count)\n\
|
190
|
+
{\n\
|
191
|
+
float start = collection.intervals[i].stop;\n\
|
192
|
+
if (i < collection.count - 1)\n\
|
193
|
+
{\n\
|
194
|
+
float stop = collection.intervals[i + 1].start;\n\
|
195
|
+
result.intervals[i] = czm_raySegment(start, stop);\n\
|
196
|
+
++result.count;\n\
|
197
|
+
}\n\
|
198
|
+
else if (start != czm_infinity)\n\
|
199
|
+
{\n\
|
200
|
+
result.intervals[i] = czm_raySegment(start, czm_infinity);\n\
|
201
|
+
++result.count;\n\
|
202
|
+
}\n\
|
203
|
+
}\n\
|
204
|
+
else\n\
|
205
|
+
{\n\
|
206
|
+
break;\n\
|
207
|
+
}\n\
|
208
|
+
}\n\
|
209
|
+
\n\
|
210
|
+
if (collection.count > 0)\n\
|
211
|
+
{\n\
|
212
|
+
float stop = collection.intervals[0].start;\n\
|
213
|
+
if (stop != 0.0)\n\
|
214
|
+
{\n\
|
215
|
+
// PERFORMANCE TODO: See if the additional loop iteration from the insert can be eliminated.\n\
|
216
|
+
czm_insertAt(result, czm_raySegment(0.0, stop), 0);\n\
|
217
|
+
}\n\
|
218
|
+
}\n\
|
219
|
+
\n\
|
220
|
+
return result;\n\
|
221
|
+
}\n\
|
222
|
+
\n\
|
223
|
+
///////////////////////////////////////////////////////////////////////////////\n\
|
224
|
+
\n\
|
225
|
+
/**\n\
|
226
|
+
* DOC_TBA\n\
|
227
|
+
*\n\
|
228
|
+
* @name czm_union\n\
|
229
|
+
*/\n\
|
157
230
|
czm_raySegmentCollection czm_union(czm_raySegment left, czm_raySegment right)\n\
|
158
231
|
{\n\
|
159
|
-
if (czm_isFull(left) || czm_isFull(right))\n\
|
160
|
-
{\n\
|
161
|
-
czm_raySegmentCollection result = czm_raySegmentCollectionNew(czm_fullRaySegment);\n\
|
162
|
-
return result;\n\
|
163
|
-
}\n\
|
164
|
-
|
165
|
-
float
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
232
|
+
if (czm_isFull(left) || czm_isFull(right))\n\
|
233
|
+
{\n\
|
234
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew(czm_fullRaySegment);\n\
|
235
|
+
return result;\n\
|
236
|
+
}\n\
|
237
|
+
\n\
|
238
|
+
float stop = min(left.stop, right.stop);\n\
|
239
|
+
float start = max(left.start, right.start);\n\
|
240
|
+
\n\
|
241
|
+
if (stop < start) // No intersection.\n\
|
242
|
+
{\n\
|
243
|
+
czm_raySegmentCollection result = (left.start < right.start) ? czm_raySegmentCollectionNew(left, right) : czm_raySegmentCollectionNew(right, left);\n\
|
244
|
+
return result;\n\
|
245
|
+
}\n\
|
246
|
+
\n\
|
247
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew(czm_raySegment(min(left.start, right.start), max(left.stop, right.stop)));\n\
|
248
|
+
return result;\n\
|
249
|
+
}\n\
|
250
|
+
\n\
|
251
|
+
///////////////////////////////////////////////////////////////////////////////\n\
|
252
|
+
\n\
|
253
|
+
/**\n\
|
254
|
+
* Determines the intersection of two time intervals. If they do not intersect, an\n\
|
255
|
+
* empty time interval, <code>czm_emptyRaySegment</code>, is returned.\n\
|
256
|
+
*\n\
|
257
|
+
* @name czm_intersection\n\
|
258
|
+
* @glslFunction \n\
|
259
|
+
*\n\
|
260
|
+
* @param {czm_raySegment} left One interval.\n\
|
261
|
+
* @param {czm_raySegment} right The other interval.\n\
|
262
|
+
*\n\
|
263
|
+
* @returns {czm_raySegment} The intersection of <code>left</code> and <code>right</code>.\n\
|
264
|
+
* \n\
|
265
|
+
* @see czm_unionRaySegments\n\
|
266
|
+
* @see czm_subtraction \n\
|
267
|
+
* @see czm_isEmpty\n\
|
268
|
+
*\n\
|
269
|
+
* @example\n\
|
270
|
+
* czm_raySegment i0 = czm_intersection(czm_raySegment(1.0, 2.0), czm_raySegment(3.0, 4.0)); // Empty\n\
|
271
|
+
* czm_raySegment i1 = czm_intersection(czm_raySegment(1.0, 3.0), czm_raySegment(2.0, 4.0)); // (2.0, 3.0)\n\
|
272
|
+
*/\n\
|
174
273
|
czm_raySegment czm_intersection(czm_raySegment left, czm_raySegment right)\n\
|
175
274
|
{\n\
|
176
|
-
float stop = min(left.stop, right.stop);\n\
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
return
|
188
|
-
}\n\
|
275
|
+
float stop = min(left.stop, right.stop);\n\
|
276
|
+
\n\
|
277
|
+
if (stop < 0.0)\n\
|
278
|
+
{\n\
|
279
|
+
return czm_emptyRaySegment;\n\
|
280
|
+
}\n\
|
281
|
+
\n\
|
282
|
+
float start = max(left.start, right.start);\n\
|
283
|
+
\n\
|
284
|
+
if (stop < start)\n\
|
285
|
+
{\n\
|
286
|
+
return czm_emptyRaySegment;\n\
|
287
|
+
}\n\
|
288
|
+
\n\
|
289
|
+
czm_raySegment s = czm_raySegment(start, stop);\n\
|
290
|
+
return s;\n\
|
291
|
+
}\n\
|
292
|
+
\n\
|
189
293
|
czm_raySegmentCollection czm_intersection(czm_raySegmentCollection left, czm_raySegment right)\n\
|
190
294
|
{\n\
|
191
|
-
if (left.count == 1)\n\
|
192
|
-
{\n\
|
193
|
-
czm_raySegment intersection = czm_intersection(left.intervals[0], right);\n\
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
{\n\
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
{\n\
|
218
|
-
|
219
|
-
}\n\
|
220
|
-
}\n\
|
221
|
-
|
222
|
-
|
295
|
+
if (left.count == 1)\n\
|
296
|
+
{\n\
|
297
|
+
czm_raySegment intersection = czm_intersection(left.intervals[0], right);\n\
|
298
|
+
\n\
|
299
|
+
if (czm_isEmpty(intersection))\n\
|
300
|
+
{\n\
|
301
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew();\n\
|
302
|
+
\n\
|
303
|
+
return result;\n\
|
304
|
+
}\n\
|
305
|
+
else\n\
|
306
|
+
{\n\
|
307
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew(intersection);\n\
|
308
|
+
\n\
|
309
|
+
return result;\n\
|
310
|
+
}\n\
|
311
|
+
}\n\
|
312
|
+
\n\
|
313
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew();\n\
|
314
|
+
\n\
|
315
|
+
for (int leftIndex = 0; leftIndex < czm_raySegmentCollectionCapacity; ++leftIndex)\n\
|
316
|
+
{\n\
|
317
|
+
if (leftIndex < left.count)\n\
|
318
|
+
{\n\
|
319
|
+
czm_raySegment intersection = czm_intersection(left.intervals[leftIndex], right);\n\
|
320
|
+
if (!czm_isEmpty(intersection))\n\
|
321
|
+
{\n\
|
322
|
+
czm_insertAt(result, intersection, result.count);\n\
|
323
|
+
}\n\
|
324
|
+
}\n\
|
325
|
+
else\n\
|
326
|
+
{\n\
|
327
|
+
break;\n\
|
328
|
+
}\n\
|
329
|
+
}\n\
|
330
|
+
\n\
|
331
|
+
return result;\n\
|
332
|
+
}\n\
|
333
|
+
\n\
|
223
334
|
czm_raySegmentCollection czm_intersection(czm_raySegmentCollection left, czm_raySegmentCollection right)\n\
|
224
335
|
{\n\
|
225
|
-
if (right.count == 1)\n\
|
226
|
-
{\n\
|
227
|
-
if (left.count == 1)\n\
|
228
|
-
{\n\
|
229
|
-
czm_raySegment intersection = czm_intersection(left.intervals[0], right.intervals[0]);\n\
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
{\n\
|
256
|
-
|
257
|
-
{\n\
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
}\n\
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
}\n\
|
275
|
-
}\n\
|
276
|
-
|
277
|
-
|
336
|
+
if (right.count == 1)\n\
|
337
|
+
{\n\
|
338
|
+
if (left.count == 1)\n\
|
339
|
+
{\n\
|
340
|
+
czm_raySegment intersection = czm_intersection(left.intervals[0], right.intervals[0]);\n\
|
341
|
+
\n\
|
342
|
+
if (czm_isEmpty(intersection))\n\
|
343
|
+
{\n\
|
344
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew();\n\
|
345
|
+
\n\
|
346
|
+
return result;\n\
|
347
|
+
}\n\
|
348
|
+
else\n\
|
349
|
+
{\n\
|
350
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew(intersection);\n\
|
351
|
+
\n\
|
352
|
+
return result;\n\
|
353
|
+
}\n\
|
354
|
+
}\n\
|
355
|
+
else\n\
|
356
|
+
{\n\
|
357
|
+
czm_raySegmentCollection result = czm_intersection(left, right.intervals[0]);\n\
|
358
|
+
\n\
|
359
|
+
return result;\n\
|
360
|
+
}\n\
|
361
|
+
}\n\
|
362
|
+
\n\
|
363
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew();\n\
|
364
|
+
\n\
|
365
|
+
if (left.count > 0 && right.count > 0)\n\
|
366
|
+
{\n\
|
367
|
+
for (int leftIndex = 0; leftIndex < czm_raySegmentCollectionCapacity; ++leftIndex)\n\
|
368
|
+
{\n\
|
369
|
+
if (leftIndex < left.count)\n\
|
370
|
+
{\n\
|
371
|
+
for (int rightIndex = 0; rightIndex < czm_raySegmentCollectionCapacity; ++rightIndex)\n\
|
372
|
+
{\n\
|
373
|
+
// TODO: Figure out why this isn't \"rightIndex < right.count\".\n\
|
374
|
+
if (rightIndex <= right.count && left.intervals[leftIndex].stop >= right.intervals[rightIndex].start)\n\
|
375
|
+
{\n\
|
376
|
+
czm_raySegment intersection = czm_intersection(left.intervals[leftIndex], right.intervals[rightIndex]);\n\
|
377
|
+
if (!czm_isEmpty(intersection))\n\
|
378
|
+
{\n\
|
379
|
+
czm_insertAt(result, intersection, result.count);\n\
|
380
|
+
}\n\
|
381
|
+
}\n\
|
382
|
+
else\n\
|
383
|
+
{\n\
|
384
|
+
break;\n\
|
385
|
+
}\n\
|
386
|
+
}\n\
|
387
|
+
}\n\
|
388
|
+
else\n\
|
389
|
+
{\n\
|
390
|
+
break;\n\
|
391
|
+
}\n\
|
392
|
+
}\n\
|
393
|
+
}\n\
|
394
|
+
\n\
|
395
|
+
return result;\n\
|
396
|
+
}\n\
|
397
|
+
\n\
|
398
|
+
///////////////////////////////////////////////////////////////////////////////\n\
|
399
|
+
\n\
|
400
|
+
/**\n\
|
401
|
+
* Subtracts one time interval from another, resulting in zero, one, or two non-empty time intervals.\n\
|
402
|
+
* \n\
|
403
|
+
* @name czm_subtraction\n\
|
404
|
+
* @glslFunction\n\
|
405
|
+
*\n\
|
406
|
+
* @param {czm_raySegment} outer The outer interval.\n\
|
407
|
+
* @param {czm_raySegment} inner The inner interval that is subtracted from <code>outer</code>.\n\
|
408
|
+
* \n\
|
409
|
+
* @returns {czm_raySegmentCollection} The time intervals resulting from <code>outer - inner</code>.\n\
|
410
|
+
*\n\
|
411
|
+
* @see czm_intersection\n\
|
412
|
+
* @see czm_unionRaySegments\n\
|
413
|
+
*\n\
|
414
|
+
* @example\n\
|
415
|
+
* czm_raySegmentCollection i0 = czm_subtraction(\n\
|
416
|
+
* czm_raySegment(1.0, 4.0), czm_raySegment(2.0, 3.0)); \n\
|
417
|
+
* // i0 is [(1.0, 2.0), (3.0, 4.0)]\n\
|
418
|
+
* \n\
|
419
|
+
* czm_raySegmentCollection i1 = czm_subtraction(\n\
|
420
|
+
* czm_raySegment(1.0, 4.0), czm_raySegment(1.0, 2.0));\n\
|
421
|
+
* // i1 is [(2.0, 4.0)]\n\
|
422
|
+
* \n\
|
423
|
+
* czm_raySegmentCollection i2 = czm_subtraction(\n\
|
424
|
+
* czm_raySegment(1.0, 4.0), czm_raySegment(5.0, 6.0));\n\
|
425
|
+
* // i2 is []\n\
|
426
|
+
*/\n\
|
278
427
|
czm_raySegmentCollection czm_subtraction(czm_raySegment outer, czm_raySegment inner)\n\
|
279
428
|
{\n\
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
429
|
+
// This function has ANGLE workarounds: http://code.google.com/p/angleproject/issues/detail?id=185\n\
|
430
|
+
\n\
|
431
|
+
czm_raySegmentCollection i = czm_raySegmentCollectionNew();\n\
|
432
|
+
\n\
|
433
|
+
czm_raySegment intersection = czm_intersection(outer, inner);\n\
|
434
|
+
\n\
|
435
|
+
if (czm_isEmpty(intersection) || (intersection.start == intersection.stop))\n\
|
436
|
+
{\n\
|
437
|
+
// No intersection, or intersection at an end point; subtraction doesn't change outer.\n\
|
438
|
+
i.count = 1;\n\
|
439
|
+
i.intervals[0] = outer;\n\
|
440
|
+
}\n\
|
441
|
+
else\n\
|
442
|
+
{\n\
|
443
|
+
if ((intersection.start == outer.start) && (intersection.stop == outer.stop))\n\
|
444
|
+
{\n\
|
445
|
+
// outer and inner are the same interval; subtracting them yields empty intervals.\n\
|
446
|
+
i.count = 0;\n\
|
447
|
+
}\n\
|
448
|
+
else if (intersection.start == outer.start)\n\
|
449
|
+
{\n\
|
450
|
+
// inner is completely inside outer, and touching the left boundary; subtraction yields one interval\n\
|
451
|
+
i.count = 1;\n\
|
452
|
+
i.intervals[0] = czm_raySegment(inner.stop, outer.stop);\n\
|
453
|
+
}\n\
|
454
|
+
else if (intersection.stop == outer.stop)\n\
|
455
|
+
{\n\
|
456
|
+
// inner is completely inside outer, and touching the right boundary; subtraction yields one interval\n\
|
457
|
+
i.count = 1;\n\
|
458
|
+
i.intervals[0] = czm_raySegment(outer.start, inner.start);\n\
|
459
|
+
}\n\
|
460
|
+
else\n\
|
461
|
+
{\n\
|
462
|
+
// inner is completely inside outer, but not on a boundary; break outer into two intervals\n\
|
463
|
+
i.count = 2;\n\
|
464
|
+
i.intervals[0] = czm_raySegment(outer.start, inner.start);\n\
|
465
|
+
i.intervals[1] = czm_raySegment(inner.stop, outer.stop);\n\
|
466
|
+
}\n\
|
467
|
+
}\n\
|
468
|
+
\n\
|
469
|
+
return i;\n\
|
470
|
+
}\n\
|
471
|
+
\n\
|
472
|
+
/**\n\
|
473
|
+
* DOC_TBA\n\
|
474
|
+
*\n\
|
475
|
+
* @name czm_subtraction\n\
|
476
|
+
*/\n\
|
312
477
|
czm_raySegmentCollection czm_subtraction(czm_raySegmentCollection left, czm_raySegment right)\n\
|
313
478
|
{\n\
|
314
|
-
if (left.count == 1)\n\
|
315
|
-
{\n\
|
316
|
-
czm_raySegmentCollection result = czm_subtraction(left.intervals[0], right);\n\
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
if (
|
326
|
-
{\n\
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
}\n\
|
479
|
+
if (left.count == 1)\n\
|
480
|
+
{\n\
|
481
|
+
czm_raySegmentCollection result = czm_subtraction(left.intervals[0], right);\n\
|
482
|
+
\n\
|
483
|
+
return result;\n\
|
484
|
+
}\n\
|
485
|
+
\n\
|
486
|
+
czm_raySegmentCollection result = czm_raySegmentCollectionNew();\n\
|
487
|
+
\n\
|
488
|
+
for (int leftIndex = 0; leftIndex < czm_raySegmentCollectionCapacity; ++leftIndex)\n\
|
489
|
+
{\n\
|
490
|
+
if (leftIndex < left.count)\n\
|
491
|
+
{\n\
|
492
|
+
czm_raySegmentCollection segments = czm_subtraction(left.intervals[leftIndex], right);\n\
|
493
|
+
if (segments.count != 0)\n\
|
494
|
+
{\n\
|
495
|
+
czm_insertAt(result, segments, result.count);\n\
|
496
|
+
}\n\
|
497
|
+
}\n\
|
498
|
+
else\n\
|
499
|
+
{\n\
|
500
|
+
break;\n\
|
501
|
+
}\n\
|
502
|
+
}\n\
|
503
|
+
\n\
|
504
|
+
return result;\n\
|
505
|
+
}\n\
|
506
|
+
\n\
|
507
|
+
/**\n\
|
508
|
+
* DOC_TBA\n\
|
509
|
+
*\n\
|
510
|
+
* @name czm_subtraction\n\
|
511
|
+
*/\n\
|
337
512
|
czm_raySegmentCollection czm_subtraction(czm_raySegmentCollection left, czm_raySegmentCollection right)\n\
|
338
513
|
{\n\
|
339
|
-
if (right.count == 1)\n\
|
340
|
-
{\n\
|
341
|
-
if (left.count == 1)\n\
|
342
|
-
{\n\
|
343
|
-
czm_raySegmentCollection result = czm_subtraction(left.intervals[0], right.intervals[0]);\n\
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
514
|
+
if (right.count == 1)\n\
|
515
|
+
{\n\
|
516
|
+
if (left.count == 1)\n\
|
517
|
+
{\n\
|
518
|
+
czm_raySegmentCollection result = czm_subtraction(left.intervals[0], right.intervals[0]);\n\
|
519
|
+
\n\
|
520
|
+
return result;\n\
|
521
|
+
}\n\
|
522
|
+
else\n\
|
523
|
+
{\n\
|
524
|
+
czm_raySegmentCollection result = czm_subtraction(left, right.intervals[0]);\n\
|
525
|
+
\n\
|
526
|
+
return result;\n\
|
527
|
+
}\n\
|
528
|
+
}\n\
|
529
|
+
\n\
|
530
|
+
// PERFORMANCE TODO: See if these two calls (with separate loop iterations) can be combined into one loop.\n\
|
531
|
+
czm_raySegmentCollection complement = czm_complement(right);\n\
|
532
|
+
\n\
|
533
|
+
czm_raySegmentCollection result = czm_intersection(left, complement);\n\
|
534
|
+
\n\
|
535
|
+
return result;\n\
|
355
536
|
}\n\
|
356
537
|
";
|
357
538
|
});
|