00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00016
00017 #ifndef header_inputaxis_group
00018 #define header_inputaxis_group
00019
00020 #include "../Input/inputaxis.h"
00021
00022 class CL_InputAxis_Group : public CL_InputAxis
00023
00024 {
00025 std::list<CL_InputAxis*> axes;
00026 public:
00027 void add(CL_InputAxis *add_axis)
00028 {
00029 axes.push_back(add_axis);
00030 }
00031
00033
00034 void remove(CL_InputAxis *remove_axis)
00035 {
00036 axes.remove(remove_axis);
00037 }
00038
00040
00041 virtual float get_pos()
00042 {
00043 float pos = 0;
00044
00045 for (
00046 std::list<CL_InputAxis *>::iterator it = axes.begin();
00047 it != axes.end();
00048 it++)
00049 {
00050 pos += (*it)->get_pos();
00051 }
00052
00053 if (pos > 1) pos = 1;
00054 if (pos < -1) pos = -1;
00055
00056 return pos;
00057 }
00058
00059
00061
00062
00063 #endif