Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:40

0001 // @(#)root/eve:$Id$
0002 // Author: Matevz Tadel, 2010
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TEveBoxGL
0013 #define ROOT_TEveBoxGL
0014 
0015 #include "TGLObject.h"
0016 
0017 class TGLViewer;
0018 class TGLScene;
0019 
0020 class TEveBox;
0021 class TEveBoxProjected;
0022 
0023 //------------------------------------------------------------------------------
0024 // TEveBoxGL
0025 //------------------------------------------------------------------------------
0026 
0027 class TEveBoxGL : public TGLObject
0028 {
0029 private:
0030    TEveBoxGL(const TEveBoxGL&);            // Not implemented
0031    TEveBoxGL& operator=(const TEveBoxGL&); // Not implemented
0032 
0033 protected:
0034    TEveBox             *fM;  // Model object.
0035 
0036    void RenderOutline    (const Float_t p[8][3]) const;
0037    void RenderBoxStdNorm (const Float_t p[8][3]) const;
0038    void RenderBoxAutoNorm(const Float_t p[8][3]) const;
0039 
0040 public:
0041    TEveBoxGL();
0042    ~TEveBoxGL() override {}
0043 
0044    Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
0045    void   SetBBox() override;
0046 
0047    void Draw(TGLRnrCtx& rnrCtx) const override;
0048    void DirectDraw(TGLRnrCtx& rnrCtx) const override;
0049 
0050    Bool_t IgnoreSizeForOfInterest() const override { return kTRUE; }
0051 
0052    // To support two-level selection
0053    // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
0054    // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
0055 
0056    ClassDefOverride(TEveBoxGL, 0); // GL renderer class for TEveBox.
0057 };
0058 
0059 
0060 //------------------------------------------------------------------------------
0061 // TEveBoxProjectedGL
0062 //------------------------------------------------------------------------------
0063 
0064 class TEveBoxProjectedGL : public TGLObject
0065 {
0066 private:
0067    TEveBoxProjectedGL(const TEveBoxProjectedGL&);            // Not implemented
0068    TEveBoxProjectedGL& operator=(const TEveBoxProjectedGL&); // Not implemented
0069 
0070 protected:
0071    TEveBoxProjected             *fM;  // Model object.
0072 
0073    void RenderPoints(Int_t mode) const;
0074 
0075 public:
0076    TEveBoxProjectedGL();
0077    ~TEveBoxProjectedGL() override {}
0078 
0079    Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
0080    void   SetBBox() override;
0081 
0082    void Draw(TGLRnrCtx& rnrCtx) const override;
0083    void DirectDraw(TGLRnrCtx& rnrCtx) const override;
0084 
0085    Bool_t IgnoreSizeForOfInterest() const override { return kTRUE; }
0086 
0087    // To support two-level selection
0088    // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
0089    // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
0090 
0091    ClassDefOverride(TEveBoxProjectedGL, 0); // GL renderer class for TEveBoxProjected.
0092 };
0093 
0094 #endif