Ejemplo n.º 1
0
    public void SetUshort(int x, int y, ushort value, UshortDataID id)
    {
        PixelInformation info = GetPixelInformation(x, y);
        AreaIndex        area = _areas[info.areaX, info.areaY];

        switch (id)
        {
        case UshortDataID.HeightLayerData:
            area.DataLayer.HeightLayerData.data[info.areaPixelX, info.areaPixelY] = value;
            break;
        }
    }
Ejemplo n.º 2
0
    public ushort GetUshort(int x, int y, UshortDataID id)
    {
        if (AreCoordinatesInvalid(x, y))
        {
            return(1);
        }

        PixelInformation info = GetPixelInformation(x, y);

        if (IsPixelInformationInvalid(info))
        {
            Debug.LogWarning("Thigns went BAD " + info);
        }

        AreaIndex area = _areas[info.areaX, info.areaY];

        switch (id)
        {
        case UshortDataID.HeightLayerData:
            return(area.DataLayer.HeightLayerData.data[info.areaPixelX, info.areaPixelY]);
        }

        return(0);
    }