Orxonox  0.0.5 Codename: Arcturus
OISForceFeedback.h
Go to the documentation of this file.
1 /*
2 The zlib/libpng License
3 
4 Copyright (c) 2005-2007 Phillip Castaneda (pjcast -- www.wreckedgames.com)
5 
6 This software is provided 'as-is', without any express or implied warranty. In no event will
7 the authors be held liable for any damages arising from the use of this software.
8 
9 Permission is granted to anyone to use this software for any purpose, including commercial
10 applications, and to alter it and redistribute it freely, subject to the following
11 restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not claim that
14  you wrote the original software. If you use this software in a product,
15  an acknowledgment in the product documentation would be appreciated but is
16  not required.
17 
18  2. Altered source versions must be plainly marked as such, and must not be
19  misrepresented as being the original software.
20 
21  3. This notice may not be removed or altered from any source distribution.
22 */
23 #ifndef OIS_ForceFeedBack_H
24 #define OIS_ForceFeedBack_H
25 
26 #include "OISPrereqs.h"
27 #include "OISInterface.h"
28 #include "OISEffect.h"
29 
30 namespace OIS
31 {
36  {
37  public:
38  ForceFeedback();
39  virtual ~ForceFeedback() {}
40 
51  virtual void setMasterGain( float level ) = 0;
52 
63  virtual void setAutoCenterMode( bool auto_on ) = 0;
64 
71  virtual void upload( const Effect* effect ) = 0;
72 
77  virtual void modify( const Effect* effect ) = 0;
78 
83  virtual void remove( const Effect* effect ) = 0;
84 
89  virtual short getFFAxesNumber() = 0;
90 
95  virtual unsigned short getFFMemoryLoad() = 0;
96 
97  typedef std::multimap<Effect::EForce, Effect::EType> SupportedEffectList;
102  const SupportedEffectList& getSupportedEffects() const;
103 
108  bool supportsEffect(Effect::EForce force, Effect::EType type) const;
109 
110  void _addEffectTypes( Effect::EForce force, Effect::EType type );
111  void _setGainSupport( bool on );
112  void _setAutoCenterSupport( bool on );
113 
114  protected:
115  SupportedEffectList mSupportedEffects;
118  };
119 }
120 #endif //OIS_ForceFeedBack_H
Interface class for dealing with Force Feedback devices.
Definition: OISForceFeedback.h:35
#define _OISExport
Definition: OISPrereqs.h:40
EType
Type of effect.
Definition: OISEffect.h:69
Force Feedback is a relatively complex set of properties to upload to a device.
Definition: OISEffect.h:47
An Object&#39;s interface is a way to gain write access to devices which support it.
Definition: OISInterface.h:34
virtual ~ForceFeedback()
Definition: OISForceFeedback.h:39
EForce
Type of force.
Definition: OISEffect.h:55
bool mSetGainSupport
Definition: OISForceFeedback.h:116
bool mSetAutoCenterSupport
Definition: OISForceFeedback.h:117
Definition: EventHelpers.h:31
std::multimap< Effect::EForce, Effect::EType > SupportedEffectList
Definition: OISForceFeedback.h:97
SupportedEffectList mSupportedEffects
Definition: OISForceFeedback.h:115