Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/camera/src/world_entities/test_entity.cc @ 10259

Last change on this file since 10259 was 10259, checked in by gfilip, 17 years ago

the skybox problem

File size: 2.3 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:
13   co-programmer:
14*/
15#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
16
17
18#include "executor/executor.h"
19#include "util/loading/factory.h"
20#include "util/loading/load_param.h"
21
22
23#include "test_entity.h"
24#include "debug.h"
25#include <iostream.h>
26#include "state.h"
27#include "shell_command.h"
28#include "game_world_data.h"
29
30#include "class_id_DEPRECATED.h"
31ObjectListDefinition(TestEntity);
32CREATE_FACTORY(TestEntity);
33
34
35
36/**
37 *
38 */
39TestEntity::TestEntity ()
40{
41  this->init();
42}
43
44
45SHELL_COMMAND(test, TestEntity,test);
46SHELL_COMMAND(t2, TestEntity,t2);
47SHELL_COMMAND(t3, TestEntity,t3);
48SHELL_COMMAND(t4, TestEntity, t4);
49SHELL_COMMAND(t5, TestEntity,t5);
50
51/**
52 *
53 */
54TestEntity::TestEntity(const TiXmlElement* root)
55{
56  this->init();
57
58  if( root != NULL)
59    this->loadParams(root);
60}
61
62
63/**
64 *
65 */
66TestEntity::~TestEntity ()
67{}
68
69
70/**
71 *
72 */
73void TestEntity::init()
74{
75  this->registerObject(this, TestEntity::_objectList);
76  this->toList(OM_GROUP_00);
77
78}
79
80void TestEntity::test()
81{
82  CM= new cameraman();
83  CM->createCam();
84  //CM->moveCurrCam(-300, 0, 0);
85  CM->moveCam(-300, 0, 0, 0);
86}
87
88void TestEntity::t2()
89{
90  CM->moveCurrCam(0, -150, 0);
91
92}
93
94void TestEntity::t3()
95{
96
97  CM->setCam(1);
98}
99
100void TestEntity::t4()
101{
102  cout << CM->cameras[1]->getAbsCoorX() << endl <<CM->cameras[1]->getAbsCoorY() << endl <<CM->cameras[1]->getAbsCoorZ() << endl << CM->cameras[1]->target->getAbsCoorX() << endl;
103  CM->testCam();
104  cout << CM->cameras[1]->getAbsCoorX() << endl <<CM->cameras[1]->getAbsCoorY() << endl <<CM->cameras[1]->getAbsCoorZ() << endl << CM->cameras[1]->target->getAbsCoorX() << endl;
105}
106
107void TestEntity::t5()
108{
109  CM->setCam(0);
110}
111
112
113
114/**
115 * loads the Settings of a MD2Creature from an XML-element.
116 * @param root the XML-element to load the MD2Creature's properties from
117 */
118void TestEntity::loadParams(const TiXmlElement* root)
119{
120  WorldEntity::loadParams(root);
121}
122
123void TestEntity::draw() const
124{
125
126}
127
128/**
129 *
130 */
131void TestEntity::tick (float time)
132{
133
134}
135
136
137void  TestEntity::changeState (bool sta)
138{
139
140}
Note: See TracBrowser for help on using the repository browser.