Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4293 in orxonox.OLD for orxonox/branches/physics/src/util/state.h


Ignore:
Timestamp:
May 26, 2005, 10:34:14 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: intoducing state: stors the Camera position globally somewhere we have to store this data

File:
1 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/util/state.h

    r4289 r4293  
    11/*!
    22    \file proto_singleton.h
    3     \brief Definition of the ... singleton Class
     3    \brief Definition of the States-singleton Class
    44   
    55*/
    66
    7 #ifndef _PROTO_SINGLETON_H
    8 #define _PROTO_SINGLETON_H
     7#ifndef _STATE_H
     8#define _STATE_H
    99
    1010#include "base_object.h"
    1111
    1212// FORWARD DEFINITION
     13class PNode;
    1314
    14 //! A default singleton class.
    15 class ProtoSingleton : public BaseObject {
     15//! A Singleton class, that handles some states about orxonox's objects
     16class State : public BaseObject {
    1617
    1718 public:
    18   static ProtoSingleton* getInstance(void);
    19   virtual ~ProtoSingleton(void);
     19  static State* getInstance(void);
     20  virtual ~State(void);
     21
     22  void setCamera(const PNode* camera, const PNode* cameraTarget);
     23  const PNode* getCamera(void) const { return this->camera; };
     24  const PNode* getCameraTarget(void) const { return this->cameraTarget; };
    2025
    2126 private:
    22   ProtoSingleton(void);
    23   static ProtoSingleton* singletonRef;
     27  State(void);
     28  static State* singletonRef;
     29
     30  const PNode* camera;
     31  const PNode* cameraTarget;
    2432};
    2533
    26 #endif /* _PROTO_SINGLETON_H */
     34#endif /* _STATE_H */
Note: See TracChangeset for help on using the changeset viewer.