Exemplo n.º 1
0
    public static MultiGridData ParseBinHeader(BinaryReader br, string filename, MultiGridData multigrid)
    {
        // Read header
        PatchDataIO.SkipBinVersion(br);
        PatchDataIO.ReadBinBoundsHeader(br, filename, multigrid);

        return(multigrid);
    }
Exemplo n.º 2
0
    private static GraphData ParseBinHeader(BinaryReader br, string filename, GraphData graph)
    {
        // Read header
        PatchDataIO.SkipBinVersion(br);
        PatchDataIO.ReadBinBoundsHeader(br, filename, graph);

        // Read cell sizes
        graph.cellSizeX = br.ReadDouble();
        graph.cellSizeY = br.ReadDouble();

        return(graph);
    }
Exemplo n.º 3
0
    public static GridData ParseBinHeader(BinaryReader br, string filename, GridData grid)
    {
        // Read header
        PatchDataIO.SkipBinVersion(br);
        PatchDataIO.ReadBinBoundsHeader(br, filename, grid);

        // Read categories count
        int count = br.ReadInt32();

        if (count > 0)
        {
            grid.categories = new IntCategory[count];
        }

        return(grid);
    }
Exemplo n.º 4
0
    public static PointData ParseBinHeader(BinaryReader br, string filename, PointData pointData)
    {
        // Read header
        PatchDataIO.SkipBinVersion(br);
        PatchDataIO.ReadBinBoundsHeader(br, filename, pointData);

        // Read categories count
        int count = br.ReadInt32();

        if (count > 0)
        {
            pointData.categories = new IntCategory[count];
        }

        return(pointData);
    }