00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_INPUT_HH
00020 #define OST_INPUT_HH
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <ost/gfx/module_config.hh>
00031
00032 namespace ost { namespace gfx {
00033
00034 enum InputDevice {
00035 INPUT_DEVICE_DUMMY=0,
00036 INPUT_DEVICE_MOUSE
00037 };
00038
00039 enum InputCommand {
00040 INPUT_COMMAND_NONE=0,
00041 INPUT_COMMAND_ROTX,
00042 INPUT_COMMAND_ROTY,
00043 INPUT_COMMAND_ROTZ,
00044 INPUT_COMMAND_TRANSX,
00045 INPUT_COMMAND_TRANSY,
00046 INPUT_COMMAND_TRANSZ,
00047 INPUT_COMMAND_SLABN,
00048 INPUT_COMMAND_SLABF,
00049 INPUT_COMMAND_AUTOSLAB,
00050 INPUT_COMMAND_TOGGLE_FOG,
00051 INPUT_COMMAND_CUSTOM1,
00052 INPUT_COMMAND_CUSTOM2,
00053 INPUT_COMMAND_CUSTOM3,
00054 INPUT_COMMAND_REBUILD
00055 };
00056
00057 enum TransformTarget {
00058 TRANSFORM_VIEW=0,
00059 TRANSFORM_RIGID,
00060 TRANSFORM_TORSION,
00061 TRANSFORM_ANGLE,
00062 TRANSFORM_ROTAMER
00063 };
00064
00065 class DLLEXPORT_OST_GFX InputEvent {
00066 public:
00067 InputEvent(InputDevice dev, InputCommand com, float delta):
00068 dev_(dev), com_(com), index_(0), target_(0), delta_(delta)
00069 {}
00070
00071 InputEvent(InputDevice dev, InputCommand com, int index,
00072 int target, float delta):
00073 dev_(dev), com_(com), index_(index), target_(target), delta_(delta)
00074 {}
00075
00076 InputDevice GetDevice() const {return dev_;}
00077 InputCommand GetCommand() const {return com_;}
00078 int GetIndex() const {return index_;}
00079 int GetTarget() const {return target_;}
00080 float GetDelta() const {return delta_;}
00081 private:
00082 InputDevice dev_;
00083 InputCommand com_;
00084 int index_;
00085 int target_;
00086 float delta_;
00087 };
00088
00089 }}
00090
00091 #endif