Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

inputaxis_basic.h

Go to the documentation of this file.
00001 /*
00002         $Id: inputaxis_basic.h,v 1.1 2001/03/06 15:09:10 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00016 
00017 #ifndef header_inputaxis_basic
00018 #define header_inputaxis_basic
00019 
00020 class CL_InputAxis_Basic : public CL_InputAxis
00021 //: CL_InputAxis interface used to ease manual implementation of an input axis.
00022 {
00023 protected:
00024         float pos;
00025         
00026 public:
00027         CL_InputAxis_Basic()
00028         {
00029                 pos = 0;
00030         }
00031         //: Constructs an axis standing in center position.
00032         
00033         CL_InputAxis_Basic(float pos)
00034         {
00035                 this->pos = pos;
00036         }
00037         //: Constructs an axis standing in position 'pos'.
00039         
00040         virtual ~CL_InputAxis_Basic() {;}
00041 
00042         virtual float get_pos()
00043         {
00044                 return pos;
00045         }
00046         //: Returns the current axis position.
00048         
00049         void set_pos(float pos)
00050         {
00051                 this->pos = pos;
00052         }
00053         //: Set the current axis position.
00055 };
00056 
00057 #endif

Generated at Wed Apr 4 19:54:00 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001