| Line | |
|---|
| 1 | #ifndef MARS_MagicCivilization
|
|---|
| 2 | #define MARS_MagicCivilization
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MAGIC
|
|---|
| 5 | #include "MAGIC.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | #ifndef ROOT_TText
|
|---|
| 9 | #include <TText.h>
|
|---|
| 10 | #endif
|
|---|
| 11 | #ifndef ROOT_TTimer
|
|---|
| 12 | #include <TTimer.h>
|
|---|
| 13 | #endif
|
|---|
| 14 | #ifndef ROOT_TClonesArray
|
|---|
| 15 | #include <TClonesArray.h>
|
|---|
| 16 | #endif
|
|---|
| 17 | #ifndef ROOT_TArrayI
|
|---|
| 18 | #include <TArrayI.h>
|
|---|
| 19 | #endif
|
|---|
| 20 |
|
|---|
| 21 | class TMarker;
|
|---|
| 22 | class TVirtualPad;
|
|---|
| 23 |
|
|---|
| 24 | class MGeomCam;
|
|---|
| 25 | class MHexagon;
|
|---|
| 26 |
|
|---|
| 27 | class MagicCivilization : public TObject
|
|---|
| 28 | {
|
|---|
| 29 | private:
|
|---|
| 30 | enum
|
|---|
| 31 | {
|
|---|
| 32 | kBackground = 50,
|
|---|
| 33 | kHasFlag = BIT(17),
|
|---|
| 34 | kHasCreation = BIT(18),
|
|---|
| 35 | kUserBits = 0x7fc000 // 14-23 are allowed
|
|---|
| 36 | };
|
|---|
| 37 |
|
|---|
| 38 | TTimer fTimer; // timer rising the 500ms interrputs
|
|---|
| 39 |
|
|---|
| 40 | MGeomCam *fGeomCam; // pointer to camera geometry
|
|---|
| 41 |
|
|---|
| 42 | UShort_t fNumPixels; // number of pixels in the present geometry
|
|---|
| 43 | Short_t fNumInit; // number of bombs in the field
|
|---|
| 44 | Float_t fRange; // the range in millimeters of the present geometry
|
|---|
| 45 |
|
|---|
| 46 | Bool_t fAuto;
|
|---|
| 47 |
|
|---|
| 48 | Char_t fLimit;
|
|---|
| 49 |
|
|---|
| 50 | UShort_t fNumCivilizations;
|
|---|
| 51 | UInt_t fStep;
|
|---|
| 52 |
|
|---|
| 53 | TText fCivilization; // TText showing the numbers of pixels and bombs
|
|---|
| 54 |
|
|---|
| 55 | TArrayI fColors;
|
|---|
| 56 |
|
|---|
| 57 | void Update();
|
|---|
| 58 | void Free();
|
|---|
| 59 | void SetNewCamera(MGeomCam *);
|
|---|
| 60 |
|
|---|
| 61 | Bool_t HandleTimer(TTimer *timer);
|
|---|
| 62 | void Draw(Option_t *option="");
|
|---|
| 63 | void Paint(Option_t *option="");
|
|---|
| 64 | void ExecuteEvent(Int_t event, Int_t px, Int_t py);
|
|---|
| 65 | Int_t DistancetoPrimitive(Int_t px, Int_t py) { return 0; }
|
|---|
| 66 |
|
|---|
| 67 | public:
|
|---|
| 68 | MagicCivilization(Byte_t lim=2, UShort_t init=200);
|
|---|
| 69 | ~MagicCivilization();
|
|---|
| 70 |
|
|---|
| 71 | void ChangeCamera(); //*MENU*
|
|---|
| 72 | void Reset(); //*MENU*
|
|---|
| 73 |
|
|---|
| 74 | ClassDef(MagicCivilization, 0) // Tool to visualize next neighbours
|
|---|
| 75 | };
|
|---|
| 76 |
|
|---|
| 77 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.