00001 // @(#)root/eve:$Id: TEvePolygonSetProjectedGL.h 36853 2010-11-22 19:48:34Z matevz $ 00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 #ifndef ROOT_TEvePolygonSetProjectedGL 00013 #define ROOT_TEvePolygonSetProjectedGL 00014 00015 #include "TGLObject.h" 00016 00017 class TEvePolygonSetProjected; 00018 00019 class TEvePolygonSetProjectedGL : public TGLObject 00020 { 00021 protected: 00022 struct Edge_t 00023 { 00024 Int_t fI, fJ; 00025 Edge_t(Int_t i, Int_t j) 00026 { 00027 if (i <= j) { fI = i; fJ = j; } 00028 else { fI = j; fJ = i; } 00029 } 00030 00031 bool operator<(const Edge_t& e) const 00032 { 00033 if (fI == e.fI) 00034 return fJ < e.fJ; 00035 else 00036 return fI < e.fI; 00037 } 00038 }; 00039 00040 TEvePolygonSetProjected *fM; 00041 00042 public: 00043 TEvePolygonSetProjectedGL(); 00044 virtual ~TEvePolygonSetProjectedGL() {} 00045 00046 virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0); 00047 virtual void SetBBox(); 00048 virtual void Draw(TGLRnrCtx& rnrCtx) const; 00049 virtual void DirectDraw(TGLRnrCtx& rnrCtx) const; 00050 00051 virtual void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* pshp, Int_t lvl=-1) const; 00052 00053 virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; } 00054 00055 private: 00056 void DrawOutline() const; 00057 00058 ClassDef(TEvePolygonSetProjectedGL,0); // GL-renderer for TEvePolygonSetProjected class. 00059 }; 00060 00061 #endif