コード例 #1
0
 public Shape(LEDDomeOutput dome, ShapeType type, StrutLayout layout)
 {
     this.dome            = dome;
     this.type            = type;
     this.layout          = layout;
     this.activeAnimation = null;
     this.struts          = new HashSet <int>(
         Enumerable.Range(0, this.layout.NumSegments)
         .SelectMany(i =>
                     this.layout.GetSegment(i).GetStruts().Select(strut => strut.Index)
                     )
         );
 }
コード例 #2
0
 private void UpdateLayouts()
 {
     int[] points = new int[] { 22, 26, 30, 34, 38, 70 };
     for (int i = 0; i < 5; i++)
     {
         points[i] += this.centerOffset;
     }
     if (points[4] >= 40)
     {
         points[4] -= 20;
     }
     StrutLayout[] layouts = StrutLayoutFactory.ConcentricFromStartingPoints(
         this.config,
         new HashSet <int>(points),
         4
         );
     this.partLayout    = layouts[0];
     this.indexLayout   = layouts[1];
     this.sectionLayout = layouts[2];
 }
コード例 #3
0
 public Shape(LEDDomeOutput dome, ShapeType type, StrutLayout layout)
 {
     this.dome = dome;
       this.type = type;
       this.layout = layout;
       this.activeAnimation = null;
       this.struts = new HashSet<int>(
     Enumerable.Range(0, this.layout.NumSegments)
       .SelectMany(i =>
     this.layout.GetSegment(i).GetStruts().Select(strut => strut.Index)
       )
       );
 }