forked from mirror/DotRecast
012->xyz
This commit is contained in:
parent
5ed9e602fb
commit
7daeb96382
|
@ -39,15 +39,13 @@ namespace DotRecast.Detour.TileCache.Io
|
||||||
header.tx = data.getInt();
|
header.tx = data.getInt();
|
||||||
header.ty = data.getInt();
|
header.ty = data.getInt();
|
||||||
header.tlayer = data.getInt();
|
header.tlayer = data.getInt();
|
||||||
for (int j = 0; j < 3; j++)
|
|
||||||
{
|
header.bmin.x = data.getFloat();
|
||||||
header.bmin[j] = data.getFloat();
|
header.bmin.y = data.getFloat();
|
||||||
}
|
header.bmin.z = data.getFloat();
|
||||||
|
header.bmax.x = data.getFloat();
|
||||||
for (int j = 0; j < 3; j++)
|
header.bmax.y = data.getFloat();
|
||||||
{
|
header.bmax.z = data.getFloat();
|
||||||
header.bmax[j] = data.getFloat();
|
|
||||||
}
|
|
||||||
|
|
||||||
header.hmin = data.getShort() & 0xFFFF;
|
header.hmin = data.getShort() & 0xFFFF;
|
||||||
header.hmax = data.getShort() & 0xFFFF;
|
header.hmax = data.getShort() & 0xFFFF;
|
||||||
|
|
|
@ -33,15 +33,13 @@ namespace DotRecast.Detour.TileCache.Io
|
||||||
write(stream, header.tx, order);
|
write(stream, header.tx, order);
|
||||||
write(stream, header.ty, order);
|
write(stream, header.ty, order);
|
||||||
write(stream, header.tlayer, order);
|
write(stream, header.tlayer, order);
|
||||||
for (int j = 0; j < 3; j++)
|
|
||||||
{
|
write(stream, header.bmin.x, order);
|
||||||
write(stream, header.bmin[j], order);
|
write(stream, header.bmin.y, order);
|
||||||
}
|
write(stream, header.bmin.z, order);
|
||||||
|
write(stream, header.bmax.x, order);
|
||||||
for (int j = 0; j < 3; j++)
|
write(stream, header.bmax.y, order);
|
||||||
{
|
write(stream, header.bmax.z, order);
|
||||||
write(stream, header.bmax[j], order);
|
|
||||||
}
|
|
||||||
|
|
||||||
write(stream, (short)header.hmin, order);
|
write(stream, (short)header.hmin, order);
|
||||||
write(stream, (short)header.hmax, order);
|
write(stream, (short)header.hmax, order);
|
||||||
|
|
|
@ -91,10 +91,10 @@ namespace DotRecast.Detour.TileCache.Io
|
||||||
private TileCacheParams readCacheParams(ByteBuffer bb, bool cCompatibility)
|
private TileCacheParams readCacheParams(ByteBuffer bb, bool cCompatibility)
|
||||||
{
|
{
|
||||||
TileCacheParams option = new TileCacheParams();
|
TileCacheParams option = new TileCacheParams();
|
||||||
for (int i = 0; i < 3; i++)
|
|
||||||
{
|
option.orig.x = bb.getFloat();
|
||||||
option.orig[i] = bb.getFloat();
|
option.orig.y = bb.getFloat();
|
||||||
}
|
option.orig.z = bb.getFloat();
|
||||||
|
|
||||||
option.cs = bb.getFloat();
|
option.cs = bb.getFloat();
|
||||||
option.ch = bb.getFloat();
|
option.ch = bb.getFloat();
|
||||||
|
|
|
@ -63,10 +63,9 @@ namespace DotRecast.Detour.TileCache.Io
|
||||||
|
|
||||||
private void writeCacheParams(BinaryWriter stream, TileCacheParams option, ByteOrder order)
|
private void writeCacheParams(BinaryWriter stream, TileCacheParams option, ByteOrder order)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 3; i++)
|
write(stream, option.orig.x, order);
|
||||||
{
|
write(stream, option.orig.y, order);
|
||||||
write(stream, option.orig[i], order);
|
write(stream, option.orig.z, order);
|
||||||
}
|
|
||||||
|
|
||||||
write(stream, option.cs, order);
|
write(stream, option.cs, order);
|
||||||
write(stream, option.ch, order);
|
write(stream, option.ch, order);
|
||||||
|
|
Loading…
Reference in New Issue