override public void OnPulse(Timeline timeline, double time) { ViewPosition pvp = timeline.GetMostPreviousInTime(time) as ViewPosition; ViewPosition nvp = timeline.GetNextInTime(time) as ViewPosition; if (pvp != null && nvp != null) { double alpha = ScriptPlayer.ComputeAlpha(time - pvp.Time, pvp, nvp); double span = (nvp.Longitude - pvp.Longitude) % 360; if (span >= 180) span -= 360; else if (span < -180) span += 360; double lon = pvp.Longitude + alpha * span; double lat = pvp.Latitude + alpha * (nvp.Latitude - pvp.Latitude); double ele = pvp.Elevation + alpha * (nvp.Elevation - pvp.Elevation); this.globe.SetViewPosition(lat, lon, ele); } else if (pvp != null) { this.globe.SetViewPosition(pvp.Latitude, pvp.Longitude, pvp.Elevation); } }
override public void OnPulse(Timeline timeline, double time) { WmsImage wi = timeline.GetMostPreviousInTime(time) as WmsImage; if (wi == null) return; this.globe.SetWmsImage(wi.Descriptor, null, 0); }
override public void OnPulse(Timeline timeline, double time) { ToggleBase toggle = timeline.GetMostPreviousInTime(time) as ToggleBase; if (toggle != null) { this.DoPulse(toggle.ToggleValue); } }
internal void SetTimelineHandler(Object key, Timeline.Handler handler) { Timeline t = (Timeline)this.timelines[key]; if (t != null) { t.TimelineHandler = handler; } }
override public void OnPulse(Timeline timeline, double time) { DisplayMessages dms = timeline.GetMostPreviousInTime(time) as DisplayMessages; if (dms == null) return; this.globe.SetDisplayMessages(dms.Messages); }
override public void OnPulse(Timeline timeline, double time) { Layers prev = timeline.GetMostPreviousInTime(time) as Layers; if (prev != null) { // System.Console.Write(time + " : "); this.globe.SetLayers(prev.LayerList); } }
override public void OnPulse(Timeline timeline, double time) { ViewDirection pvd = timeline.GetMostPreviousInTime(time) as ViewDirection; ViewDirection nvd = timeline.GetNextInTime(time) as ViewDirection; if (pvd != null) { if (pvd.SpecForm.Equals("angles")) this.playFromAngles(timeline, time, pvd, nvd); else if (pvd.SpecForm.Equals("position")) this.playFromPosition(timeline, time, pvd, nvd); } }
private void playFromAngles(Timeline timeline, double time, ViewDirection pvd, ViewDirection nvd) { if (pvd != null && nvd != null && pvd.SpecForm.Equals(nvd.SpecForm)) { double alpha = ScriptPlayer.ComputeAlpha(time - pvd.Time, pvd, nvd); double hSpan = nvd.HorizontalAngle - pvd.HorizontalAngle; double vSpan = nvd.VerticalAngle - pvd.VerticalAngle; double horizontal = pvd.HorizontalAngle + alpha * hSpan; double vertical = pvd.VerticalAngle + alpha * vSpan; this.globe.SetViewDirection(pvd.SpecForm, horizontal, vertical, 0); } else if (pvd != null) { this.globe.SetViewDirection(pvd.SpecForm, pvd.HorizontalAngle, pvd.VerticalAngle, 0); } }
override public void OnPulse(Timeline timeline, double time) { VerticalExaggeration pve = timeline.GetMostPreviousInTime(time) as VerticalExaggeration; VerticalExaggeration nve = timeline.GetNextInTime(time) as VerticalExaggeration; if (pve != null && nve != null) { double alpha = ScriptPlayer.ComputeAlpha(time - pve.Time, pve, nve); double span = nve.Exaggeration - pve.Exaggeration; double ve = pve.Exaggeration + alpha * span; this.globe.SetVerticalExaggeration(ve); } else if (pve != null) { this.globe.SetVerticalExaggeration(pve.Exaggeration); } }
private void playFromPosition(Timeline timeline, double time, ViewDirection pvd, ViewDirection nvd) { if (pvd != null && nvd != null) { double alpha = ScriptPlayer.ComputeAlpha(time - pvd.Time, pvd, nvd); double span = (nvd.Longitude - pvd.Longitude) % 360; if (span >= 180) span -= 360; else if (span < -180) span += 360; double lon = pvd.Longitude + alpha * span; double lat = pvd.Latitude + alpha * (nvd.Latitude - pvd.Latitude); double ele = pvd.Elevation + alpha * (nvd.Elevation - pvd.Elevation); this.globe.SetViewDirection(pvd.SpecForm, lat, lon, ele); } else if (pvd != null) { this.globe.SetViewDirection(pvd.SpecForm, pvd.Latitude, pvd.Longitude, pvd.Elevation); } }
abstract public void OnPulse(Timeline timeline, double time);
private Timeline createTimeline(Object key) { Timeline timeline = new Timeline(); this.timelines.Add(key, timeline); return timeline; }
public void DeleteSelectedCaption() { Timeline.DeleteSelectedCaption(); }