Changeset 486 in Sophya for trunk/SophyaPI/PIext/pintup3d.cc
- Timestamp:
- Oct 21, 1999, 2:22:56 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintup3d.cc
r440 r486 10 10 mAdDO = ad; 11 11 SelectXYZ(NULL, NULL, NULL); 12 SelectWt(NULL, 1); 12 13 SelectErrBar(); 14 SelectLabel(NULL); 13 15 } 14 16 … … 29 31 if (pz == NULL) zK = -1; 30 32 else { name = pz; zK = mNT->ColumnIndex(name); } 33 } 34 35 /* --Methode-- */ 36 void PINTuple3D::SelectWt(const char* pw, int nbins) 37 { 38 nWbins = (nbins > 0) ? nbins : 10; 39 if (pw == NULL) wK = -1; 40 else { string name = pw; wK = mNT->ColumnIndex(name); } 41 42 if (wK >= 0) mNT->GetMinMax(wK, wMin, wMax); 43 else { wMin = 0.; wMax = 1.; } 44 } 45 46 /* --Methode-- */ 47 void PINTuple3D::SelectLabel(const char* plabel) 48 { 49 if (plabel == NULL) lK = -1; 50 else { string name = plabel; lK = mNT->ColumnIndex(name); } 31 51 } 32 52 … … 88 108 void PINTuple3D::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 89 109 { 90 double xp,yp,zp, xer,yer,zer;110 double xp,yp,zp,wp,xer,yer,zer; 91 111 double xl,yl,zl; 92 112 int nok; … … 106 126 if (mLAtt == PI_NotDefLineAtt) g3->SelLine(PI_ThinLine); 107 127 128 // Pour tracer des markers avec taille fonction de Wt (poids) 129 double dw = (wMax-wMin)/nWbins; 130 if (dw < 1.e-19) dw = 1.e19; 131 int msz,sz; 132 133 PIMarker mrk; 134 if (wK >= 0) mrk = (mMrk != PI_NotDefMarker) ? mMrk : PI_CircleMarker; 135 else mrk = (mMrk != PI_NotDefMarker) ? mMrk : PI_DotMarker; 136 msz = mMSz; 137 if (msz < 1) msz = 1; 138 g->SelMarker(msz, mrk); 139 108 140 nok = 0; 109 141 xp = yp = zp = xl = yl = zl = 0; … … 116 148 g3->DrawLine3D(xl, yl, zl, xp, yp, zp); 117 149 nok++; 118 g3->DrawMarker3D(xp, yp, zp);119 150 if ( xebK >= 0 ) { 120 151 xer = mNT->GetCell(i, xebK); … … 129 160 g3->DrawLine3D(xp, yp, zp-zer, xp, yp, zp+zer); 130 161 } 162 if (wK >= 0) { // Taille de marker en fonction du poids 163 wp = mNT->GetCell(i, wK); 164 sz = (int)((wp-wMin)/dw); 165 if (sz < 0) sz = 0; 166 if (sz > nWbins) sz = nWbins; 167 sz += msz; 168 if (sz < 2) g->SelMarker(sz, PI_DotMarker); 169 else g->SelMarker(sz, mrk); 170 } 171 // Trace du marker 172 if ((wK >= 0)||(lK < 0)||(mMrk != PI_NotDefMarker)) g3->DrawMarker3D(xp, yp, zp); 173 // Trace eventuel du label 174 if (lK >= 0) g3->DrawString3D(xp, yp, zp, mNT->GetCelltoString(i, lK).c_str()); 131 175 } 132 176
Note:
See TracChangeset
for help on using the changeset viewer.