00001 // @(#)root/gl:$Id: TGLManipSet.h 26394 2008-11-23 14:35:25Z matevz $ 00002 // Author: Matevz Tadel, Feb 2007 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2004, 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_TGLManipSet 00013 #define ROOT_TGLManipSet 00014 00015 #include <TObject.h> 00016 #include "TGLOverlay.h" 00017 #include "TGLPShapeRef.h" 00018 00019 class TGLManip; 00020 00021 class TGLManipSet : public TGLOverlayElement, 00022 public TGLPShapeRef 00023 { 00024 public: 00025 enum EManip { kTrans, kScale, kRotate, kEndType }; 00026 00027 private: 00028 TGLManipSet(const TGLManipSet&); // Not implemented 00029 TGLManipSet& operator=(const TGLManipSet&); // Not implemented 00030 00031 protected: 00032 TGLManip *fManip[3]; //! manipulator store 00033 EManip fType; //! current manipulator 00034 00035 Bool_t fDrawBBox; //! also draw bounding-box around physical 00036 00037 public: 00038 TGLManipSet(); 00039 virtual ~TGLManipSet(); 00040 00041 virtual void SetPShape(TGLPhysicalShape* shape); 00042 00043 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec); 00044 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec, 00045 Event_t* event); 00046 virtual void MouseLeave(); 00047 00048 virtual void Render(TGLRnrCtx& rnrCtx); 00049 00050 TGLManip* GetCurrentManip() const { return fManip[fType]; } 00051 00052 Int_t GetManipType() const { return fType; } 00053 void SetManipType(Int_t type); 00054 Bool_t GetDrawBBox() const { return fDrawBBox; } 00055 void SetDrawBBox(Bool_t bb) { fDrawBBox = bb; } 00056 00057 ClassDef(TGLManipSet, 0); // A collection of available manipulators. 00058 }; // endclass TGLManipSet 00059 00060 00061 #endif