1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGMANIPULATORMANAGER_H_
40 #define _OSGMANIPULATORMANAGER_H_
42 #include "OSGConfig.h"
43 #include "OSGBaseTypes.h"
44 #include "OSGNodeFields.h"
46 #include "OSGManipulator.h"
47 #include "OSGMoveManipulator.h"
48 #include "OSGRotateManipulator.h"
49 #include "OSGScaleManipulator.h"
50 #include "OSGPlaneMoveManipulator.h"
54 class OSG_CONTRIBGUI_DLLMAPPING ManipulatorManager
57 enum ManipulatorType
{ ROTATE
, SCALE
, TRANSLATE
, PLANE
};
60 ~ManipulatorManager();
62 Node
* createManipulator (const ManipulatorType type
);
63 void changeManipulator (const ManipulatorType type
);
64 void changeEnablePivot ( bool enablePivot
);
65 ManipulatorType
getCurrentType ( ) const;
66 bool getCurrentEnablePivot( ) const;
67 const Pnt3f
& getCurrentPivot ( ) const;
68 bool activate ( Node
*n
);
70 void setTarget ( Node
* const value
);
71 void setViewport ( Viewport
* const value
);
72 bool isActive ( void );
74 void mouseMove (const Int16 x
,
76 void mouseButtonPress (const UInt16 button
,
79 void mouseButtonRelease (const UInt16 button
,
85 ManipulatorType _currentType
;
86 bool _currentEnablePivot
;
89 ViewportRefPtr _viewport
;
90 bool _pivotChangePending
;
95 #endif // _OSGMANIPULATORMANAGER_H_