remove vector3f get_x, y, z proeprty

This commit is contained in:
ikpil 2023-04-29 19:48:19 +09:00
parent 67cbf7ffd1
commit d682d0f6a3
3 changed files with 15 additions and 7 deletions

View File

@ -22,9 +22,9 @@ namespace DotRecast.Core
{ {
public struct Vector3f public struct Vector3f
{ {
public float x { get; set; } public float x;
public float y { get; set; } public float y;
public float z { get; set; } public float z;
public static Vector3f Zero { get; } = new Vector3f(0, 0, 0); public static Vector3f Zero { get; } = new Vector3f(0, 0, 0);
public static Vector3f Up { get; } = new Vector3f(0, 1, 0); public static Vector3f Up { get; } = new Vector3f(0, 1, 0);

View File

@ -20,6 +20,14 @@ using DotRecast.Core;
namespace DotRecast.Detour.Extras.Unity.Astar namespace DotRecast.Detour.Extras.Unity.Astar
{ {
// for unity meta parsing
public struct UnityVector3f
{
public float x { get; set; }
public float y { get; set; }
public float z { get; set; }
}
public class GraphMeta public class GraphMeta
{ {
public float characterRadius { get; set; } public float characterRadius { get; set; }
@ -38,8 +46,8 @@ namespace DotRecast.Detour.Extras.Unity.Astar
public float tileSizeZ { get; set; } public float tileSizeZ { get; set; }
public bool useTiles { get; set; } public bool useTiles { get; set; }
public Vector3f rotation { get; set; } public UnityVector3f rotation { get; set; }
public Vector3f forcedBoundsCenter { get; set; } public UnityVector3f forcedBoundsCenter { get; set; }
public Vector3f forcedBoundsSize { get; set; } public UnityVector3f forcedBoundsSize { get; set; }
} }
} }

View File

@ -80,7 +80,7 @@ public class UnityAStarPathfindingImporterTest
private NavMesh loadNavMesh(string filename) private NavMesh loadNavMesh(string filename)
{ {
var filepath = Loader.ToRPath(filename); var filepath = Loader.ToRPath(filename);
using var fs = new FileStream(filepath, FileMode.Open); using var fs = new FileStream(filepath, FileMode.Open, FileAccess.Read);
// Import the graphs // Import the graphs
UnityAStarPathfindingImporter importer = new UnityAStarPathfindingImporter(); UnityAStarPathfindingImporter importer = new UnityAStarPathfindingImporter();