source: osgVisual/include/manip_Spacemouse/manip_spaceMouse.h @ 32

Last change on this file since 32 was 32, checked in by Torben Dannhauer, 14 years ago

Adding first version of osgVisual!!

File size: 2.4 KB
Line 
1#pragma once
2/* -*-c++-*- osgVisual - Copyright (C) 2009-2010 Torben Dannhauer
3 *
4 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
6 * (at your option) any later version.  The full license is in LICENSE file
7 * included with this distribution, and on the openscenegraph.org website.
8 *
9 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
10 * You have to aquire licenses for all used proprietary modules.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * OpenSceneGraph Public License for more details.
16*/
17
18
19namespace osgVisual
20{ 
21
22/**
23 * \brief This class interfaces osg to the device driver of 3Dconnexions Space Navigator
24 *
25 * @author Marius Heise
26 * @date  Apr 2009
27 */ 
28class SpaceMouse
29{
30public:
31        /**
32         * \brief Constructor
33         *
34         */ 
35    SpaceMouse();
36
37        /**
38         * \brief Destructor
39         *
40         * @return
41         */ 
42    virtual ~SpaceMouse();
43
44        /**
45         * \brief This function initializes the device driver.
46         *
47         * @return : 1=sucess, 0=failure.
48         */ 
49    int initialize();
50
51        /**
52         * \brief This function shuts the device driver down.
53         *
54         */ 
55    void shutdown();
56
57        /**
58         * \brief This function writes the detected translation of all three axes to the specified variables.
59         *
60         * @param dX : delta translation along X axis.
61         * @param dY : delta translation along Y axis.
62         * @param dZ : delta translation along Y axis.
63         * @return : 1=sucess, 0=failure.
64         */ 
65    int getTranslations(double& dX, double& dY, double& dZ);
66
67        /**
68         * \brief This function writes the detected rotation of all three axes to the specified variables.
69         *
70         * @param dX : delta translation along X axis.
71         * @param dY : delta translation along Y axis.
72         * @param dZ : delta translation along Y axis.
73         * @return : 1=sucess, 0=failure.
74         */ 
75    int getRotations(double& dX, double& dY, double& dZ);
76
77private:
78        /**
79         * \brief Device driver class
80         *
81         * @author Unknown/Marius Heise
82         * @date  Apr 2009
83         */ 
84        class SpaceMouseImpl;
85
86        /**
87         * Pointer to the device driver class.
88         */ 
89    SpaceMouseImpl* _spaceMouseImpl;
90};
91
92}       // END NAMESPACE
Note: See TracBrowser for help on using the repository browser.