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