TGLH2PolyPainter Class Reference

#include <TGLH2PolyPainter.h>

Inheritance diagram for TGLH2PolyPainter:

TGLPlotPainter TGLPlotPainter TVirtualGLPainter TVirtualGLPainter TVirtualGLPainter TVirtualGLPainter List of all members.

Public Member Functions

 TGLH2PolyPainter (TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
char * GetPlotInfo (Int_t px, Int_t py)
Bool_t InitGeometry ()
void StartPan (Int_t px, Int_t py)
void Pan (Int_t px, Int_t py)
void AddOption (const TString &stringOption)
void ProcessEvent (Int_t event, Int_t px, Int_t py)
 TGLH2PolyPainter (TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
char * GetPlotInfo (Int_t px, Int_t py)
Bool_t InitGeometry ()
void StartPan (Int_t px, Int_t py)
void Pan (Int_t px, Int_t py)
void AddOption (const TString &stringOption)
void ProcessEvent (Int_t event, Int_t px, Int_t py)

Private Types

typedef std::list< Rgl::Pad::Tesselation_t
>::const_iterator 
CIter_t
typedef std::list< Rgl::Pad::Tesselation_t
>::const_iterator 
CIter_t

Private Member Functions

void InitGL () const
void DeInitGL () const
void DrawPlot () const
void DrawExtrusion () const
void DrawExtrusion (const TGraph *polygon, Double_t zMin, Double_t zMax, Int_t nBin) const
void DrawExtrusion (const TMultiGraph *polygon, Double_t zMin, Double_t zMax, Int_t nBin) const
void DrawCaps () const
void DrawCap (CIter_t cap, Int_t bin) const
Bool_t CacheGeometry ()
Bool_t BuildTesselation (Rgl::Pad::Tesselator &tess, const TGraph *g, Double_t z)
Bool_t BuildTesselation (Rgl::Pad::Tesselator &tess, const TMultiGraph *mg, Double_t z)
Bool_t UpdateGeometry ()
void SetBinColor (Int_t bin) const
void DrawSectionXOZ () const
void DrawSectionYOZ () const
void DrawSectionXOY () const
void DrawPalette () const
void DrawPaletteAxis () const
void FillTemporaryPolygon (const Double_t *xs, const Double_t *ys, Double_t z, Int_t n) const
void MakePolygonCCW () const
Bool_t ClampZ (Double_t &zVal) const
 ClassDef (TGLH2PolyPainter, 0)
void InitGL () const
void DeInitGL () const
void DrawPlot () const
void DrawExtrusion () const
void DrawExtrusion (const TGraph *polygon, Double_t zMin, Double_t zMax, Int_t nBin) const
void DrawExtrusion (const TMultiGraph *polygon, Double_t zMin, Double_t zMax, Int_t nBin) const
void DrawCaps () const
void DrawCap (CIter_t cap, Int_t bin) const
Bool_t CacheGeometry ()
Bool_t BuildTesselation (Rgl::Pad::Tesselator &tess, const TGraph *g, Double_t z)
Bool_t BuildTesselation (Rgl::Pad::Tesselator &tess, const TMultiGraph *mg, Double_t z)
Bool_t UpdateGeometry ()
void SetBinColor (Int_t bin) const
void DrawSectionXOZ () const
void DrawSectionYOZ () const
void DrawSectionXOY () const
void DrawPalette () const
void DrawPaletteAxis () const
void FillTemporaryPolygon (const Double_t *xs, const Double_t *ys, Double_t z, Int_t n) const
void MakePolygonCCW () const
Bool_t ClampZ (Double_t &zVal) const
 ClassDef (TGLH2PolyPainter, 0)

Private Attributes

TString fBinInfo
std::vector< Int_tfBinColors
std::vector< Double_tfPolygon
std::list< Rgl::Pad::Tesselation_tfCaps
Bool_t fZLog
Double_t fZMin
std::vector< Int_tfBinColors
std::vector< Double_tfPolygon
std::list< Rgl::Pad::Tesselation_tfCaps

Detailed Description

Definition at line 20 of file TGLH2PolyPainter.h.


Member Typedef Documentation

typedef std::list<Rgl::Pad::Tesselation_t>::const_iterator TGLH2PolyPainter::CIter_t [private]

Definition at line 43 of file TGLH2PolyPainter.h.

typedef std::list<Rgl::Pad::Tesselation_t>::const_iterator TGLH2PolyPainter::CIter_t [private]

Definition at line 43 of file TGLH2PolyPainter.h.


Constructor & Destructor Documentation

TGLH2PolyPainter::TGLH2PolyPainter ( TH1 hist,
TGLPlotCamera camera,
TGLPlotCoordinates coord 
)

TGLH2PolyPainter::TGLH2PolyPainter ( TH1 hist,
TGLPlotCamera camera,
TGLPlotCoordinates coord 
)


Member Function Documentation

char * TGLH2PolyPainter::GetPlotInfo ( Int_t  px,
Int_t  py 
) [virtual]

Implements TVirtualGLPainter.

Definition at line 36 of file TGLH2PolyPainter.cxx.

References TString::Data(), fBinInfo, TGLPlotPainter::fHighColor, TGLPlotPainter::fHist, TString::Form(), TGLPlotPainter::fSelectedPart, TGLPlotPainter::fSelectionBase, TNamed::GetName(), and h.

Bool_t TGLH2PolyPainter::InitGeometry (  )  [virtual]

Implements TGLPlotPainter.

Definition at line 58 of file TGLH2PolyPainter.cxx.

References CacheGeometry(), TGLPlotPainter::fBackBox, TGLPlotPainter::fCoord, TGLPlotPainter::fHist, fZLog, fZMin, TGLPlotBox::Get3DBox(), TGLPlotCoordinates::GetXRangeScaled(), TGLPlotCoordinates::GetYRangeScaled(), TGLPlotCoordinates::GetZLog(), TGLPlotCoordinates::GetZRangeScaled(), Rgl::gH2PolyScaleXY, hp, kFALSE, kTRUE, TGLPlotBox::SetPlotBox(), TGLPlotCoordinates::SetRanges(), UpdateGeometry(), and TGLVertex3::Z().

void TGLH2PolyPainter::StartPan ( Int_t  px,
Int_t  py 
) [virtual]

Implements TGLPlotPainter.

Definition at line 94 of file TGLH2PolyPainter.cxx.

References TGLPlotPainter::fBoxCut, TGLPlotPainter::fCamera, TGLPlotPainter::fMousePosition, TPoint::fX, TPoint::fY, TGLPlotCamera::GetHeight(), TGLBoxCut::StartMovement(), and TGLPlotCamera::StartPan().

void TGLH2PolyPainter::Pan ( Int_t  px,
Int_t  py 
) [virtual]

Implements TVirtualGLPainter.

Definition at line 104 of file TGLH2PolyPainter.cxx.

References TGLPlotCamera::Apply(), TGLPlotPainter::fBoxCut, TGLPlotPainter::fCamera, TGLPlotPainter::fHighColor, TGLPlotPainter::fMousePosition, TGLPlotPainter::fPadPhi, TGLPlotPainter::fPadTheta, TGLPlotPainter::fSelectedPart, TGLPlotPainter::fSelectionBase, TGLPlotPainter::fUpdateSelection, TPoint::fX, TPoint::fY, TGLPlotCamera::GetHeight(), TGLBoxCut::IsActive(), kTRUE, TGLPlotPainter::kXAxis, TGLPlotPainter::kZAxis, TGLBoxCut::MoveBox(), TGLPlotCamera::Pan(), TGLPlotPainter::RestoreModelviewMatrix(), TGLPlotPainter::RestoreProjectionMatrix(), TGLPlotPainter::SaveModelviewMatrix(), TGLPlotPainter::SaveProjectionMatrix(), and TGLPlotCamera::SetCamera().

void TGLH2PolyPainter::AddOption ( const TString stringOption  )  [virtual]

Implements TGLPlotPainter.

Definition at line 142 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::ProcessEvent ( Int_t  event,
Int_t  px,
Int_t  py 
) [virtual]

Implements TGLPlotPainter.

Definition at line 148 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::InitGL (  )  const [private, virtual]

Implements TGLPlotPainter.

Definition at line 154 of file TGLH2PolyPainter.cxx.

References GL_BACK, GL_CULL_FACE, GL_DEPTH_TEST, GL_LIGHT0, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, GL_TRUE, glCullFace(), glEnable(), and glLightModeli().

void TGLH2PolyPainter::DeInitGL (  )  const [private, virtual]

Implements TGLPlotPainter.

Definition at line 168 of file TGLH2PolyPainter.cxx.

References GL_CULL_FACE, GL_DEPTH_TEST, GL_FALSE, GL_LIGHT0, GL_LIGHT_MODEL_TWO_SIDE, GL_LIGHTING, glDisable(), and glLightModeli().

void TGLH2PolyPainter::DrawPlot (  )  const [private, virtual]

Implements TGLPlotPainter.

Definition at line 186 of file TGLH2PolyPainter.cxx.

References TGLPlotBox::DrawBox(), DrawCaps(), DrawExtrusion(), TGLPlotPainter::fBackBox, TGLPlotPainter::fHighColor, TGLPlotPainter::fSelectedPart, TGLPlotPainter::fSelectionPass, and TGLPlotPainter::fZLevels.

void TGLH2PolyPainter::DrawExtrusion (  )  const [private]

Definition at line 200 of file TGLH2PolyPainter.cxx.

References ClampZ(), TGLPlotPainter::fHist, TList::FirstLink(), fZMin, and TObjLink::Next().

Referenced by DrawExtrusion(), and DrawPlot().

void TGLH2PolyPainter::DrawExtrusion ( const TGraph polygon,
Double_t  zMin,
Double_t  zMax,
Int_t  nBin 
) const [private]

Definition at line 224 of file TGLH2PolyPainter.cxx.

References Distance(), Rgl::DrawQuadFilled(), TGLPlotPainter::fHighColor, FillTemporaryPolygon(), fPolygon, TGLPlotPainter::fSelectedPart, TGLPlotPainter::fSelectionBase, TGLPlotPainter::fSelectionPass, TGraph::GetN(), TGraph::GetX(), TGraph::GetY(), GL_EMISSION, GL_FRONT, glMaterialfv(), Rgl::gNullEmission, Rgl::gOrangeEmission, j, kFALSE, TMath::Normal2Plane(), Rgl::ObjectIDToColor(), SetBinColor(), and v1.

void TGLH2PolyPainter::DrawExtrusion ( const TMultiGraph polygon,
Double_t  zMin,
Double_t  zMax,
Int_t  nBin 
) const [private]

Definition at line 282 of file TGLH2PolyPainter.cxx.

References DrawExtrusion(), TList::FirstLink(), TMultiGraph::GetListOfGraphs(), and TObjLink::Next().

void TGLH2PolyPainter::DrawCaps (  )  const [private]

Definition at line 291 of file TGLH2PolyPainter.cxx.

References DrawCap(), fCaps, TGLPlotPainter::fHist, TList::FirstLink(), glNormal3d(), and TObjLink::Next().

Referenced by DrawPlot().

void TGLH2PolyPainter::DrawCap ( CIter_t  cap,
Int_t  bin 
) const [private]

Definition at line 323 of file TGLH2PolyPainter.cxx.

References TGLPlotPainter::fHighColor, TGLPlotPainter::fSelectedPart, TGLPlotPainter::fSelectionBase, TGLPlotPainter::fSelectionPass, GL_EMISSION, GL_FRONT, glBegin(), glEnd(), glMaterialfv(), glVertex3dv(), Rgl::gNullEmission, Rgl::gOrangeEmission, i, kFALSE, Rgl::ObjectIDToColor(), p, SetBinColor(), and t.

Referenced by DrawCaps().

Bool_t TGLH2PolyPainter::CacheGeometry (  )  [private]

Definition at line 351 of file TGLH2PolyPainter.cxx.

References BuildTesselation(), ClampZ(), Error, fBinColors, fCaps, TGLPlotPainter::fHist, fPolygon, g, TStyle::GetColorPalette(), TH1::GetMaximum(), TH1::GetMinimum(), TStyle::GetNumberOfColors(), gStyle, hp, kFALSE, and kTRUE.

Referenced by InitGeometry().

Bool_t TGLH2PolyPainter::BuildTesselation ( Rgl::Pad::Tesselator tess,
const TGraph g,
Double_t  z 
) [private]

Definition at line 405 of file TGLH2PolyPainter.cxx.

References Error, fCaps, FillTemporaryPolygon(), fPolygon, g, Rgl::Pad::Tesselator::GetTess(), glNormal3d(), j, kFALSE, kTRUE, Rgl::Pad::Tesselator::SetDump(), and t.

Referenced by BuildTesselation(), and CacheGeometry().

Bool_t TGLH2PolyPainter::BuildTesselation ( Rgl::Pad::Tesselator tess,
const TMultiGraph mg,
Double_t  z 
) [private]

Definition at line 442 of file TGLH2PolyPainter.cxx.

References BuildTesselation(), Error, TList::FirstLink(), TMultiGraph::GetListOfGraphs(), graph(), kFALSE, kTRUE, and TObjLink::Next().

Bool_t TGLH2PolyPainter::UpdateGeometry (  )  [private]

Definition at line 467 of file TGLH2PolyPainter.cxx.

References b, ClampZ(), fCaps, TGLPlotPainter::fHist, TList::FirstLink(), for(), hp, i, and kTRUE.

Referenced by InitGeometry().

void TGLH2PolyPainter::SetBinColor ( Int_t  bin  )  const [private]

Definition at line 515 of file TGLH2PolyPainter.cxx.

References c, Error, fBinColors, TROOT::GetColor(), GL_DIFFUSE, GL_FRONT_AND_BACK, GL_SHININESS, GL_SPECULAR, glMaterialf(), glMaterialfv(), and gROOT.

Referenced by DrawCap(), and DrawExtrusion().

void TGLH2PolyPainter::DrawSectionXOZ (  )  const [private, virtual]

Implements TGLPlotPainter.

Definition at line 537 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::DrawSectionYOZ (  )  const [private, virtual]

Implements TGLPlotPainter.

Definition at line 543 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::DrawSectionXOY (  )  const [private, virtual]

Implements TGLPlotPainter.

Definition at line 549 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::DrawPalette (  )  const [private]

Definition at line 555 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::DrawPaletteAxis (  )  const [private, virtual]

Reimplemented from TGLPlotPainter.

Definition at line 561 of file TGLH2PolyPainter.cxx.

void TGLH2PolyPainter::FillTemporaryPolygon ( const Double_t xs,
const Double_t ys,
Double_t  z,
Int_t  n 
) const [private]

Definition at line 567 of file TGLH2PolyPainter.cxx.

References TGLPlotPainter::fCoord, fPolygon, TGLPlotCoordinates::GetXScale(), TGLPlotCoordinates::GetYScale(), IsPolygonCW(), j, and MakePolygonCCW().

Referenced by BuildTesselation(), and DrawExtrusion().

void TGLH2PolyPainter::MakePolygonCCW (  )  const [private]

Definition at line 585 of file TGLH2PolyPainter.cxx.

References a, b, fPolygon, and ROOT::Math::swap().

Referenced by FillTemporaryPolygon().

Bool_t TGLH2PolyPainter::ClampZ ( Double_t zVal  )  const [private]

Definition at line 597 of file TGLH2PolyPainter.cxx.

References TGLPlotPainter::fBackBox, TGLPlotPainter::fCoord, TGLPlotBox::Get3DBox(), TGLPlotCoordinates::GetZLog(), TGLPlotCoordinates::GetZScale(), kFALSE, kTRUE, TMath::Log10(), TGLVertex3::Z(), and Z.

Referenced by CacheGeometry(), DrawExtrusion(), and UpdateGeometry().

TGLH2PolyPainter::ClassDef ( TGLH2PolyPainter  ,
 
) [private]

char* TGLH2PolyPainter::GetPlotInfo ( Int_t  px,
Int_t  py 
) [virtual]

Implements TVirtualGLPainter.

Bool_t TGLH2PolyPainter::InitGeometry (  )  [virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::StartPan ( Int_t  px,
Int_t  py 
) [virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::Pan ( Int_t  px,
Int_t  py 
) [virtual]

Implements TVirtualGLPainter.

void TGLH2PolyPainter::AddOption ( const TString stringOption  )  [virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::ProcessEvent ( Int_t  event,
Int_t  px,
Int_t  py 
) [virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::InitGL (  )  const [private, virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::DeInitGL (  )  const [private, virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::DrawPlot (  )  const [private, virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::DrawExtrusion (  )  const [private]

void TGLH2PolyPainter::DrawExtrusion ( const TGraph polygon,
Double_t  zMin,
Double_t  zMax,
Int_t  nBin 
) const [private]

void TGLH2PolyPainter::DrawExtrusion ( const TMultiGraph polygon,
Double_t  zMin,
Double_t  zMax,
Int_t  nBin 
) const [private]

void TGLH2PolyPainter::DrawCaps (  )  const [private]

void TGLH2PolyPainter::DrawCap ( CIter_t  cap,
Int_t  bin 
) const [private]

Bool_t TGLH2PolyPainter::CacheGeometry (  )  [private]

Bool_t TGLH2PolyPainter::BuildTesselation ( Rgl::Pad::Tesselator tess,
const TGraph g,
Double_t  z 
) [private]

Bool_t TGLH2PolyPainter::BuildTesselation ( Rgl::Pad::Tesselator tess,
const TMultiGraph mg,
Double_t  z 
) [private]

Bool_t TGLH2PolyPainter::UpdateGeometry (  )  [private]

void TGLH2PolyPainter::SetBinColor ( Int_t  bin  )  const [private]

void TGLH2PolyPainter::DrawSectionXOZ (  )  const [private, virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::DrawSectionYOZ (  )  const [private, virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::DrawSectionXOY (  )  const [private, virtual]

Implements TGLPlotPainter.

void TGLH2PolyPainter::DrawPalette (  )  const [private]

void TGLH2PolyPainter::DrawPaletteAxis (  )  const [private, virtual]

Reimplemented from TGLPlotPainter.

void TGLH2PolyPainter::FillTemporaryPolygon ( const Double_t xs,
const Double_t ys,
Double_t  z,
Int_t  n 
) const [private]

void TGLH2PolyPainter::MakePolygonCCW (  )  const [private]

Bool_t TGLH2PolyPainter::ClampZ ( Double_t zVal  )  const [private]

TGLH2PolyPainter::ClassDef ( TGLH2PolyPainter  ,
 
) [private]


Member Data Documentation

TString TGLH2PolyPainter::fBinInfo [private]

Definition at line 66 of file TGLH2PolyPainter.h.

Referenced by GetPlotInfo().

std::vector<Int_t> TGLH2PolyPainter::fBinColors [private]

Definition at line 68 of file TGLH2PolyPainter.h.

Referenced by CacheGeometry(), and SetBinColor().

std::vector<Double_t> TGLH2PolyPainter::fPolygon [mutable, private]

Definition at line 70 of file TGLH2PolyPainter.h.

Referenced by BuildTesselation(), CacheGeometry(), DrawExtrusion(), FillTemporaryPolygon(), and MakePolygonCCW().

std::list<Rgl::Pad::Tesselation_t> TGLH2PolyPainter::fCaps [private]

Definition at line 71 of file TGLH2PolyPainter.h.

Referenced by BuildTesselation(), CacheGeometry(), DrawCaps(), and UpdateGeometry().

Bool_t TGLH2PolyPainter::fZLog [private]

Definition at line 73 of file TGLH2PolyPainter.h.

Referenced by InitGeometry().

Double_t TGLH2PolyPainter::fZMin [private]

Definition at line 74 of file TGLH2PolyPainter.h.

Referenced by DrawExtrusion(), and InitGeometry().

std::vector<Int_t> TGLH2PolyPainter::fBinColors [private]

Definition at line 68 of file TGLH2PolyPainter.h.

std::vector<Double_t> TGLH2PolyPainter::fPolygon [mutable, private]

Definition at line 70 of file TGLH2PolyPainter.h.

std::list<Rgl::Pad::Tesselation_t> TGLH2PolyPainter::fCaps [private]

Definition at line 71 of file TGLH2PolyPainter.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:40:01 2011 for ROOT_528-00b_version by  doxygen 1.5.1