|
Real World Terrain
v4.1
|
This class contains utility methods. More...
Static Public Member Functions | |
| static float | Angle2D (Vector2 point1, Vector2 point2) |
| The angle between the two points in degree. More... | |
| static float | Angle2D (Vector3 point1, Vector3 point2) |
| The angle between the two points in degree. More... | |
| static float | Angle2D (Vector3 point1, Vector3 point2, Vector3 point3, bool unsigned=true) |
| The angle between the three points in degree. More... | |
| static float | Angle2DRad (Vector3 point1, Vector3 point2, float offset) |
| The angle between the two points in radians. More... | |
| static double | Clamp (double n, double minValue, double maxValue) |
| Clamps value between min and max and returns value. More... | |
| static double | Clip (double n, double minValue, double maxValue) |
| Clamps a value between a minimum double and maximum double value. More... | |
| static string | ColorToHex (Color32 color) |
| Gets Hex value of Color. More... | |
| static Vector2 | DistanceBetweenPoints (Vector2 point1, Vector2 point2) |
| The distance between two geographical coordinates. More... | |
| static void | LatLongToMercat (ref double x, ref double y) |
| Converts geographic coordinates to Mercator coordinates. More... | |
| static void | LatLongToTile (double dx, double dy, int zoom, out double tx, out double ty) |
| Converts geographic coordinates to the index of the tile. What is the tiles, and how it works, you can read here: https://developers.google.com/maps/documentation/javascript/v2/overlays?csw=1#Google_Maps_Coordinates More... | |
| static string | TileToQuadKey (int x, int y, int zoom) |
| Converts tile index to quadkey. What is the tiles and quadkey, and how it works, you can read here: http://msdn.microsoft.com/en-us/library/bb259689.aspx More... | |
Public Attributes | |
| const float | EARTH_RADIUS = 6371 |
| The radius of the Earth. More... | |
| const int | EQUATOR_LENGTH = 40075 |
| The length of the equator. More... | |
| const int | AVERAGE_TEXTURE_SIZE = 20000 |
| The average size of the texture of the tile. More... | |
| const double | DEG2RAD = Math.PI / 180 |
| Degrees-to-radians conversion constant. More... | |
| const int | DOWNLOAD_TEXTURE_LIMIT = 90000000 |
| Maximum the size of the download for Google Maps. More... | |
| const int | MAX_ELEVATION = 15000 |
| The maximum elevation in the world. More... | |
| const short | TILE_SIZE = 256 |
| Size of tile. More... | |
| const int | MB = 1048576 |
| The number of bytes in megabyte. More... | |
| const float | PI4 = 4 * Mathf.PI |
| PI * 4 More... | |
This class contains utility methods.
|
static |
The angle between the two points in degree.
| point1 | Point 1 |
| point2 | Point 2 |
|
static |
The angle between the two points in degree.
| point1 | Point 1 |
| point2 | Point 2 |
|
static |
The angle between the three points in degree.
| point1 | Point 1 |
| point2 | Point 2 |
| point3 | Point 3 |
| unsigned | Return a positive result. |
|
static |
The angle between the two points in radians.
| point1 | Point 1 |
| point2 | Point 2 |
| offset | Result offset in degrees. |
|
static |
Clamps value between min and max and returns value.
| n | Value |
| minValue | Min |
| maxValue | Max |
|
static |
Clamps a value between a minimum double and maximum double value.
| n | Value |
| minValue | Minimum |
| maxValue | Maximum |
|
static |
Gets Hex value of Color.
| color | Color |
|
static |
The distance between two geographical coordinates.
| point1 | Coordinate (X - Lng, Y - Lat) |
| point2 | Coordinate (X - Lng, Y - Lat) |
|
static |
Converts geographic coordinates to Mercator coordinates.
| x | Longitude |
| y | Latitude |
|
static |
Converts geographic coordinates to the index of the tile. What is the tiles, and how it works, you can read here: https://developers.google.com/maps/documentation/javascript/v2/overlays?csw=1#Google_Maps_Coordinates
| dx | Longitude |
| dy | Latitude |
| zoom | Zoom |
| tx | Tile X |
| ty | Tile Y |
|
static |
Converts tile index to quadkey. What is the tiles and quadkey, and how it works, you can read here: http://msdn.microsoft.com/en-us/library/bb259689.aspx
| x | Tile X |
| y | Tile Y |
| zoom | Zoom |
| const int InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.AVERAGE_TEXTURE_SIZE = 20000 |
The average size of the texture of the tile.
| const double InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.DEG2RAD = Math.PI / 180 |
Degrees-to-radians conversion constant.
| const int InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.DOWNLOAD_TEXTURE_LIMIT = 90000000 |
Maximum the size of the download for Google Maps.
| const float InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.EARTH_RADIUS = 6371 |
The radius of the Earth.
| const int InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.EQUATOR_LENGTH = 40075 |
The length of the equator.
| const int InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.MAX_ELEVATION = 15000 |
The maximum elevation in the world.
| const int InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.MB = 1048576 |
The number of bytes in megabyte.
| const float InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.PI4 = 4 * Mathf.PI |
PI * 4
| const short InfinityCode.RealWorldTerrain.RealWorldTerrainUtils.TILE_SIZE = 256 |
Size of tile.