Changeset 2400 in Sophya for trunk/SophyaPI
- Timestamp:
- Jun 6, 2003, 4:58:23 PM (22 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintup3d.cc
r2373 r2400 48 48 mNT = nt; 49 49 mAdDO = ad; 50 mAutoScaleXY = mAutoScaleZ = true; 50 51 UseSizeScale(true, 5); 51 52 UseColorScale(true); 53 ConnectPoints(false); 52 54 SelectXYZ(NULL, NULL, NULL); 53 55 SelectWt(NULL); … … 139 141 mNT->GetMinMax(zK, zmin, zmax); 140 142 143 ComputeScaleFactor(xmin, xmax, ymin, ymax, zmin, zmax, 144 mAutoScaleXY, mAutoScaleZ, mScy, mScz); 145 146 // cout << " DEBUG - NTup3D X:" << XMin3() << "-" << XMax3() " s=" << mScx 147 // << " Y:" YMin3() << "-" << YMax3() << " 148 xmin *= mScx; xmax *= mScx; 149 ymin *= mScy; ymax *= mScy; 150 zmin *= mScz; zmax *= mScz; 141 151 // Centre du champ en C = (xmin+xmax)/2., (ymin+ymax)/2 (zmin+zmax)*0.5 142 152 // Distance D = Max(xmax-xmin,ymin-ymax)*2 … … 149 159 (xmin+xmax)/2.+D , (ymin+ymax)/2.-2.5*D , zmin+(zmax-zmin)*0.85, 0.25, 0.25); 150 160 161 Set3DBox(xmin, xmax, ymin, ymax, zmin, zmax, mScx, mScy, mScz); 162 151 163 /* 152 164 x3Min = xmin; // - PERC_GARDE*(xmax-xmin); … … 158 170 */ 159 171 160 Set3DBox(xmin, xmax, ymin, ymax, zmin, zmax);161 172 162 173 // printf("PINTuple3D::UpdateLimits() : %g .. %g %g .. %g %g .. %g (%g) \n", xmin,xmax,ymin,ymax,zmin,zmax,D); … … 241 252 242 253 if ( (i > 0) && connectPts ) // On relie les points ... 243 g3->DrawLine3D(xl , yl, zl, xp, yp, zp);254 g3->DrawLine3D(xl*mScx, yl*mScy, zl*mScz, xp*mScx, yp*mScy, zp*mScz); 244 255 nok++; 245 256 if ( xebK >= 0 ) { 246 257 xer = mNT->GetCell(i, xebK); 247 g3->DrawLine3D( xp-xer, yp, zp, xp+xer, yp, zp);258 g3->DrawLine3D((xp-xer)*mScx, yp*mScy, zp*mScz, (xp+xer)*mScx, yp*mScy, zp*mScz); 248 259 } 249 260 if ( yebK >= 0 ) { 250 261 yer = mNT->GetCell(i, yebK); 251 g3->DrawLine3D(xp , yp-yer, zp, xp, yp+yer, zp);262 g3->DrawLine3D(xp*mScx, (yp-yer)*mScy, zp*mScz, xp*mScx, (yp+yer)*mScy, zp*mScz); 252 263 } 253 264 if ( zebK >= 0 ) { 254 265 zer = mNT->GetCell(i, zebK); 255 g3->DrawLine3D(xp , yp, zp-zer, xp, yp, zp+zer);266 g3->DrawLine3D(xp*mScx, yp*mScy, (zp-zer)*mScz, xp*mScx, yp*mScy, (zp+zer)*mScz); 256 267 } 257 268 // Trace du marker 258 if ((wK >= 0)||(lK < 0)||(mmrk != PI_NotDefMarker)) g3->DrawMarker3D(xp, yp, zp); 269 if ((wK >= 0)||(lK < 0)||(mmrk != PI_NotDefMarker)) 270 g3->DrawMarker3D(xp*mScx, yp*mScy, zp*mScz); 259 271 // Trace eventuel du label 260 if (lK >= 0) g3->DrawString3D(xp, yp, zp, mNT->GetCelltoString(i, lK).c_str()); 272 if (lK >= 0) g3->DrawString3D(xp*mScx, yp*mScy, zp*mScz, 273 mNT->GetCelltoString(i, lK).c_str()); 261 274 } 262 275 … … 303 316 UseSizeScale(true, nbn); 304 317 } 318 else if (opts == "rescalexy") mAutoScaleXY = true; 319 else if (opts == "norescalexy") mAutoScaleXY = false; 320 else if (opts == "rescalez") mAutoScaleZ = true; 321 else if (opts == "norescalez") mAutoScaleZ = false; 305 322 else { 306 323 // Si option non decode … … 325 342 void PINTuple3D::GetOptionsHelpInfo(string& info) 326 343 { 327 // On recupere d'abord la chaine info de la classe de base328 PIDrawer::GetOptionsHelpInfo(info);329 344 info += " ---- PINTuple3D options help info : \n" ; 330 345 info += " connectpoints: The points are connected by a line \n"; … … 332 347 info += " colorscale/nocolorscale (Use color scale for weight) \n"; 333 348 info += " sizescale/sizescale=nbins/nosizescale (Use marker size for weight) \n"; 349 info += " rescalexy / norescalexy rescalez / norescalez \n"; 334 350 info += " and usual color/line/marker/... attribute decoding \n"; 351 // On recupere ensuite la chaine info de la classe de base 352 PIDrawer::GetOptionsHelpInfo(info); 335 353 return; 336 354 } -
trunk/SophyaPI/PIext/pintup3d.h
r2373 r2400 37 37 NTupleInterface* mNT; 38 38 bool mAdDO; 39 bool mAutoScaleXY, mAutoScaleZ; 39 40 int xK, yK, zK; // Index du nom de variable en X/Y/Z ds le ntuple 40 41 int xebK, yebK, zebK; // Index du nom de variable en ErrBarX/Y/Z ds le ntuple
Note:
See TracChangeset
for help on using the changeset viewer.