src/AircraftTrajectories/Models/TemporalGrid/Grid.cs
/// <summary>
/// Create a grid of the specified size filled with zeros
/// </summary>
/// <param name="height">the number of vertical cells</param>
/// <param name="width">the number of horizontal cells</param>
/// <returns></returns>
Create a grid of the specified size filled with zeros
Create a grid of the specified size filled with zeros
public static Grid CreateEmptyGrid(int height, int width, Point3D lowerLeftCorner, ReferencePoint referencePoint, int cellSize)
        {
            double[][] data = new double[width][];
            for (int x=0; x<width; x++)
            {
                double[] column = new double[height];
                for (int y=0; y<height; y++)
                {
                    column[y] = 0;
                }
                data[x] = column;
            }
            Grid newGrid = new Grid(data, lowerLeftCorner, cellSize, false);
            newGrid.ReferencePoint = referencePoint;
            return newGrid;
        }
public static Grid CreateEmptyGrid ( int height , int width , Point3D lowerLeftCorner , ReferencePoint referencePoint , int cellSize ) { double [ ] [ ] data = new double [ width ] [ ] ; for ( int x = 0 ; x < width ; x ++ ) { double [ ] column = new double [ height ] ; for ( int y = 0 ; y < height ; y ++ ) { column [ y ] = 0 ; } data [ x ] = column ; } Grid newGrid = new Grid ( data , lowerLeftCorner , cellSize , false ) ; newGrid . ReferencePoint = referencePoint ; return newGrid ; }
Create a grid of the specified size filled with zeros
Create a grid of the specified size filled with zeros
None
height
int
the number of vertical cells
the number of vertical cells
width
int
the number of horizontal cells
the number of horizontal cells
lowerLeftCorner
Point3D
referencePoint
ReferencePoint
cellSize
int