Browse Source

Framework to load pixel data

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
d0b4634429
  1. 15
      src/engine/InterestManagement/HeightMap.java

15
src/engine/InterestManagement/HeightMap.java

@ -24,9 +24,13 @@ import java.awt.*; @@ -24,9 +24,13 @@ import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.stream.Stream;
import static java.lang.Math.abs;
@ -308,6 +312,17 @@ public class HeightMap { @@ -308,6 +312,17 @@ public class HeightMap {
}
Logger.info(HeightMap.heightmapByLoadNum.size() + " Heightmaps cached.");
// Load pixel data
try (Stream<Path> paths = Files.walk(Paths.get("mb.data/heightmaps/TARGA/"))) {
paths
.filter(Files::isRegularFile)
.forEach(System.out::println);
} catch (IOException e) {
Logger.error(e);
}
}
public static boolean isLocUnderwater(Vector3fImmutable currentLoc) {

Loading…
Cancel
Save