TEveBoxGL.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveBoxGL.h 36867 2010-11-23 10:06:35Z matevz $
00002 // Author: Matevz Tadel, 2010
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_TEveBoxGL
00013 #define ROOT_TEveBoxGL
00014 
00015 #include "TGLObject.h"
00016 
00017 class TGLViewer;
00018 class TGLScene;
00019 
00020 class TEveBox;
00021 class TEveBoxProjected;
00022 
00023 //------------------------------------------------------------------------------
00024 // TEveBoxGL
00025 //------------------------------------------------------------------------------
00026 
00027 class TEveBoxGL : public TGLObject
00028 {
00029 private:
00030    TEveBoxGL(const TEveBoxGL&);            // Not implemented
00031    TEveBoxGL& operator=(const TEveBoxGL&); // Not implemented
00032 
00033 protected:
00034    TEveBox             *fM;  // Model object.
00035 
00036    void RenderOutline    (const Float_t p[8][3]) const;
00037    void RenderBoxStdNorm (const Float_t p[8][3]) const;
00038    void RenderBoxAutoNorm(const Float_t p[8][3]) const;
00039 
00040 public:
00041    TEveBoxGL();
00042    virtual ~TEveBoxGL() {}
00043 
00044    virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
00045    virtual void   SetBBox();
00046 
00047    virtual void Draw(TGLRnrCtx& rnrCtx) const;
00048    virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
00049 
00050    virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
00051 
00052    // To support two-level selection
00053    // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
00054    // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
00055 
00056    ClassDef(TEveBoxGL, 0); // GL renderer class for TEveBox.
00057 };
00058 
00059 
00060 //------------------------------------------------------------------------------
00061 // TEveBoxProjectedGL
00062 //------------------------------------------------------------------------------
00063 
00064 class TEveBoxProjectedGL : public TGLObject
00065 {
00066 private:
00067    TEveBoxProjectedGL(const TEveBoxProjectedGL&);            // Not implemented
00068    TEveBoxProjectedGL& operator=(const TEveBoxProjectedGL&); // Not implemented
00069 
00070 protected:
00071    TEveBoxProjected             *fM;  // Model object.
00072 
00073    void RenderPoints(Int_t mode) const;
00074 
00075 public:
00076    TEveBoxProjectedGL();
00077    virtual ~TEveBoxProjectedGL() {}
00078 
00079    virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
00080    virtual void   SetBBox();
00081 
00082    virtual void Draw(TGLRnrCtx& rnrCtx) const;
00083    virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
00084 
00085    virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
00086 
00087    // To support two-level selection
00088    // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
00089    // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
00090 
00091    ClassDef(TEveBoxProjectedGL, 0); // GL renderer class for TEveBoxProjected.
00092 };
00093 
00094 #endif

Generated on Tue Jul 5 14:14:47 2011 for ROOT_528-00b_version by  doxygen 1.5.1