Skip to content
Snippets Groups Projects
Commit 27b53574 authored by Olivier Couet's avatar Olivier Couet
Browse files

- Remove useless code

git-svn-id: http://root.cern.ch/svn/root/trunk@36557 27541ba8-7e3a-0410-8455-c3a389f83636
parent a32a4cd1
No related branches found
No related tags found
No related merge requests found
......@@ -462,12 +462,6 @@ Bool_t TGLH2PolyPainter::UpdateGeometry()
return kFALSE;
}
const Int_t nV = b->GetN();
if (nV < 3) {
Error("TGH2PolyPainter::UpdateGeometry", "Polygon must have at least 3 vertices");
return kFALSE;
}
const Double_t z = b->GetContent() * fCoord->GetZScale();
//Update z coordinate in all patches.
Rgl::Pad::Tesselation_t &tess = *cap;
......
......@@ -40,16 +40,12 @@ public:
Double_t GetContent() const{return fContent;}
Bool_t GetChanged() const{return fChanged;}
Int_t GetBinNumber() const {return fNumber;}
Int_t GetN() {return 0;} // To be revisited needed by TGLH2PolyPainter.cxx
TObject *GetPolygon() const {return fPoly;}
Double_t *GetX() {return 0;} // To be revisited needed by TGLH2PolyPainter.cxx
Double_t *GetY() {return 0;} // To be revisited needed by TGLH2PolyPainter.cxx
Double_t GetXMax();
Double_t GetXMin();
Double_t GetYMax();
Double_t GetYMin();
Bool_t IsInside(Double_t x, Double_t y) const;
void Orient();
void SetChanged(Bool_t flag){fChanged = flag;}
void SetContent(Double_t content){fContent = content; SetChanged(true);}
......
......@@ -1099,7 +1099,6 @@ TH2PolyBin::TH2PolyBin(TObject *poly, Int_t bin_number)
fXmin = -1111;
fYmax = -1111;
fYmin = -1111;
/// Orient();
SetChanged(kTRUE);
}
......@@ -1333,37 +1332,3 @@ Bool_t TH2PolyBin::IsInside(Double_t x, Double_t y) const
return in;
}
//______________________________________________________________________________
void TH2PolyBin::Orient()
{
///// Orients the TH2PolyBin polygon in the counterclockwise orientation.
///// This is required for the OpenGL lego plot (option = "glhp") of TH2Poly.
///
///Double_t *bx = GetX();
///Double_t *by = GetY();
///Int_t bn = GetN();
///
///// Determine the orientation
///Double_t signedArea = 0;
///for (int i = 0; i<(bn-1); i++) {
/// signedArea += (bx[i]*by[i+1] - by[i]*bx[i+1]);
///}
///
///// Orient, if necessary
///if (signedArea < 0) {
/// int a, b;
/// Double_t swap;
///
/// for (a = 0; a<=((bn/2) - 1); a++) {
/// b = bn-1-a;
/// swap = bx[a];
/// bx[a] = bx[b];
/// bx[b] = swap;
/// swap = by[a];
/// by[a] = by[b];
/// by[b] = swap;
/// }
///}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment