Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TEvePolygonSetProjectedGL.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEvePolygonSetProjectedGL
13 #define ROOT_TEvePolygonSetProjectedGL
14 
15 #include "TGLObject.h"
16 
17 class TEvePolygonSetProjected;
18 
19 class TEvePolygonSetProjectedGL : public TGLObject
20 {
21 protected:
22  struct Edge_t
23  {
24  Int_t fI, fJ;
25  Edge_t(Int_t i, Int_t j)
26  {
27  if (i <= j) { fI = i; fJ = j; }
28  else { fI = j; fJ = i; }
29  }
30 
31  bool operator<(const Edge_t& e) const
32  {
33  if (fI == e.fI)
34  return fJ < e.fJ;
35  else
36  return fI < e.fI;
37  }
38  };
39 
40  TEvePolygonSetProjected *fM;
41 
42 public:
43  TEvePolygonSetProjectedGL();
44  virtual ~TEvePolygonSetProjectedGL() {}
45 
46  virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
47  virtual void SetBBox();
48  virtual void Draw(TGLRnrCtx& rnrCtx) const;
49  virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
50 
51  virtual void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* pshp, Int_t lvl=-1) const;
52 
53  virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
54 
55 private:
56  void DrawOutline() const;
57 
58  ClassDef(TEvePolygonSetProjectedGL,0); // GL-renderer for TEvePolygonSetProjected class.
59 };
60 
61 #endif