public MyTerrain(HeightmapArray heightmapArray, MyTotalHeightmap totalHeightmap, SubmapInfo submapInfo) { _heightmapArray = heightmapArray; _totalHeightmap = totalHeightmap; _submapInfo = submapInfo; _terrainObject = SubmapPlane.CreatePlaneObject(_heightmapArray.HeightmapAsArray).GameObject; }
private IEnumerable <SubmapInfoAndHeightmapArray> getLeftNeighbours(SubmapInfo info, List <SubmapInfoAndHeightmapArray> heightmaps) { return((from heightmap in heightmaps where heightmap.SubmapInfo.DownLeftX + heightmap.SubmapInfo.Width == info.DownLeftX && MathHelp.SegmentsHaveCommonElement(heightmap.SubmapInfo.DownRightPoint.Y, heightmap.SubmapInfo.TopRightPoint.Y, info.DownLeftPoint.Y, info.TopLeftPoint.Y) select heightmap).ToList()); }
public SubmapInfoAndHeightmapArray(SubmapInfo submapInfo, HeightmapArray heightmapArray) { SubmapInfo = submapInfo; HeightmapArray = heightmapArray; }