root/OpenSceneGraph/trunk/include/osgManipulator/TrackballDragger @ 13855

Revision 13855, 2.3 kB (checked in by robert, 51 minutes ago)

Updated AUTHORS

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
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_TRACKBALLDRAGGER
16#define OSGMANIPULATOR_TRACKBALLDRAGGER 1
17
18#include <osgManipulator/RotateCylinderDragger>
19#include <osgManipulator/RotateSphereDragger>
20#include <osg/ShapeDrawable>
21#include <osg/Geometry>
22#include <osg/LineWidth>
23
24namespace osgManipulator {
25
26/**
27 * Dragger for performing rotation in all axes.
28 */
29class OSGMANIPULATOR_EXPORT TrackballDragger : public CompositeDragger
30{
31    public:
32
33        TrackballDragger(bool useAutoTransform=false);
34
35        META_OSGMANIPULATOR_Object(osgManipulator,TrackballDragger)
36
37        /** Setup default geometry for dragger. */
38        void setupDefaultGeometry();
39
40        /** Sets the width of the axis lines in pixels. */
41        void setAxisLineWidth(float linePixelWidth);
42
43        /** Retrieves the width of the axis lines in pixels. */
44        float getAxisLineWidth() const { return _axisLineWidth; }
45
46        /** Sets the height of the cylinders representing the axis lines for picking. */
47        void setPickCylinderHeight(float pickCylinderHeight);
48
49        /** Retrieves the height of the cylinders representing the axis lines for picking. */
50        float getPickCylinderHeight() const { return _pickCylinderHeight; }
51
52    protected:
53
54        virtual ~TrackballDragger();
55
56        osg::ref_ptr<RotateCylinderDragger> _xDragger;
57        osg::ref_ptr<RotateCylinderDragger> _yDragger;
58        osg::ref_ptr<RotateCylinderDragger> _zDragger;
59        osg::ref_ptr<RotateSphereDragger>   _xyzDragger;
60
61        float _axisLineWidth;
62        float _pickCylinderHeight;
63
64        osg::ref_ptr<osg::Geode> _geode;
65        osg::ref_ptr<osg::Cylinder> _cylinder;
66        osg::ref_ptr<osg::LineWidth> _lineWidth;
67};
68
69
70}
71
72#endif
Note: See TracBrowser for help on using the browser.