Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGLManipSet.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Matevz Tadel, Feb 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TGLManipSet
13 #define ROOT_TGLManipSet
14 
15 #include <TObject.h>
16 #include "TGLOverlay.h"
17 #include "TGLPShapeRef.h"
18 
19 class TGLManip;
20 
21 class TGLManipSet : public TGLOverlayElement,
22  public TGLPShapeRef
23 {
24 public:
25  enum EManip { kTrans, kScale, kRotate, kEndType };
26 
27 private:
28  TGLManipSet(const TGLManipSet&); // Not implemented
29  TGLManipSet& operator=(const TGLManipSet&); // Not implemented
30 
31 protected:
32  TGLManip *fManip[3]; //! manipulator store
33  EManip fType; //! current manipulator
34 
35  Bool_t fDrawBBox; //! also draw bounding-box around physical
36 
37 public:
38  TGLManipSet();
39  virtual ~TGLManipSet();
40 
41  virtual void SetPShape(TGLPhysicalShape* shape);
42 
43  virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
44  virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
45  Event_t* event);
46  virtual void MouseLeave();
47 
48  virtual void Render(TGLRnrCtx& rnrCtx);
49 
50  TGLManip* GetCurrentManip() const { return fManip[fType]; }
51 
52  Int_t GetManipType() const { return fType; }
53  void SetManipType(Int_t type);
54  Bool_t GetDrawBBox() const { return fDrawBBox; }
55  void SetDrawBBox(Bool_t bb) { fDrawBBox = bb; }
56 
57  ClassDef(TGLManipSet, 0); // A collection of available manipulators.
58 }; // endclass TGLManipSet
59 
60 
61 #endif