public MyTerrain(HeightmapArray heightmapArray, MyTotalHeightmap totalHeightmap, SubmapInfo submapInfo)
 {
     _heightmapArray = heightmapArray;
     _totalHeightmap = totalHeightmap;
     _submapInfo     = submapInfo;
     _terrainObject  = SubmapPlane.CreatePlaneObject(_heightmapArray.HeightmapAsArray).GameObject;
 }
Esempio n. 2
0
 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());
 }
Esempio n. 3
0
 public SubmapInfoAndHeightmapArray(SubmapInfo submapInfo, HeightmapArray heightmapArray)
 {
     SubmapInfo     = submapInfo;
     HeightmapArray = heightmapArray;
 }