Last change
on this file since 4371 was
4338,
checked in by bensch, 20 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
|
Rev | Line | |
---|
[3655] | 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: |
---|
[4293] | 12 | main-programmer: Benjamin Grauer |
---|
[3655] | 13 | co-programmer: ... |
---|
| 14 | */ |
---|
| 15 | |
---|
| 16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY |
---|
| 17 | |
---|
[4293] | 18 | #include "state.h" |
---|
[3655] | 19 | |
---|
| 20 | using namespace std; |
---|
| 21 | |
---|
| 22 | |
---|
| 23 | /** |
---|
| 24 | \brief standard constructor |
---|
| 25 | */ |
---|
[4293] | 26 | State::State () |
---|
[3655] | 27 | { |
---|
[4293] | 28 | this->setClassName ("State"); |
---|
[3655] | 29 | |
---|
[4293] | 30 | this->camera = NULL; |
---|
| 31 | this->cameraTarget = NULL; |
---|
[3655] | 32 | } |
---|
| 33 | |
---|
| 34 | /** |
---|
| 35 | \brief the singleton reference to this class |
---|
| 36 | */ |
---|
[4293] | 37 | State* State::singletonRef = NULL; |
---|
[3655] | 38 | |
---|
| 39 | /** |
---|
| 40 | \returns a Pointer to this Class |
---|
| 41 | */ |
---|
[4293] | 42 | State* State::getInstance(void) |
---|
[3655] | 43 | { |
---|
[4293] | 44 | if (!State::singletonRef) |
---|
| 45 | State::singletonRef = new State(); |
---|
| 46 | return State::singletonRef; |
---|
[3655] | 47 | } |
---|
| 48 | |
---|
| 49 | /** |
---|
| 50 | \brief standard deconstructor |
---|
| 51 | |
---|
| 52 | */ |
---|
[4293] | 53 | State::~State () |
---|
[3655] | 54 | { |
---|
[4293] | 55 | State::singletonRef = NULL; |
---|
[3655] | 56 | |
---|
| 57 | } |
---|
[4293] | 58 | |
---|
| 59 | /** |
---|
| 60 | \sets camera and target of the current Camera |
---|
| 61 | */ |
---|
| 62 | void 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.