Пример #1
0
 public override void Reset()
 {
     this.GPSLocation = new FsmVector3
     {
         UseVariable = true
     };
     this.mapProjection = ProjectLocationToMap.MapProjection.EquidistantCylindrical;
     this.minLongitude = -180f;
     this.maxLongitude = 180f;
     this.minLatitude = -90f;
     this.maxLatitude = 90f;
     this.minX = 0f;
     this.minY = 0f;
     this.width = 1f;
     this.height = 1f;
     this.normalized = true;
     this.projectedX = null;
     this.projectedY = null;
     this.everyFrame = false;
 }
Пример #2
0
 public override void Reset()
 {
     this.GPSLocation = new FsmVector3
     {
         UseVariable = true
     };
     this.mapProjection = ProjectLocationToMap.MapProjection.EquidistantCylindrical;
     this.minLongitude  = -180f;
     this.maxLongitude  = 180f;
     this.minLatitude   = -90f;
     this.maxLatitude   = 90f;
     this.minX          = 0f;
     this.minY          = 0f;
     this.width         = 1f;
     this.height        = 1f;
     this.normalized    = true;
     this.projectedX    = null;
     this.projectedY    = null;
     this.everyFrame    = false;
 }
Пример #3
0
 private void DoProjectGPSLocation()
 {
     this.x = Mathf.Clamp(this.GPSLocation.Value.x, this.minLongitude.Value, this.maxLongitude.Value);
     this.y = Mathf.Clamp(this.GPSLocation.Value.y, this.minLatitude.Value, this.maxLatitude.Value);
     ProjectLocationToMap.MapProjection mapProjection = this.mapProjection;
     if (mapProjection != ProjectLocationToMap.MapProjection.EquidistantCylindrical)
     {
         if (mapProjection == ProjectLocationToMap.MapProjection.Mercator)
         {
             this.DoMercatorProjection();
         }
     }
     else
     {
         this.DoEquidistantCylindrical();
     }
     this.x *= this.width.Value;
     this.y *= this.height.Value;
     this.projectedX.Value = ((!this.normalized.Value) ? (this.minX.Value + this.x * (float)Screen.width) : (this.minX.Value + this.x));
     this.projectedY.Value = ((!this.normalized.Value) ? (this.minY.Value + this.y * (float)Screen.height) : (this.minY.Value + this.y));
 }