예제 #1
0
 public PixelStructure()
 {
     this.Nodes         = new List <Point2d>();
     this.DispNodes     = new List <Point2d>();
     this.Edges         = new List <Edge>();
     this.AllEdgeColors = new List <Color>();
     this.Pixels        = new List <Pixel>();
     this.WindLoad      = new WindLoad();
     this.GravityLoad   = new GravityLoad();
 }
예제 #2
0
        public PixelStructure(List <Point2d> nodes, List <Pixel> pixels)
        {
            this.Nodes     = nodes;
            this.Pixels    = pixels;
            this.DispNodes = new List <Point2d>();

            // Generates edges from pixels
            var allEdges = pixels.SelectMany(p => p.GetEdges());

            Edges = allEdges.Distinct().ToList();
            this.AllEdgeColors = new List <Color>();
            this.WindLoad      = new WindLoad();
            this.GravityLoad   = new GravityLoad();
        }