Get nearest index for LoS calculation.
This commit is contained in:
parent
09bfec84c7
commit
a04a0f244b
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -565,7 +565,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -573,7 +573,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -565,7 +565,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -573,7 +573,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -565,7 +565,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -573,7 +573,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -565,7 +565,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -573,7 +573,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
@ -566,7 +566,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
// Check being on same cell and layer (index).
|
// Check being on same cell and layer (index).
|
||||||
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
// Note: Get index must use origin height increased by cell height, the method returns index to height exclusive self.
|
||||||
int index = block.getIndexBelow(gox, goy, oz + GeoStructure.CELL_HEIGHT);
|
int index = block.getIndexNearest(gox, goy, oz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -574,7 +574,7 @@ public class GeoEngine
|
|||||||
|
|
||||||
if ((gox == gtx) && (goy == gty))
|
if ((gox == gtx) && (goy == gty))
|
||||||
{
|
{
|
||||||
return index == block.getIndexBelow(gtx, gty, tz + GeoStructure.CELL_HEIGHT);
|
return index == block.getIndexNearest(gtx, gty, tz + GeoStructure.CELL_HEIGHT); // getIndexBelow
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ground and nswe flag.
|
// Get ground and nswe flag.
|
||||||
|
Loading…
Reference in New Issue
Block a user