012 -> xyz

This commit is contained in:
ikpil 2023-04-29 19:13:15 +09:00
parent 7daeb96382
commit 5592f82192
3 changed files with 17 additions and 18 deletions

View File

@ -91,15 +91,14 @@ namespace DotRecast.Detour.Io
header.walkableHeight = buf.getFloat(); header.walkableHeight = buf.getFloat();
header.walkableRadius = buf.getFloat(); header.walkableRadius = buf.getFloat();
header.walkableClimb = buf.getFloat(); header.walkableClimb = buf.getFloat();
for (int j = 0; j < 3; j++)
{
header.bmin[j] = buf.getFloat();
}
for (int j = 0; j < 3; j++) header.bmin.x = buf.getFloat();
{ header.bmin.y = buf.getFloat();
header.bmax[j] = buf.getFloat(); header.bmin.z = buf.getFloat();
}
header.bmax.x = buf.getFloat();
header.bmax.y = buf.getFloat();
header.bmax.z = buf.getFloat();
header.bvQuantFactor = buf.getFloat(); header.bvQuantFactor = buf.getFloat();
data.verts = readVerts(buf, header.vertCount); data.verts = readVerts(buf, header.vertCount);

View File

@ -1239,8 +1239,8 @@ namespace DotRecast.Recast
int maxVertsPerMesh = 0; int maxVertsPerMesh = 0;
for (int i = 0; i < nmeshes; ++i) for (int i = 0; i < nmeshes; ++i)
{ {
RecastVectors.min(ref mesh.bmin, meshes[i].bmin, 0); RecastVectors.min(ref mesh.bmin, meshes[i].bmin);
RecastVectors.max(ref mesh.bmax, meshes[i].bmax, 0); RecastVectors.max(ref mesh.bmax, meshes[i].bmax);
maxVertsPerMesh = Math.Max(maxVertsPerMesh, meshes[i].nverts); maxVertsPerMesh = Math.Max(maxVertsPerMesh, meshes[i].nverts);
maxVerts += meshes[i].nverts; maxVerts += meshes[i].nverts;
maxPolys += meshes[i].npolys; maxPolys += meshes[i].npolys;

View File

@ -32,11 +32,11 @@ namespace DotRecast.Recast
a.z = Math.Min(a.z, b[i + 2]); a.z = Math.Min(a.z, b[i + 2]);
} }
public static void min(ref Vector3f a, Vector3f b, int i) public static void min(ref Vector3f a, Vector3f b)
{ {
a.x = Math.Min(a.x, b[i + 0]); a.x = Math.Min(a.x, b.x);
a.y = Math.Min(a.y, b[i + 1]); a.y = Math.Min(a.y, b.y);
a.z = Math.Min(a.z, b[i + 2]); a.z = Math.Min(a.z, b.z);
} }
public static void max(ref Vector3f a, float[] b, int i) public static void max(ref Vector3f a, float[] b, int i)
@ -46,11 +46,11 @@ namespace DotRecast.Recast
a.z = Math.Max(a.z, b[i + 2]); a.z = Math.Max(a.z, b[i + 2]);
} }
public static void max(ref Vector3f a, Vector3f b, int i) public static void max(ref Vector3f a, Vector3f b)
{ {
a.x = Math.Max(a.x, b[i + 0]); a.x = Math.Max(a.x, b.x);
a.y = Math.Max(a.y, b[i + 1]); a.y = Math.Max(a.y, b.y);
a.z = Math.Max(a.z, b[i + 2]); a.z = Math.Max(a.z, b.z);
} }
public static void copy(ref Vector3f @out, float[] @in, int i) public static void copy(ref Vector3f @out, float[] @in, int i)