OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Translate2DDragger.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 //osgManipulator - Copyright (C) 2007 Fugro-Jason B.V.
14 
15 #ifndef OSGMANIPULATOR_TRANSLATE2DDRAGGER
16 #define OSGMANIPULATOR_TRANSLATE2DDRAGGER 1
17 
18 #include <osgManipulator/Dragger>
19 #include <osgManipulator/Projector>
20 
21 #include <osg/PolygonOffset>
22 
23 namespace osgManipulator {
24 
29 {
30  public:
31 
33 
34  Translate2DDragger(const osg::Plane& plane);
35 
37 
38 
39  virtual bool handle(const PointerInfo& pi, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& us);
40 
42  void setupDefaultGeometry();
43 
45  inline void setColor(const osg::Vec4& color) { _color = color; setMaterialColor(_color,*this); }
46  inline const osg::Vec4& getColor() const { return _color; }
47 
50  inline void setPickColor(const osg::Vec4& color) { _pickColor = color; }
51  inline const osg::Vec4& getPickColor() const { return _pickColor; }
52 
53  protected:
54 
55  virtual ~Translate2DDragger();
56 
59 
63 };
64 
65 
66 }
67 
68 #endif
#define OSGMANIPULATOR_EXPORT
Definition: Export.h:27
osg::ref_ptr< PlaneProjector > _projector
#define META_OSGMANIPULATOR_Object(library, name)
Definition: Export.h:30
Vec4f Vec4
Definition: Vec4.h:21
void OSGMANIPULATOR_EXPORT setMaterialColor(const osg::Vec4 &color, osg::Node &node)
osg::ref_ptr< osg::PolygonOffset > _polygonOffset
const osg::Vec4 & getPickColor() const
A plane class. It can be used to represent an infinite plane.
Definition: Plane.h:33
Definition: AlphaFunc.h:19
void setPickColor(const osg::Vec4 &color)
const osg::Vec4 & getColor() const