PageRenderTime 13ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/src/ois/src/win32/extras/WiiMote/OISWiiMoteForceFeedback.h

https://bitbucket.org/cabalistic/ogredeps/
C++ Header | 67 lines | 27 code | 10 blank | 30 comment | 0 complexity | 5bd411f3fe78f56418849139c509a627 MD5 | raw file
 1#include "OISConfig.h"
 2#ifdef OIS_WIN32_WIIMOTE_SUPPORT
 3/*
 4The zlib/libpng License
 5
 6Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
 7
 8This software is provided 'as-is', without any express or implied warranty. In no event will
 9the authors be held liable for any damages arising from the use of this software.
10
11Permission is granted to anyone to use this software for any purpose, including commercial 
12applications, and to alter it and redistribute it freely, subject to the following
13restrictions:
14
15    1. The origin of this software must not be misrepresented; you must not claim that 
16		you wrote the original software. If you use this software in a product, 
17		an acknowledgment in the product documentation would be appreciated but is 
18		not required.
19
20    2. Altered source versions must be plainly marked as such, and must not be 
21		misrepresented as being the original software.
22
23    3. This notice may not be removed or altered from any source distribution.
24*/
25#ifndef OIS_WiiMoteForceFeedBack_H
26#define OIS_WiiMoteForceFeedBack_H
27
28#include "OISPrereqs.h"
29#include "OISForceFeedback.h"
30#include "wiimote.h"
31
32namespace OIS
33{
34	class WiiMoteForceFeedback : public ForceFeedback
35	{
36	public:
37		WiiMoteForceFeedback(cWiiMote &wiiMote);
38		~WiiMoteForceFeedback();
39
40		/** @copydoc ForceFeedback::upload */
41		void upload( const Effect* effect );
42
43		/** @copydoc ForceFeedback::modify */
44		void modify( const Effect* effect );
45
46		/** @copydoc ForceFeedback::remove */
47		void remove( const Effect* effect );
48
49		/** @copydoc ForceFeedback::setMasterGain */
50		void setMasterGain( float level ) {}
51		
52		/** @copydoc ForceFeedback::setAutoCenterMode */
53		void setAutoCenterMode( bool auto_on ) {}
54
55		/** @copydoc ForceFeedback::getFFAxesNumber */
56		short getFFAxesNumber() { return 1; }
57
58	protected:
59		//! The WiiMote associated with this effect interface
60		cWiiMote &mWiiMote;
61
62		//! The handle of the one and only allowed effect
63		int mHandle;
64	};
65}
66#endif //OIS_WiiMoteForceFeedBack_H
67#endif