Logo ROOT   6.14/05
Reference Guide
TGLScaleManip.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Richard Maunder 16/09/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, 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_TGLScaleManip
13 #define ROOT_TGLScaleManip
14 
15 #include "TGLManip.h"
16 
17 
18 //////////////////////////////////////////////////////////////////////////
19 // //
20 // TGLScaleManip //
21 // //
22 // Scale manipulator - attaches to physical shape and draws local axes //
23 // widgets with box heads. User can mouse over (turns yellow) and L //
24 // click/drag to scale along this axis. //
25 // Widgets use standard 3D package axes colours: X red, Y green, Z blue.//
26 //////////////////////////////////////////////////////////////////////////
27 
28 class TGLScaleManip : public TGLManip
29 {
30 private:
31  TGLVector3 fStartScale; //! initial scaling factors
32 
33  void LimitScale(Double_t & factor) const;
34 
35 public:
36  TGLScaleManip();
38  virtual ~TGLScaleManip();
39 
40  virtual void Draw(const TGLCamera & camera) const;
41  virtual Bool_t HandleButton(const Event_t & event, const TGLCamera & camera);
42  virtual Bool_t HandleMotion(const Event_t & event, const TGLCamera & camera);
43 
44  ClassDef(TGLScaleManip,0) // GL scaling manipulator widget
45 };
46 
47 #endif
Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysi...
Definition: TGLManip.h:28
virtual Bool_t HandleButton(const Event_t &event, const TGLCamera &camera)
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise...
TGLScaleManip()
Construct scale manipulator not bound to any physical shape.
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition: TGLCamera.h:43
virtual Bool_t HandleMotion(const Event_t &event, const TGLCamera &camera)
Handle mouse motion over manipulator - if active (selected widget) scale physical along selected widg...
bool Bool_t
Definition: RtypesCore.h:59
virtual void Draw(const TGLCamera &camera) const
Draw scale manipulator - tubes with box heads, in local axes of attached shape, in red(X)...
Scale manipulator - attaches to physical shape and draws local axes widgets with box heads...
Definition: TGLScaleManip.h:28
Concrete physical shape - a GL drawable.
TGLVector3 fStartScale
Definition: TGLScaleManip.h:31
#define ClassDef(name, id)
Definition: Rtypes.h:320
3 component (x/y/z) vector class.
Definition: TGLUtil.h:246
void LimitScale(Double_t &factor) const
initial scaling factors
double Double_t
Definition: RtypesCore.h:55
virtual ~TGLScaleManip()
Destroy the scale manipulator.