updated the build pipeline
This commit is contained in:
26
Assets/Scripts/GeoDataUtils/GeoTileMetadata.cs
Normal file
26
Assets/Scripts/GeoDataUtils/GeoTileMetadata.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Component attached to tile prefab roots to store geo metadata.
|
||||
/// Useful for positioning prefabs in scene or querying tile info at runtime.
|
||||
/// </summary>
|
||||
public class GeoTileMetadata : MonoBehaviour
|
||||
{
|
||||
public string tileId;
|
||||
public double xmin;
|
||||
public double ymin;
|
||||
public double globalMin;
|
||||
public double globalMax;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the world position this tile should be placed at, given a global origin.
|
||||
/// </summary>
|
||||
public Vector3 GetWorldPosition(double originX, double originY)
|
||||
{
|
||||
return new Vector3(
|
||||
(float)(xmin - originX),
|
||||
(float)globalMin,
|
||||
(float)(ymin - originY)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user