Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/lib/coord/null_parent.cc @ 4440

Last change on this file since 4440 was 4440, checked in by patrick, 19 years ago

orxonox/trunk: pnode enhancement and cleanup, very tight now

File size: 1.6 KB
Line 
1
2
3/*
4   orxonox - the future of 3D-vertical-scrollers
5
6   Copyright (C) 2004 orx
7
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of the GNU General Public License as published by
10   the Free Software Foundation; either version 2, or (at your option)
11   any later version.
12
13   ### File Specific:
14   main-programmer: Patrick Boenzli
15   co-programmer: ...
16*/
17
18#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_NULL_PARENT
19
20#include "null_parent.h"
21#include "stdincl.h"
22#include "vector.h"
23#include "list.h"
24
25
26using namespace std;
27
28NullParent* NullParent::singletonRef = 0;
29
30NullParent* NullParent::getInstance ()
31{
32  if(!singletonRef)
33    singletonRef = new NullParent ();
34  return singletonRef;
35}
36
37/**
38   \brief standard constructor
39
40   \todo this constructor is not jet implemented - do it
41*/
42NullParent::NullParent () : PNode (Vector(0,0,0), NULL)
43{
44  PRINTF(4)("NullParent::NullParent() - making new NullParent, there can only be one..\n");
45  this->setMode(PNODE_ALL);
46  this->setName("NullParent");
47}
48
49
50NullParent::NullParent (const Vector& absCoordinate) : PNode (Vector(0,0,0), NULL)
51{
52  singletonRef = this;
53  this->setMode(PNODE_ALL);
54  this->setName("NullParent");
55}
56
57
58/**
59   \brief standard deconstructor
60
61   \todo this deconstructor is not jet implemented - do it
62*/
63NullParent::~NullParent () 
64{
65  //delete singletonRef;
66  singletonRef = NULL;
67}
68
69/**
70   \brief updates the absCoordinate/absDirection
71
72   this is used to go through the parent-tree to update all the absolute coordinates
73   and directions. this update should be done by the engine, so you don't have to
74   worry, normaly...
75*/
Note: See TracBrowser for help on using the repository browser.