-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #350 from tier4/fix/geo_coordinate_inspector
fix GeoCoordinate parameter accessibility from inspector
- Loading branch information
Showing
1 changed file
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
using UnityEngine; | ||
|
||
namespace AWSIM.Geographic | ||
{ | ||
[System.Serializable] | ||
public class GeoCoordinate | ||
{ | ||
public double Latitude { get; } | ||
public double Longitude { get; } | ||
public double Altitude { get; } | ||
[SerializeField] | ||
private double latitude; | ||
[SerializeField] | ||
private double longitude; | ||
[SerializeField] | ||
private double altitude; | ||
|
||
public double Latitude => latitude; | ||
public double Longitude => longitude; | ||
public double Altitude => altitude; | ||
|
||
public GeoCoordinate() | ||
{ | ||
Latitude = 0; | ||
Longitude = 0; | ||
Altitude = 0; | ||
latitude = 0; | ||
longitude = 0; | ||
altitude = 0; | ||
} | ||
|
||
public GeoCoordinate(double latitude, double longitude, double altitude) | ||
{ | ||
Latitude = latitude; | ||
Longitude = longitude; | ||
Altitude = altitude; | ||
this.latitude = latitude; | ||
this.longitude = longitude; | ||
this.altitude = altitude; | ||
} | ||
} | ||
} |