Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5040 in orxonox.OLD for orxonox/trunk/src/util


Ignore:
Timestamp:
Aug 16, 2005, 7:24:18 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: inventing a new Way to get all the different kinds of User-Interface-Control below one hat.
This should be the ground-stone for all the different Camera-Modi as proposed in ticket:60 and ticket:61.
Maybe, there will be a better idea soon. In this case i would not implement, what i am doing here. :/

Location:
orxonox/trunk/src/util
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/user_control.cc

    r5038 r5040  
    1010
    1111   ### File Specific:
    12    main-programmer: ...
     12   main-programmer: Benjamin Grauer
    1313   co-programmer: ...
    1414*/
     
    1616//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
    1717
    18 #include "proto_class.h"
     18#include "user_control.h"
    1919
    2020using namespace std;
    21 
    2221
    2322/**
     
    2524 * @todo this constructor is not jet implemented - do it
    2625*/
    27 ProtoClass::ProtoClass ()
     26UserControl::UserControl ()
    2827{
    29    this->setClassID(CL_PROTO_ID, "ProtoClass");
     28   this->setClassID(CL_USER_CONTROL, "UserControl");
    3029
    3130   /* If you make a new class, what is most probably the case when you write this file
     
    4544 * standard deconstructor
    4645*/
    47 ProtoClass::~ProtoClass ()
     46UserControl::~UserControl ()
    4847{
    4948  // delete what has to be deleted here
  • orxonox/trunk/src/util/user_control.h

    r5038 r5040  
    11/*!
    2  * @file proto_class.h
    3  * @brief Definition of ...
     2 * @file user_control.h
     3 * @brief Control of the stearing device by the User
    44*/
    55
    6 #ifndef _PROTO_CLASS_H
    7 #define _PROTO_CLASS_H
     6#ifndef _USER_CONTROL_H
     7#define _USER_CONTROL_H
    88
    99#include "base_object.h"
    1010
     11typedef enum ControlType
     12{
     13  CONTROL_AIM_MOVE_ON_SCREEN,
     14  CONTROL_AIM_STAYS_CENTERED,
     15  CONTROL_AIM_SMOOTHES_CAMERA,
     16  CONTROL_AIM_MOVES_SCREEN_ON_EDGE,
     17};
     18
    1119// FORWARD DECLARATION
     20class PNode;
    1221
    1322
    14 
    15 //! A class for ...
    16 class ProtoClass : public BaseObject {
     23//! A Class the main input device uses for stearing the Ship/human/whatsoever through the level
     24class UserControl : public BaseObject {
    1725
    1826 public:
    19   ProtoClass();
    20   virtual ~ProtoClass();
     27  UserControl();
     28  virtual ~UserControl();
    2129
     30  void setAffectedObjects(PNode* camera, PNode* target);
     31  void setFollowObject(PNode* follower);
     32
     33  void setControlType(ControlType controlType);
    2234
    2335 private:
     36   ControlType            controlType;
     37   float                  speed;
     38   float                  suspense;
     39
     40   PNode*                 camera;
     41   PNode*                 target;
     42   PNode*                 follower;
    2443
    2544};
    2645
    27 #endif /* _PROTO_CLASS_H */
     46#endif /* _USER_CONTROL_H */
Note: See TracChangeset for help on using the changeset viewer.