PixelLightAPI  .
SensorManager.h
Go to the documentation of this file.
00001 /*********************************************************\
00002  *  File: SensorManager.h                                *
00003  *
00004  *  Copyright (C) 2002-2011 The PixelLight Team (http://www.pixellight.org/)
00005  *
00006  *  This file is part of PixelLight.
00007  *
00008  *  PixelLight is free software: you can redistribute it and/or modify
00009  *  it under the terms of the GNU Lesser General Public License as published by
00010  *  the Free Software Foundation, either version 3 of the License, or
00011  *  (at your option) any later version.
00012  *
00013  *  PixelLight is distributed in the hope that it will be useful,
00014  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00016  *  GNU Lesser General Public License for more details.
00017  *
00018  *  You should have received a copy of the GNU Lesser General Public License
00019  *  along with PixelLight. If not, see <http://www.gnu.org/licenses/>.
00020 \*********************************************************/
00021 
00022 
00023 #ifndef __PLINPUT_SENSORMANAGER_H__
00024 #define __PLINPUT_SENSORMANAGER_H__
00025 #pragma once
00026 
00027 
00028 //[-------------------------------------------------------]
00029 //[ Includes                                              ]
00030 //[-------------------------------------------------------]
00031 #include "PLInput/Input/Devices/Device.h"
00032 #include "PLInput/Input/Controls/Axis.h"
00033 #include "PLInput/Input/Controls/Button.h"
00034 
00035 
00036 //[-------------------------------------------------------]
00037 //[ Namespace                                             ]
00038 //[-------------------------------------------------------]
00039 namespace PLInput {
00040 
00041 
00042 //[-------------------------------------------------------]
00043 //[ Classes                                               ]
00044 //[-------------------------------------------------------]
00045 /**
00046 *  @brief
00047 *    Sensor manager input device
00048 *
00049 *  @remarks
00050 *    The sensor manager is a collection of sensors usually available on a mobile device:
00051 *    - Accelerometer
00052 *    - Magnetic field
00053 *    - Gyroscope
00054 *    - Light
00055 *    - Proximity
00056 *
00057 *    This class supports the following device backend types:
00058 *    - UpdateDevice
00059 */
00060 class SensorManager : public Device {
00061 
00062 
00063     //[-------------------------------------------------------]
00064     //[ Class definition                                      ]
00065     //[-------------------------------------------------------]
00066     pl_class(PLINPUT_RTTI_EXPORT, SensorManager, "PLInput", PLInput::Device, "Sensor manager input controller")
00067     pl_class_end
00068 
00069 
00070     //[-------------------------------------------------------]
00071     //[ Controller definition                                 ]
00072     //[-------------------------------------------------------]
00073     public:
00074         // Accelerometer
00075         PLInput::Axis   AccelerationX;  /**< X acceleration axis (Accelerometer) */
00076         PLInput::Axis   AccelerationY;  /**< Y acceleration axis (Accelerometer) */
00077         PLInput::Axis   AccelerationZ;  /**< Z acceleration axis (Accelerometer) */
00078         // Magnetic field
00079         PLInput::Axis   MagneticX;      /**< X magnetic axis (Magnetic field) */
00080         PLInput::Axis   MagneticY;      /**< Y magnetic axis (Magnetic field) */
00081         PLInput::Axis   MagneticZ;      /**< Z magnetic axis (Magnetic field) */
00082         // Gyroscope
00083         PLInput::Axis   RotationX;      /**< X rotation axis (Gyroscope) */
00084         PLInput::Axis   RotationY;      /**< Y rotation axis (Gyroscope) */
00085         PLInput::Axis   RotationZ;      /**< Z rotation axis (Gyroscope) */
00086         // Light
00087         PLInput::Axis   Light;          /**< Light */
00088         // Proximity
00089         PLInput::Axis   Proximity;      /**< Proximity */
00090 
00091 
00092     //[-------------------------------------------------------]
00093     //[ Public functions                                      ]
00094     //[-------------------------------------------------------]
00095     public:
00096         /**
00097         *  @brief
00098         *    Constructor
00099         *
00100         *  @param[in] sName
00101         *    Device name
00102         *  @param[in] pImpl
00103         *    System specific device implementation, can, but shouldn't be a null pointer
00104         */
00105         PLINPUT_API SensorManager(const PLCore::String &sName, DeviceImpl *pImpl);
00106 
00107         /**
00108         *  @brief
00109         *    Destructor
00110         */
00111         PLINPUT_API virtual ~SensorManager();
00112 
00113 
00114     //[-------------------------------------------------------]
00115     //[ Public virtual Controller functions                   ]
00116     //[-------------------------------------------------------]
00117     public:
00118         PLINPUT_API virtual void Update() override;
00119 
00120 
00121 };
00122 
00123 
00124 //[-------------------------------------------------------]
00125 //[ Namespace                                             ]
00126 //[-------------------------------------------------------]
00127 } // PLInput
00128 
00129 
00130 #endif // __PLINPUT_SENSORMANAGER_H__


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:01
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported