Changeset 2547 in Sophya for trunk/SophyaPI/PIext


Ignore:
Timestamp:
Jun 2, 2004, 3:23:24 PM (21 years ago)
Author:
ansari
Message:

Suite (et presque fin) adaptation/codage options auto/rescaling ds PINTup3D - Reza 2 Juin 2004

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pintup3d.cc

    r2545 r2547  
    252252
    253253  if ( (i > 0) && connectPts ) // On relie les points ...
    254     g3->DrawLine3D(xl*mScx, yl*mScy, zl*mScz, xp*mScx, yp*mScy, zp*mScz);
     254    g3->DrawLine3D(ScaleX(xl), ScaleY(yl), ScaleZ(zl), ScaleX(xp), ScaleY(yp), ScaleZ(zp));
    255255  nok++;
    256256  if ( xebK >= 0 ) {
    257257    xer = mNT->GetCell(i, xebK);
    258     g3->DrawLine3D((xp-xer)*mScx, yp*mScy, zp*mScz, (xp+xer)*mScx, yp*mScy, zp*mScz);
     258    g3->DrawLine3D(ScaleX(xp-xer), ScaleY(yp), ScaleZ(zp), ScaleX(xp+xer), ScaleY(yp), ScaleZ(zp) );
    259259  }
    260260  if ( yebK >= 0 ) {
    261261    yer = mNT->GetCell(i, yebK);
    262     g3->DrawLine3D(xp*mScx, (yp-yer)*mScy, zp*mScz, xp*mScx, (yp+yer)*mScy, zp*mScz);
     262    g3->DrawLine3D(ScaleX(xp), ScaleY(yp-yer), ScaleZ(zp), ScaleX(xp), ScaleY(yp+yer), ScaleZ(zp) );
    263263  }
    264264  if ( zebK >= 0 ) {
    265265    zer = mNT->GetCell(i, zebK);
    266     g3->DrawLine3D(xp*mScx, yp*mScy, (zp-zer)*mScz, xp*mScx, yp*mScy, (zp+zer)*mScz);
     266    g3->DrawLine3D(ScaleX(xp), ScaleY(yp), ScaleZ(zp-zer), ScaleX(xp), ScaleY(yp), ScaleZ(zp+zer));
    267267  }
    268268  // Trace du marker
    269269  if ((wK >= 0)||(lK < 0)||(mmrk != PI_NotDefMarker)) 
    270     g3->DrawMarker3D(xp*mScx, yp*mScy, zp*mScz);
     270    g3->DrawMarker3D(ScaleX(xp), ScaleY(yp), ScaleZ(zp));
    271271  // Trace eventuel du label
    272   if (lK >= 0) g3->DrawString3D(xp*mScx, yp*mScy, zp*mScz,
     272  if (lK >= 0) g3->DrawString3D(ScaleX(xp), ScaleY(yp), ScaleZ(zp),
    273273                                mNT->GetCelltoString(i, lK).c_str());
    274274}
     
    295295  // on herite. (Pas obligatoire) on decode donc ici les attributs de
    296296  // couleur, fontes ...
    297   int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
     297  int ndec1 = PIDrawer3D::DecodeOptionString(opt, rmdecopt);
    298298  if(optsz1-ndec1<1) return(ndec1);  // si tout a ete decode
    299299
     
    313313      UseSizeScale(true, nbn);
    314314    }
    315     else if (opts == "rescalexy") aScxy = true;
    316     else if (opts == "norescalexy") aScxy = false;
    317     else if (opts == "rescalez") aScz = true;
    318     else if (opts == "norescalez") aScz = false;
    319315    else {
    320316      // Si option non decode
     
    332328int PINTuple3D::OptionToString(vector<string> & opt) const
    333329{
    334  PIDrawer::OptionToString(opt);
     330 PIDrawer3D::OptionToString(opt);
    335331
    336332 if(connectPts) opt.push_back("connectpoints");
     
    346342 } else opt.push_back("nosizescale");
    347343
    348  if(aScxy) opt.push_back("rescalexy");
    349    else opt.push_back("norescalexy");
    350 
    351  if(aScz) opt.push_back("rescalez");
    352    else opt.push_back("norescalez");
    353 
    354344 return 1;
    355345}
     
    369359info += "  colorscale/nocolorscale (Use color scale for weight) \n";
    370360info += "  sizescale/sizescale=nbins/nosizescale (Use marker size for weight) \n";
    371 info += "  rescalexy / norescalexy   rescalez / norescalez \n";
    372 info += "  and usual color/line/marker/... attribute decoding  \n";
    373361// On recupere ensuite la chaine info de la classe de base
    374 PIDrawer::GetOptionsHelpInfo(info);
     362PIDrawer3D::GetOptionsHelpInfo(info);
    375363return;
    376364}
Note: See TracChangeset for help on using the changeset viewer.