Changeset 1793 for trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
- Timestamp:
- 02/25/03 21:07:13 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
r1784 r1793 97 97 // Reset 'static' positions of planets 98 98 // 99 /* 99 100 for (int i=0; i<9; i++) 100 101 { 101 fX[i] = ~0; 102 fY[i] = ~0; 103 } 102 fPlanetX[i] = ~0; 103 fPlanetY[i] = ~0; 104 } 105 for (int i=0; i<13; i++) 106 { 107 fStarX[i] = ~0; 108 fStarY[i] = ~0; 109 }*/ 104 110 } 105 111 … … 253 259 const float c = cos(zdaz.Az()); 254 260 255 const float x = s*zdaz.Zd()*kRad2Deg; // [deg] 256 const float y = c*zdaz.Zd()*kRad2Deg; // [deg] 261 float x = s*zdaz.Zd()*kRad2Deg; // [deg] 262 float y = c*zdaz.Zd()*kRad2Deg; // [deg] 263 264 if (x>95 || x<-95 || y>95 || y<-95) 265 { 266 if (arc->GetX1()==10 && arc->GetY1()==100) 267 return; 268 269 x=-100; 270 y= 100; 271 } 272 273 const int pixx = (int)(x/fPix); 274 const int pixy = (int)(y/fPix); 275 276 const int oldx = (int)(arc->GetX1()/fPix); 277 const int oldy = (int)(arc->GetY1()/fPix); 278 279 if (pixx==oldx && pixy==oldy) 280 return; 257 281 258 282 arc->SetX1(x); 259 283 arc->SetY1(y); 260 284 261 //SetModified();***MEMORY LEAK!!!***285 SetModified(); //***MEMORY LEAK!!!*** 262 286 } 263 287 … … 302 326 SetLin2(x+dy, y-dx, x-dy, y+dx); 303 327 304 if (zd<80)305 {328 //if (zd<80) 329 //{ 306 330 for(int i=0; i<3; i++) 307 331 SetDot(fDot[i], radec, i-3); 308 332 for(int i=3; i<6; i++) 309 333 SetDot(fDot[i], radec, i-2); 310 }334 //} 311 335 312 336 SetModified(); … … 363 387 364 388 RaDec radec = fSlaStar->CalcRaDecFast(pos*kDeg2Rad); 365 366 389 UpdatePosition(radec, pos.Zd(), pos.Az()); 367 390 UpdateText(pos.Zd(), pos.Az()); … … 387 410 const float deg = zdaz.Zd()*kRad2Deg; 388 411 389 const float x = s*deg; 390 const float y = c*deg; 412 float x = s*deg; 413 float y = c*deg; 414 415 if (x>95 || x<-95 || y>95 || y<-95) 416 { 417 if (arc->GetX1()==10 && arc->GetY1()==100) 418 return; 419 420 x=-100; 421 y= 100; 422 } 391 423 392 424 const int pixx = (int)(x/fPix); 393 425 const int pixy = (int)(y/fPix); 394 426 395 if (fX[planet]==pixx && fY[planet]==pixy) 427 const int oldx = (int)(arc->GetX1()/fPix); 428 const int oldy = (int)(arc->GetY1()/fPix); 429 430 if (oldx==pixx && oldy==pixy) 396 431 return; 397 398 fX[planet] = pixx;399 fY[planet] = pixy;400 432 401 433 //
Note:
See TracChangeset
for help on using the changeset viewer.