Skip to content

Commit

Permalink
Add a parameter to indicate whether to convert the upward Y-axis to t…
Browse files Browse the repository at this point in the history
…he upward Z-axis, as the upward axis may be the Y-axis or the Z-axis after some objs are exported.
  • Loading branch information
dashenxian committed Feb 22, 2024
1 parent 53f291c commit d6e40f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Binary file removed .vs/Obj2Tiles/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
4 changes: 2 additions & 2 deletions Obj2Tiles/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public sealed class Options
[Option("keep-intermediate", Required = false, HelpText = "Keeps the intermediate files (do not cleanup)", Default = false)]
public bool KeepIntermediateFiles { get; set; }

[Option('t',"yuptozup", Required = false, HelpText = "Convert the upward Y-axis to the upward Z-axis, which is used in some situations where the upward axis may be the Y-axis or the Z-axis after the obj is exported.", Default = true)]
public bool YUpToZUp { get; set; }
[Option('t', "y-up-to-z-up", Required = true, HelpText = "Convert the upward Y-axis to the upward Z-axis, which is used in some situations where the upward axis may be the Y-axis or the Z-axis after the obj is exported.", Default = true)]
public bool? YUpToZUp { get; set; }
}

public enum Stage
Expand Down
2 changes: 1 addition & 1 deletion Obj2Tiles/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private static async Task Run(Options opts)
return;

var gpsCoords = opts.Latitude != null && opts.Longitude != null
? new GpsCoords(opts.Latitude.Value, opts.Longitude.Value, opts.Altitude, opts.Scale, opts.YUpToZUp)
? new GpsCoords(opts.Latitude.Value, opts.Longitude.Value, opts.Altitude, opts.Scale, opts.YUpToZUp == true)
: null;

Console.WriteLine();
Expand Down

0 comments on commit d6e40f2

Please sign in to comment.