00001 #ifndef __PLOCHA_H
00002 #define __PLOCHA_H
00003
00004 #include <iostream>
00005
00006
00007 #define KR_BODU 8
00008
00009 #define KR_POCET_PLOCH 6
00010
00011 #define KR_PLOCHA_BODU 4
00012
00013 #define CT_BODU 4
00014
00015 #define CT_POCET_PLOCH 4
00016
00017 #define CT_PLOCHA_BODU 3
00018
00019 #define FOR(i,MAX) for(i=0;i<MAX;i++)
00020
00021
00022 enum typPlochy { VNEJSI, VNITRNI, STYCNA, NEVI_SE, CLOSE };
00023
00024 class Plocha
00025 {
00026
00027
00028 inline bool stejneXYZ(const long cb1,const long cb2)const;
00029
00030
00031 bool cmp(const Plocha & p1,const Plocha & p2)const;
00032 public:
00033
00034
00035 static short shoda[KR_PLOCHA_BODU];
00036
00037
00038 static double const** xyz;
00039
00040 long prvek;
00041
00042 long plocha;
00043
00044 long pbp;
00045
00046 long * bodyp;
00047
00048 typPlochy typ;
00049
00050 short size_sousedni;
00051
00052 Plocha ** sousedni;
00053
00054 bool vyhodit;
00055
00056 Plocha(const double **xyz, long * bodyp, long plochaBodu, long prvek, long plocha);
00057
00058 bool operator ==( Plocha &)const;
00059 bool operator !=( Plocha &)const;
00060 ~Plocha();
00061 void vlozSousedniPlochu(Plocha * p);
00062
00063 friend std::ostream& operator<<(std::ostream &os, Plocha &n);
00064 };
00065
00066
00067
00068 #endif
00069
00070