예제 #1
0
    public void setXSectionDepthsFromFlow(ref Dictionary <string, double> flowsForXSection)
    {
        List <XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            WaterSurfacePolygon waterSurface = waterSurfaces[i - 1];
            XSection            xsection     = xss[i - 1];

            if (flowsForXSection.ContainsKey(xsection.StationName))
            {
                xsection.SetElevationFromFlow(flowsForXSection[xsection.StationName]);
            }

            int start = xsection.XSCutLine.Count;
            xsection = xss[i];

            if (flowsForXSection.ContainsKey(xsection.StationName))
            {
                xsection.SetElevationFromFlow(flowsForXSection[xsection.StationName]);
            }

            waterSurface.calculateNormalsAndDs();
        }
    }
예제 #2
0
    public void CreateTriangulationForWaterSurface()
    {
        waterSurfaces.Clear();

        List <XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            List <Point> watersurfacePoints = new List <Point>();
            XSection     xsection           = xss[i - 1];

            for (int j = 0; j < xsection.XSCutLine.Count; j++)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }


            xsection = xss[i];

            for (int j = xsection.XSCutLine.Count - 1; j >= 0; j--)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }

            WaterSurfacePolygon wsurface = new WaterSurfacePolygon(watersurfacePoints);
            waterSurfaces.Add(wsurface);
        }
    }
예제 #3
0
    public void setWaterSurfaceDepth()
    {
        List <XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            WaterSurfacePolygon waterSurface = waterSurfaces[i - 1];
            XSection            xsection     = xss[i - 1];

            for (int j = 0; j < xsection.XSCutLine.Count; j++)
            {
                waterSurface.Points[j].Z = xsection.CurrentWaterSurfaceElevation;
            }

            int start = xsection.XSCutLine.Count;

            xsection = xss[i];

            for (int j = start; j < waterSurface.Points.Count; j++)
            {
                waterSurface.Points[j].Z = xsection.CurrentWaterSurfaceElevation;//.Add(new Point(p.X, p.Y, uplevel));
            }

            waterSurface.calculateNormalsAndDs();
        }
    }
예제 #4
0
파일: Reach.cs 프로젝트: calebbuahin/RCAFF
    public void CreateTriangulationForWaterSurface()
    {
        waterSurfaces.Clear();

        List<XSection> xss = xsections.Values.ToList();

        for (int i = 1; i < xss.Count; i++)
        {
            List<Point> watersurfacePoints = new List<Point>();
            XSection xsection = xss[i - 1];

            for (int j = 0; j < xsection.XSCutLine.Count; j++)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }

            xsection = xss[i];

            for (int j = xsection.XSCutLine.Count - 1; j >= 0; j--)
            {
                Point p = xsection.XSCutLine[j];
                watersurfacePoints.Add(new Point(p.X, p.Y, p.Z));
            }

            WaterSurfacePolygon wsurface = new WaterSurfacePolygon(watersurfacePoints);
            waterSurfaces.Add(wsurface);
        }
    }