Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
28class TGLScaleManip : public TGLManip
29{
30private:
31 TGLVector3 fStartScale; //! initial scaling factors
32
33 void LimitScale(Double_t & factor) const;
34
35public:
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
double Double_t
Definition RtypesCore.h:59
#define ClassDef(name, id)
Definition Rtypes.h:325
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition TGLCamera.h:44
Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysi...
Definition TGLManip.h:29
Concrete physical shape - a GL drawable.
Scale manipulator - attaches to physical shape and draws local axes widgets with box heads.
virtual Bool_t HandleButton(const Event_t &event, const TGLCamera &camera)
Handle mouse button event over manipulator - returns kTRUE if redraw required kFALSE otherwise.
TGLVector3 fStartScale
void LimitScale(Double_t &factor) const
initial scaling factors
TGLScaleManip()
Construct scale manipulator not bound to any physical shape.
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...
virtual ~TGLScaleManip()
Destroy the scale manipulator.
3 component (x/y/z) vector class.
Definition TGLUtil.h:248
Event structure.
Definition GuiTypes.h:174
th1 Draw()