package Hexel.generation.terrainGenerator.heightMaps;
import Hexel.math.HexGeometry;
import Hexel.math.Vector2i;
public class FractalHexagonalHeightMap {
private FractalHeightMapGenerator heightMapGen;
public FractalHexagonalHeightMap(int seed){
heightMapGen = new FractalHeightMapGenerator(seed);
}
public int getHeight(int x, int y, Vector2i tmp) {
Vector2i hex = new Vector2i();
Vector2i tri = new Vector2i();
HexGeometry.tringleToHexel(x, y, hex);
HexGeometry.hexelToTringle(hex.x, hex.y, tri);
return heightMapGen.getHeight(tri.x, tri.y, tmp);
}
}