public ext_class() { this.tile = new tile_class(); this.subtile = new tile_class(); this.latlong_area = new latlong_area_class(); this.latlong_center = new latlong_class(); }
public map_export_class() { this.tiles = new tile_class(); this.tile = new tile_class(); this.subtiles = new tile_class(); this.subtile = new tile_class(); }
static public tile_class calc_terrain_tile(int terrain_index, tile_class tiles) { tile_class tile_class = new tile_class(); tile_class.y = terrain_index / tiles.x; tile_class.x = terrain_index - tile_class.y * tiles.x; return(tile_class); }
public override void getRects(tile_class tile) { int num = this.radius + 20; this.innerRect.x = (float)tile.x * this.size.x - (float)5; this.innerRect.y = (float)tile.y * this.size.y - (float)5; this.innerRect.width = this.size.x + (float)10; this.innerRect.height = this.size.y + (float)10; if (this.innerRect.xMin < (float)0) { this.innerRect.xMin = (float)0; } if (this.innerRect.yMin < (float)0) { this.innerRect.yMin = (float)0; } if (this.innerRect.xMax > this.resolution.x) { this.innerRect.xMax = this.resolution.x; } if (this.innerRect.yMax > this.resolution.y) { this.innerRect.yMax = this.resolution.y; } this.outerRect.xMin = this.innerRect.xMin - (float)num; this.outerRect.yMin = this.innerRect.yMin - (float)num; this.outerRect.xMax = this.innerRect.xMax + (float)num; this.outerRect.yMax = this.innerRect.yMax + (float)num; if (this.outerRect.xMin < (float)0) { this.outerRect.xMin = (float)0; } else if (this.outerRect.xMax > this.resolution.x) { this.outerRect.xMax = this.resolution.x; } if (this.outerRect.yMin < (float)0) { this.outerRect.yMin = (float)0; } else if (this.outerRect.yMax > this.resolution.y) { this.outerRect.yMax = this.resolution.y; } this.length = (ulong)(this.outerRect.width * this.outerRect.height * (float)3); this.offset.x = this.innerRect.x - this.outerRect.x; this.offset.y = this.innerRect.y - this.outerRect.y; if (this.bytes == null) { this.bytes = new byte[(int)this.length]; } if ((long)this.bytes.Length != (long)this.length) { this.bytes = new byte[(int)this.length]; } }
static public tile_class calc_latlong_area_tiles(latlong_class latlong1, latlong_class latlong2, double zoom, int resolution) { tile_class tile_class = new tile_class(); map_pixel_class map_pixel_class = latlong_to_pixel2(latlong1, zoom); map_pixel_class map_pixel_class2 = latlong_to_pixel2(latlong2, zoom); tile_class.x = (int)Mathf.Round((float)((map_pixel_class2.x - map_pixel_class.x) / resolution)); tile_class.y = (int)Mathf.Round((float)((map_pixel_class2.y - map_pixel_class.y) / resolution)); return(tile_class); }
public override latlong_class calc_latlong_center_by_tile(latlong_class latlong, tile_class tile, tile_class subtile, tile_class subtiles, double zoom, int resolution, Vector2 offset) { float num = Mathf.Pow((float)2, (float)((double)19 - zoom)); zoom = (double)19; resolution = (int)((float)resolution * num); latlong_class latlong_class = new latlong_class(); map_pixel_class map_pixel_class = this.latlong_to_pixel2(latlong, zoom); map_pixel_class.x += (double)(tile.x * subtiles.x * resolution + subtile.x * resolution); map_pixel_class.y += (double)(tile.y * subtiles.y * resolution + subtile.y * resolution); map_pixel_class.x += (double)((float)(resolution / 2) + offset.x); map_pixel_class.y += (double)((float)(resolution / 2) + offset.y); return(this.pixel_to_latlong2(map_pixel_class, zoom)); }
public preimage_edit_class() { this.edit_color = new List <image_edit_class>(); this.target_frame = (float)30; this.active = true; this.loop_active = true; this.byte1 = new byte[3]; this.xx = 3; this.position = new Vector2((float)(this.x - 1), (float)(this.y - 1)); this.direction = new Vector2((float)1, (float)0); this.dir = 1; this.inputBuffer = new buffer_class(); this.outputBuffer = new buffer_class(); this.radius = 300; this.radiusSelect = 300; this.mode = 1; this.tile = new tile_class(); this.repeatAmount = 3; this.content = true; }
public map_area_class(string name1, int index) { this.name = "Untitled"; this.upper_left = new latlong_class(); this.lower_right = new latlong_class(); this.center = new latlong_class(); this.size = new map_pixel_class(); this.heightmap_offset = new Vector2((float)0, (float)0); this.smooth_strength = (float)1; this.resolution = 2048; this.image_zoom = 18; this.start_tile = new tile_class(); this.tiles = new tile_class(); this.export_heightmap_path = string.Empty; this.export_heightmap_filename = string.Empty; this.export_image_path = string.Empty; this.export_image_filename = string.Empty; this.export_terrain_path = string.Empty; this.export_to_terraincomposer = true; this.converter_source_path_full = string.Empty; this.converter_destination_path_full = string.Empty; this.converter_height = (float)9000; this.terrain_asset_name = string.Empty; this.terrain_scene_name = string.Empty; this.terrain_height = (float)9000; this.terrain_scale = (float)1; this.do_heightmap = true; this.do_image = true; this.mipmapEnabled = true; this.anisoLevel = 9; this.maxTextureSize_select = 6; this.auto_import_settings_apply = true; this.preimage_path = string.Empty; this.name = name1 + index.ToString(); this.terrain_curve = AnimationCurve.Linear((float)0, (float)0, (float)1, (float)1); this.terrain_curve.AddKey((float)1, (float)0); this.terrain_curve = this.set_curve_linear(this.terrain_curve); }
public terrain_area_class() { this.terrains = new List <terrain_class2>(); this.tiles = new tile_class(); this.tiles_select = new tile_class(); this.tiles_select_link = true; this.center = new Vector3((float)0, (float)0, (float)0); this.center_synchronous = true; this.tile_synchronous = true; this.tile_position_synchronous = true; this.text_edit = string.Empty; this.remarks = new remarks_class(); this.copy_settings = true; this.foldout = true; this.terrains_active = true; this.terrains_scene_active = true; this.terrains_foldout = true; this.auto_search = new auto_search_class(); this.auto_name = new auto_search_class(); this.scene_name = "Terrain"; this.asset_name = "New Terrain"; this.set_terrain_text(); }
public map_class() { this.active = true; this.button_parameters = true; this.button_image_editor = true; this.button_region = true; this.button_image_export = true; this.button_heightmap_export = true; this.button_settings = true; this.alpha = 0.65f; this.region = new List <map_region_class>(); this.preimage_edit = new preimage_edit_class(); this.tex2_tile = new tile_class(); this.tex3_tile = new tile_class(); this.elExt = new List <ext_class>(); this.texExt = new List <ext_class>(); this.time_start_elExt = new List <float>(); this.time_start_texExt = new List <float>(); this.export_texExt = 8; this.export_elExt = 16; this.export_heightmap_area = new latlong_area_class(); this.export_image_area = new latlong_area_class(); this.export_pullIndex = new tile_class(); this.export_heightmap_continue = true; this.export_heightmap = new map_export_class(); this.export_image = new map_export_class(); this.export_image_continue = true; this.export_jpg_quality = 100; this.export_jpg = true; this.color = Color.red; this.bingKey = new List <map_key_class>(); this.mouse_sensivity = (float)2; this.warnings = true; this.track_tile = true; this.make_region_popup(); }
static public latlong_area_class calc_latlong_area_by_tile2(latlong_class latlong, tile_class tile, double zoom, int resolution, Vector2 bresolution) { latlong_area_class latlong_area_class = new latlong_area_class(); map_pixel_class map_pixel_class = latlong_to_pixel2(latlong, zoom); map_pixel_class.x += tile.x * resolution; map_pixel_class.y += tile.y * resolution; latlong_class latlong_class = pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong1 = latlong_class; map_pixel_class.x += bresolution.x; map_pixel_class.y += bresolution.y; latlong_class = pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong2 = latlong_class; return(latlong_area_class); }
static public latlong_area_class calc_latlong_area_by_tile(latlong_class latlong, tile_class tile, double zoom, int resolution, Vector2 bresolution, Vector2 offset) { float num = Mathf.Pow(2, (float)(19 - zoom)); zoom = 19; resolution = (int)(resolution * num); bresolution *= num; latlong_area_class latlong_area_class = new latlong_area_class(); map_pixel_class map_pixel_class = latlong_to_pixel2(latlong, zoom); Vector2 vector = new Vector2(0, 0); map_pixel_class.x += tile.x * resolution + offset.x; map_pixel_class.y += tile.y * resolution + offset.y; if (tile.x > 0) { map_pixel_class.x += num; vector.x = num; } if (tile.y > 0) { map_pixel_class.y += num; vector.y = num; } latlong_class latlong_class = pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong1 = latlong_class; map_pixel_class.x += bresolution.x - vector.x; map_pixel_class.y += bresolution.y - vector.y; latlong_class = pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong2 = latlong_class; return(latlong_area_class); }
static public latlong_class calc_latlong_center_by_tile(latlong_class latlong, tile_class tile, tile_class subtile, tile_class subtiles, double zoom, int resolution, Vector2 offset) { float num = Mathf.Pow(2, (float)(19 - zoom)); zoom = 19; resolution = (int)(resolution * num); map_pixel_class map_pixel_class = latlong_to_pixel2(latlong, zoom); map_pixel_class.x += tile.x * subtiles.x * resolution + subtile.x * resolution; map_pixel_class.y += tile.y * subtiles.y * resolution + subtile.y * resolution; map_pixel_class.x += resolution / 2 + offset.x; map_pixel_class.y += resolution / 2 + offset.y; return(pixel_to_latlong2(map_pixel_class, zoom)); }
public override latlong_area_class calc_latlong_area_by_tile2(latlong_class latlong, tile_class tile, double zoom, int resolution, Vector2 bresolution) { latlong_area_class latlong_area_class = new latlong_area_class(); map_pixel_class map_pixel_class = this.latlong_to_pixel2(latlong, zoom); Vector2 vector = new Vector2((float)0, (float)0); map_pixel_class.x += (double)(tile.x * resolution); map_pixel_class.y += (double)(tile.y * resolution); latlong_class latlong_class = this.pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong1 = latlong_class; map_pixel_class.x += (double)bresolution.x; map_pixel_class.y += (double)bresolution.y; latlong_class = this.pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong2 = latlong_class; return(latlong_area_class); }
public override latlong_area_class calc_latlong_area_by_tile(latlong_class latlong, tile_class tile, double zoom, int resolution, Vector2 bresolution, Vector2 offset) { float num = Mathf.Pow((float)2, (float)((double)19 - zoom)); zoom = (double)19; resolution = (int)((float)resolution * num); bresolution *= num; latlong_area_class latlong_area_class = new latlong_area_class(); map_pixel_class map_pixel_class = this.latlong_to_pixel2(latlong, zoom); Vector2 vector = new Vector2((float)0, (float)0); map_pixel_class.x += (double)((float)(tile.x * resolution) + offset.x); map_pixel_class.y += (double)((float)(tile.y * resolution) + offset.y); if (tile.x > 0) { map_pixel_class.x += (double)num; vector.x = num; } if (tile.y > 0) { map_pixel_class.y += (double)num; vector.y = num; } latlong_class latlong_class = this.pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong1 = latlong_class; map_pixel_class.x += (double)(bresolution.x - vector.x); map_pixel_class.y += (double)(bresolution.y - vector.y); latlong_class = this.pixel_to_latlong2(map_pixel_class, zoom); latlong_area_class.latlong2 = latlong_class; return(latlong_area_class); }
public map_class() { this.active = true; this.button_parameters = true; this.button_image_editor = true; this.button_region = true; this.button_image_export = true; this.button_heightmap_export = true; this.button_settings = true; this.alpha = 0.65f; this.region = new List<map_region_class>(); this.preimage_edit = new preimage_edit_class(); this.tex2_tile = new tile_class(); this.tex3_tile = new tile_class(); this.elExt = new List<ext_class>(); this.texExt = new List<ext_class>(); this.time_start_elExt = new List<float>(); this.time_start_texExt = new List<float>(); this.export_texExt = 8; this.export_elExt = 16; this.export_heightmap_area = new latlong_area_class(); this.export_image_area = new latlong_area_class(); this.export_pullIndex = new tile_class(); this.export_heightmap_continue = true; this.export_heightmap = new map_export_class(); this.export_image = new map_export_class(); this.export_image_continue = true; this.export_jpg_quality = 100; this.export_jpg = true; this.color = Color.red; this.bingKey = new List<map_key_class>(); this.mouse_sensivity = (float)2; this.warnings = true; this.track_tile = true; this.make_region_popup(); }
public buffer_class() { this.tiles = new tile_class(); }