Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGLManipSet.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gl:$Id$
0002 // Author:  Matevz Tadel, Feb 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2004, 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_TGLManipSet
0013 #define ROOT_TGLManipSet
0014 
0015 #include "TGLOverlay.h"
0016 #include "TGLPShapeRef.h"
0017 
0018 class TGLManip;
0019 
0020 class TGLManipSet : public TGLOverlayElement,
0021                     public TGLPShapeRef
0022 {
0023 public:
0024    enum EManip { kTrans, kScale, kRotate, kEndType };
0025 
0026 private:
0027    TGLManipSet(const TGLManipSet&) = delete;
0028    TGLManipSet& operator=(const TGLManipSet&) = delete;
0029 
0030 protected:
0031    TGLManip  *fManip[3]; //! manipulator store
0032    EManip     fType;     //! current manipulator
0033 
0034    Bool_t     fDrawBBox; //! also draw bounding-box around physical
0035 
0036 public:
0037    TGLManipSet();
0038    ~TGLManipSet() override;
0039 
0040    void SetPShape(TGLPhysicalShape* shape) override;
0041 
0042    Bool_t MouseEnter(TGLOvlSelectRecord& selRec) override;
0043    Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
0044                          Event_t* event) override;
0045    void   MouseLeave() override;
0046 
0047    void Render(TGLRnrCtx& rnrCtx) override;
0048 
0049    TGLManip* GetCurrentManip() const { return fManip[fType]; }
0050 
0051    Int_t  GetManipType()   const { return fType; }
0052    void   SetManipType(Int_t type);
0053    Bool_t GetDrawBBox()    const { return fDrawBBox; }
0054    void   SetDrawBBox(Bool_t bb) { fDrawBBox = bb; }
0055 
0056    ClassDefOverride(TGLManipSet, 0); // A collection of available manipulators.
0057 }; // endclass TGLManipSet
0058 
0059 
0060 #endif