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) ) ); }
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]; }
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) ) ); }