00001 #ifndef LOSOWANIE_H_
00002 #define LOSOWANIE_H_
00003
00004 #include "wektor.h"
00005 #include <cstdlib>
00006
00007 class Losowanie{
00008 int ilePSZ;
00009
00010 int wymiarX,wymiarY,wymiarZ;
00011 Punkt startP[8];
00012 IntList pomoc;
00013
00014
00015 PunktList testG;
00016 PunktList punkty;
00017
00018 void wybierzKrawedz(int ktora);
00019
00020 void losujPlaszczyznyPer(int dok,int ileTabPX,int ileTabPY,int ileTabPZ,char **TabP,int odGranicy,int odPunktu,double ax,double b0, int rszuk);
00021 void losujPlaszczyznyNiePer(int dok,int ileTabPX,int ileTabPY,int ileTabPZ,char **TabP,int odGranicy,int odPunktu,double ax,double b0, int rszuk);
00022 void losujKrawedziePer(int dok,int ileTabPX,int ileTabPY,int ileTabPZ,char **TabP,int odGranicy,int odPunktu,double ax,double b0, int rszuk);
00023 void losujKrawedzieNiePer(int dok,int ileTabPX,int ileTabPY,int ileTabPZ,char **TabP,int odGranicy,int odPunktu,double ax,double b0, int rszuk);
00024
00025 void losujWObjetosci(int dok,int ileTabPX,int ileTabPY,int ileTabPZ,char **TabP,int ilePunktow,int odGranicy,int odPunktu,double ax,double b0, int rszuk);
00026 void dodajPunktyWWolnepola(char **TabP,int ileTabPX,int ileTabPY,int ileTabPZ);
00027
00028 void dodajPunktyPodSpawanie(char **TabP,int ileTabPX,int ileTabPY,int ileTabPZ);
00029
00030 public:
00031
00032 void setPG(PunktList &pg);
00033 void skalujWymiar(double liczba);
00034
00035 int getIlePSZ(){return ilePSZ;}
00036
00037
00038 void punktyPoczatkoweSzkielet(int range,int prob);
00039 void punktyPoczatkoweOctree(int podziel,int ileRazy);
00040
00041 void losowanie(){;}
00042 void testGranica(int rozdz);
00043
00044
00045 void losuj(bool losuj,int wymX,int wymY,int wymZ,int ileP,int rozdz,int odGranicy,int odPunktu,bool flagaPer,double ax,double b0, int rszuk);
00046 void losujPromien(int wym,int ileP,int promien);
00047 void losujMieszanie(int wym,int ileP,int promien);
00048
00049 int getIlePunktow(){return punkty.getIter();}
00050 double getWymiarX(){return wymiarX;}
00051 double getWymiarY(){return wymiarY;}
00052 double getWymiarZ(){return wymiarZ;}
00053 double getWymiarMax();
00054
00055 PunktList & zwrocPunkty(){return punkty;}
00056 PunktList & zwrocPunktyZGranica();
00057 void rysujPunkty(double maxX,double maxY,double maxZ);
00058 void rysujPunktySzkieletu();
00059 void rysuj123();
00060
00061 void wczytajPunktySztuczneSerce(const char *nazwa);
00062 void ileGranicznych();
00063 void dodajPunktyPodSpawanie(int ileTabPX,int ileTabPY,int ileTabPZ);
00064
00065 };
00066
00067
00068
00069 #endif //LOSOWANIE_H_