00001 // @(#)root/gl:$Id: TGLScaleManip.h 30815 2009-10-20 13:49:22Z rdm $ 00002 // Author: Richard Maunder 16/09/2005 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2005, 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_TGLScaleManip 00013 #define ROOT_TGLScaleManip 00014 00015 #ifndef ROOT_TGLManip 00016 #include "TGLManip.h" 00017 #endif 00018 00019 00020 ////////////////////////////////////////////////////////////////////////// 00021 // // 00022 // TGLScaleManip // 00023 // // 00024 // Scale manipulator - attaches to physical shape and draws local axes // 00025 // widgets with box heads. User can mouse over (turns yellow) and L // 00026 // click/drag to scale along this axis. // 00027 // Widgets use standard 3D package axes colours: X red, Y green, Z blue.// 00028 ////////////////////////////////////////////////////////////////////////// 00029 00030 class TGLScaleManip : public TGLManip 00031 { 00032 private: 00033 TGLVector3 fStartScale; //! initial scaling factors 00034 00035 void LimitScale(Double_t & factor) const; 00036 00037 public: 00038 TGLScaleManip(); 00039 TGLScaleManip(TGLPhysicalShape * shape); 00040 virtual ~TGLScaleManip(); 00041 00042 virtual void Draw(const TGLCamera & camera) const; 00043 virtual Bool_t HandleButton(const Event_t & event, const TGLCamera & camera); 00044 virtual Bool_t HandleMotion(const Event_t & event, const TGLCamera & camera); 00045 00046 ClassDef(TGLScaleManip,0) // GL scaling manipulator widget 00047 }; 00048 00049 #endif