[32] | 1 | #pragma once |
---|
[221] | 2 | /* -*-c++-*- osgVisual - Copyright (C) 2009-2011 Torben Dannhauer |
---|
[32] | 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 | |
---|
| 19 | namespace 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 | */ |
---|
| 28 | class SpaceMouse |
---|
| 29 | { |
---|
| 30 | public: |
---|
| 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 | |
---|
| 77 | private: |
---|
| 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 |
---|