Пример #1
0
        private void generatePanelGroups()
        {
            float totalAngle    = endAngle - startAngle;
            float anglePerSide  = 360.0f / (float)faces;
            float anglePerPanel = totalAngle / (float)panels;

            int   len   = panels;
            float start = startAngle;
            float end;

            panelGroups = new PanelArcGroup[panels];

            for (int i = 0; i < len; i++)
            {
                start          = startAngle + anglePerPanel * i;
                end            = start + anglePerPanel;
                panelGroups[i] = new PanelArcGroup(start, end, thickness, faces, colliders);
            }
        }
Пример #2
0
        private void generatePanelGroups()
        {
            float totalAngle = endAngle - startAngle;
            float anglePerSide = 360.0f / (float)faces;
            float anglePerPanel = totalAngle / (float)panels;

            int len = panels;
            float start = startAngle;
            float end;
            panelGroups = new PanelArcGroup[panels];

            for (int i = 0; i < len; i++)
            {
                start = startAngle + anglePerPanel * i;
                end = start + anglePerPanel;
                panelGroups[i] = new PanelArcGroup(start, end, thickness, faces, colliders);
            }
        }