[0,1,2] -> xyz

This commit is contained in:
ikpil 2023-04-29 12:41:07 +09:00
parent 39bb7e32b4
commit 98e2504d7f
5 changed files with 16 additions and 16 deletions

View File

@ -1,4 +1,4 @@
using System;
using System;
using System.Buffers.Binary;
namespace DotRecast.Core
@ -139,4 +139,4 @@ namespace DotRecast.Core
// ?
}
}
}
}

View File

@ -67,22 +67,22 @@ namespace DotRecast.Core
// Returns true if 'a' is more lower-left than 'b'.
private static bool cmppt(Vector3f a, Vector3f b)
{
if (a[0] < b[0])
if (a.x < b.x)
{
return true;
}
if (a[0] > b[0])
if (a.x > b.x)
{
return false;
}
if (a[2] < b[2])
if (a.z < b.z)
{
return true;
}
if (a[2] > b[2])
if (a.z > b.z)
{
return false;
}
@ -93,11 +93,11 @@ namespace DotRecast.Core
// Returns true if 'c' is left of line 'a'-'b'.
private static bool left(Vector3f a, Vector3f b, Vector3f c)
{
float u1 = b[0] - a[0];
float v1 = b[2] - a[2];
float u2 = c[0] - a[0];
float v2 = c[2] - a[2];
float u1 = b.x - a.x;
float v1 = b.z - a.z;
float u2 = c.x - a.x;
float v2 = c.z - a.z;
return u1 * v2 - v1 * u2 < 0;
}
}
}
}

View File

@ -83,9 +83,9 @@ namespace DotRecast.Core
float EPS = 1e-6f;
Vector3f d = new Vector3f();
d.x = sq[0] - sp[0];
d.y = sq[1] - sp[1];
d.z = sq[2] - sp[2];
d.x = sq.x - sp.x;
d.y = sq.y - sp.y;
d.z = sq.z - sp.z;
float tmin = 0.0f;
float tmax = 1.0f;

View File

@ -1003,4 +1003,4 @@ namespace DotRecast.Core
return float.IsFinite(v.x) && float.IsFinite(v.z);
}
}
}
}

View File

@ -100,4 +100,4 @@ namespace DotRecast.Core
return !left.Equals(right);
}
}
}
}