Line | |
---|
1 | #include "Rings.h"
|
---|
2 |
|
---|
3 | #include "Led.h"
|
---|
4 | #include "Leds.h"
|
---|
5 |
|
---|
6 | ClassImp(Rings);
|
---|
7 |
|
---|
8 | Int_t Rings::CalcCenters(const Leds &leds)
|
---|
9 | {
|
---|
10 | int nPoints = leds.GetEntries();
|
---|
11 |
|
---|
12 | int n=0;
|
---|
13 | for (int i=0; i<nPoints-2; i++)
|
---|
14 | for (int j=i+1; j<nPoints-1; j++)
|
---|
15 | for (int k=j+1; k<nPoints; k++)
|
---|
16 | {
|
---|
17 | Ring &ring = *(Ring*)(*this)[n];
|
---|
18 |
|
---|
19 | ring.CalcCenter(leds, i, j, k);
|
---|
20 |
|
---|
21 | n++;
|
---|
22 | }
|
---|
23 | return n;
|
---|
24 | }
|
---|
25 |
|
---|
26 | void Rings::CalcRings(Leds &leds)
|
---|
27 | {
|
---|
28 | CalcCenters(leds);
|
---|
29 |
|
---|
30 | fCenter.InterpolCenters(*this);
|
---|
31 |
|
---|
32 | //
|
---|
33 | // angles v and relative angle w
|
---|
34 | //
|
---|
35 | for (int j=0; j<leds.GetEntries(); j++)
|
---|
36 | leds(j).CalcPhi(fCenter);
|
---|
37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.