Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/util/state.cc @ 4338

Last change on this file since 4338 was 4338, checked in by bensch, 19 years ago

orxonox/trunk: merged branches/physics back to the trunk
merged with command
svn merge -r 3866:HEAD . ../../trunk/
many conflict that i tried to resolv
@patrick: i hope i did not interfere with your stuff :/

File size: 1.2 KB
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Benjamin Grauer
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
17
18#include "state.h"
19
20using namespace std;
21
22
23/**
24   \brief standard constructor
25*/
26State::State () 
27{
28   this->setClassName ("State");
29
30   this->camera = NULL;
31   this->cameraTarget = NULL;
32}
33
34/**
35   \brief the singleton reference to this class
36*/
37State* State::singletonRef = NULL;
38
39/**
40   \returns a Pointer to this Class
41*/
42State* State::getInstance(void)
43{
44  if (!State::singletonRef)
45    State::singletonRef = new State();
46  return State::singletonRef;
47}
48
49/**
50   \brief standard deconstructor
51
52*/
53State::~State () 
54{
55  State::singletonRef = NULL;
56
57}
58
59/**
60   \sets camera and target of the current Camera
61*/
62void State::setCamera(const PNode* camera, const PNode* cameraTarget)
63{
64  this->camera = camera;
65  this->cameraTarget = cameraTarget;
66}
Note: See TracBrowser for help on using the repository browser.