00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef VOROPP_WALL_HH
00011 #define VOROPP_WALL_HH
00012
00013
00014
00015
00016 struct wall_sphere : public wall {
00017 public:
00018
00019
00020
00021
00022
00023
00024 wall_sphere(fpoint ixc,fpoint iyc,fpoint izc,fpoint irc,int iw_id=-99)
00025 : w_id(iw_id), xc(ixc), yc(iyc), zc(izc), rc(irc) {};
00026 bool point_inside(fpoint x,fpoint y,fpoint z);
00027 template<class n_option>
00028 inline bool cut_cell_base(voronoicell_base<n_option> &c,fpoint x,fpoint y,fpoint z);
00029 bool cut_cell(voronoicell_base<neighbor_none> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00030 bool cut_cell(voronoicell_base<neighbor_track> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00031 private:
00032 const int w_id;
00033 const fpoint xc,yc,zc,rc;
00034 };
00035
00036
00037
00038
00039 struct wall_plane : public wall {
00040 public:
00041
00042
00043
00044
00045
00046 wall_plane(fpoint ixc,fpoint iyc,fpoint izc,fpoint iac,int iw_id=-99)
00047 : w_id(iw_id), xc(ixc), yc(iyc), zc(izc), ac(iac) {};
00048 bool point_inside(fpoint x,fpoint y,fpoint z);
00049 template<class n_option>
00050 inline bool cut_cell_base(voronoicell_base<n_option> &c,fpoint x,fpoint y,fpoint z);
00051 bool cut_cell(voronoicell_base<neighbor_none> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00052 bool cut_cell(voronoicell_base<neighbor_track> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00053 private:
00054 const int w_id;
00055 const fpoint xc,yc,zc,ac;
00056 };
00057
00058
00059
00060
00061 struct wall_cylinder : public wall {
00062 public:
00063
00064
00065
00066
00067
00068
00069
00070
00071 wall_cylinder(fpoint ixc,fpoint iyc,fpoint izc,fpoint ixa,fpoint iya,fpoint iza,fpoint irc,int iw_id=-99)
00072 : w_id(iw_id), xc(ixc), yc(iyc), zc(izc), xa(ixa), ya(iya), za(iza),
00073 asi(1/(ixa*ixa+iya*iya+iza*iza)), rc(irc) {};
00074 bool point_inside(fpoint x,fpoint y,fpoint z);
00075 template<class n_option>
00076 inline bool cut_cell_base(voronoicell_base<n_option> &c,fpoint x,fpoint y,fpoint z);
00077 bool cut_cell(voronoicell_base<neighbor_none> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00078 bool cut_cell(voronoicell_base<neighbor_track> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00079 private:
00080 const int w_id;
00081 const fpoint xc,yc,zc,xa,ya,za,asi,rc;
00082 };
00083
00084
00085
00086
00087
00088 struct wall_cone : public wall {
00089 public:
00090
00091
00092
00093
00094
00095
00096
00097
00098 wall_cone(fpoint ixc,fpoint iyc,fpoint izc,fpoint ixa,fpoint iya,fpoint iza,fpoint ang,int iw_id=-99)
00099 : w_id(iw_id), xc(ixc), yc(iyc), zc(izc), xa(ixa), ya(iya), za(iza),
00100 asi(1/(ixa*ixa+iya*iya+iza*iza)),
00101 gra(tan(ang)), sang(sin(ang)), cang(cos(ang)) {};
00102 bool point_inside(fpoint x,fpoint y,fpoint z);
00103 template<class n_option>
00104 inline bool cut_cell_base(voronoicell_base<n_option> &c,fpoint x,fpoint y,fpoint z);
00105 bool cut_cell(voronoicell_base<neighbor_none> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00106 bool cut_cell(voronoicell_base<neighbor_track> &c,fpoint x,fpoint y,fpoint z) {return cut_cell_base(c,x,y,z);}
00107 private:
00108 const int w_id;
00109 const fpoint xc,yc,zc,xa,ya,za,asi,gra,sang,cang;
00110 };
00111
00112 #endif