125 {980.,1000.,0.,400.} , {980.,1000.,400.,800.} , {980.,1000.,800.,1200.} ,
126 {750.,770.,0.,200.} , {750.,770.,200.,450.} , {750.,770.,450.,850.} ,
127 {480.,540.,0.,200.} , {480.,540.,200.,400.} , {480.,540.,400.,600.} ,
128 {500.,1000.,1320.,1400.} , {280.,500.,1320.,1400.} , {180.,280.,1320.,1400.} ,
129 {600.,1200.,2120.,2180.} , {400.,600.,2120.,2180.} , {300.,400.,2120.,2180.} ,
130 {450.,600.,700.,760.} , {320.,450.,700.,760.} , {220.,320.,700.,760.} , {100.,200.,720.,760.} , {220.,320.,680.,700.} ,
131 {460.,460.1,0.,350.} , {460.,460.1,350.,655.} , {750.,750.1,0.,740.} , {750.,750.1,740.,1000.} ,
132 {1020.,1020.1,0.,740.} , {1020.,1020.1,740.,1281.} ,
133 {370.,532.,705.,705.1} , {194.,370.,705.,705.1} , {99.,190.,730.,690.} ,
134 {683.,1020.,1301.,1301.1} , {264.,683.,1301.,1301.1} , {176.,264.,1301.,1301.1} ,
135 {600.,1170.,2040.,2040.1} , {447.,700.,2207.,2207.1} , {298.,447.,2207.,2207.1} ,
137 {750.,770.,850.,950.} , {480.,540.,600.,720.} };
144 double myZ1 = z1+(
r1!=
r2?(z2-z1)/(r2-r1)*(
dim[
i][0]-
r1):(z2-z1)*0.5);
145 double myZ2 = z1+(
r1!=
r2?(z2-z1)/(r2-r1)*(
dim[
i][1]-
r1):(z2-z1)*0.5);
146 double myR1 =
r1+(z1!=z2?(
r2-
r1)/(z2-z1)*(
dim[
i][2]-z1):(r2-r1)*0.5);
147 double myR2 =
r1+(z1!=z2?(
r2-
r1)/(z2-z1)*(
dim[
i][3]-z1):(r2-r1)*0.5);
150 if ( r1<
dim[
i][0] && r2>
dim[
i][0] && myZ1>
dim[
i][2] && myZ1<
dim[
i][3] ) hit = 1;
152 else if ( r1>
dim[
i][1] && r2<
dim[
i][1] && myZ2>
dim[
i][2] && myZ2<
dim[
i][3] ) hit = 2;
154 else if ( z1<
dim[
i][2] && z2>
dim[
i][2] && myR1>
dim[
i][0] && myR1<
dim[
i][1] ) hit = 3;
156 else if ( z1>
dim[
i][3] && z2<
dim[
i][3] && myR2>
dim[
i][0] && myR2<
dim[
i][1] ) hit = 4;
161 if ( (r1==
dim[
i][0]&&z1==
dim[
i][2])||(r2==
dim[
i][0]&&r2==
dim[
i][2]) ) hit = 1;
165 double nume_a = (z2 - z1)*(
dim[
i][0] - r1) - (
r2 -
r1)*(
dim[
i][2] - z1);
169 if(!nume_a && !nume_b) hit=1;
171 double ua = nume_a /
denom;
172 double ub = nume_b /
denom;
173 if(ua >= 0. && ua <= 1. && ub >= 0. && ub <= 1.) hit=2;