Exemplo n.º 1
0
    public void AddRiver(List <DisplayNode> riverNodes)
    {
        DisplayPoly poly = new DisplayPoly(riverNodes);

        poly.boundingBox = BoundingBoxUtil.BoundingBox(riverNodes);
        poly.color       = Color.blue;
        poly.type        = PolyType.River;

        displayPolys.Add(poly);
    }
Exemplo n.º 2
0
    public void AddArea(Color color, List <DisplayNode> areaBounds)
    {
        DisplayPoly poly = new DisplayPoly(areaBounds);

        poly.boundingBox = BoundingBoxUtil.BoundingBox(areaBounds);
        poly.color       = color;
        poly.type        = PolyType.Area;

        displayPolys.Add(poly);
    }
Exemplo n.º 3
0
    public void TestBoundingBoxWithValues()
    {
        List <DisplayNode> nodeList = new List <DisplayNode> ();

        nodeList.Add(new DisplayNode(1, 1));
        nodeList.Add(new DisplayNode(2, 2));
        nodeList.Add(new DisplayNode(3, 3));
        nodeList.Add(new DisplayNode(4, 4));
        BoundingBoxUtil.BoundingBox(nodeList);
        List <DisplayNode> expected = new List <DisplayNode> ();

        expected.Add(new DisplayNode(1, 1));
        expected.Add(new DisplayNode(4, 4));
        CollectionAssert.AreEqual(BoundingBoxUtil.BoundingBox(expected), BoundingBoxUtil.BoundingBox(nodeList));
    }