Changeset 12753 for trunk/Ohana/src/opihi
- Timestamp:
- Apr 5, 2007, 1:36:09 PM (19 years ago)
- Location:
- trunk/Ohana/src/opihi/dvo
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/gimages.c
r12750 r12753 80 80 int TriangleUp = wordhash ("TRP-"); 81 81 int TriangleDn = wordhash ("TRM-"); 82 int TrianglePts = wordhash ("TRI-"); 82 83 83 84 Nfound = 0; -
trunk/Ohana/src/opihi/dvo/images.c
r12750 r12753 114 114 int TriangleUp = wordhash ("TRP-"); 115 115 int TriangleDn = wordhash ("TRM-"); 116 int TrianglePts = wordhash ("TRI-"); 116 117 117 118 npts = NPTS = 200; … … 155 156 x[1] = +0.5*image[i].NX; y[1] = +0.5*image[i].NY; 156 157 x[2] = -0.5*image[i].NX; y[2] = +0.5*image[i].NY; 158 goto got_type; 159 } 160 // For 'TrianglePts' (TRI-), we are using the Mx,My, etc terms to save the coordinates 161 // this means triangular images cannot carry photometric zero-point variations 162 if (typehash == TrianglePts) { 163 Npts = 3; 164 x[0] = image[i].Mx; y[0] = image[i].My; 165 x[1] = image[i].Mxxx; y[1] = image[i].Mxyy; 166 x[2] = image[i].Mxxy; y[2] = image[i].Myyy; 157 167 goto got_type; 158 168 } … … 228 238 if (Npts == 0) continue; 229 239 230 // if any of the points is on the screen, plot the image231 240 status = FALSE; 232 241 for (j = 0; j < Npts; j++) { … … 239 248 Xvec.elements[N+2*Npts-1] = Xvec.elements[N]; 240 249 Yvec.elements[N+2*Npts-1] = Yvec.elements[N]; 250 if (!status) continue; 251 // if none of the points are on the visible side of the projection, do not plot the image 252 241 253 InPic = FALSE; 242 254 for (j = 0; j < 2*Npts; j+=2) { … … 247 259 InPic = TRUE; 248 260 } 249 if (!status && HIDDEN) status = TRUE;250 if ( InPic && status) {251 plist[n] = i; 252 n++;253 if (n > npts - 1) {254 npts += 200; 255 REALLOCATE (plist, int, npts);256 }257 N+=2*Npts;258 if (N + 16 >= NPTS) { /* need to leave room for 8 point image */259 NPTS += 400; 260 REALLOCATE (Xvec.elements, float, NPTS);261 REALLOCATE (Yvec.elements, float, NPTS);262 }261 // if (!status && HIDDEN) status = TRUE; 262 if (!InPic) continue; 263 264 plist[n] = i; 265 n++; 266 if (n > npts - 1) { 267 npts += 200; 268 REALLOCATE (plist, int, npts); 269 } 270 N+=2*Npts; 271 if (N + 16 >= NPTS) { /* need to leave room for 8 point image */ 272 NPTS += 400; 273 REALLOCATE (Xvec.elements, float, NPTS); 274 REALLOCATE (Yvec.elements, float, NPTS); 263 275 } 264 276 }
Note:
See TracChangeset
for help on using the changeset viewer.
