Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/test/src/world_entities/test_entity.cc @ 10767

Last change on this file since 10767 was 9932, checked in by stefalie, 18 years ago

test: updated tutorial stuff…

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:
15   co-programmer:
16*/
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
18
19
20#include "executor/executor.h"
21#include "util/loading/factory.h"
22#include "util/loading/load_param.h"
23
24
25#include "test_entity.h"
26#include "debug.h"
27
28
29
30
31#include "state.h"
32
33
34
35#include "class_id_DEPRECATED.h"
36ObjectListDefinition(TestEntity);
37CREATE_FACTORY(TestEntity);
38
39
40
41/**
42 *
43 */
44TestEntity::TestEntity ()
45{
46  this->init();
47}
48
49
50/**
51 *
52 */
53TestEntity::TestEntity(const TiXmlElement* root)
54{
55  this->init();
56
57  if( root != NULL)
58    this->loadParams(root);
59}
60
61
62/**
63 *
64 */
65TestEntity::~TestEntity ()
66{}
67
68
69/**
70 *
71 */
72void TestEntity::init()
73{
74  this->registerObject(this, TestEntity::_objectList);
75  this->toList(OM_GROUP_01);
76}
77
78
79/**
80 * loads the Settings of a MD2Creature from an XML-element.
81 * @param root the XML-element to load the MD2Creature's properties from
82 */
83void TestEntity::loadParams(const TiXmlElement* root)
84{
85  WorldEntity::loadParams(root);
86}
87
88
89
90/**
91 *
92 */
93void TestEntity::tick (float time)
94{
95
96}
97
98
99/**
100 *
101 */
102void TestEntity::draw() const
103{
104  glPushMatrix();
105  glPushAttrib(GL_ENABLE_BIT);
106
107  glMatrixMode(GL_MODELVIEW);
108  glDisable(GL_LIGHTING);
109
110  /* Move the object near the starting point of our spaceship*/
111  glTranslatef(-1200.0f, 300.0f, 700.0f);
112
113
114
115
116
117
118  glPopAttrib();
119  glPopMatrix();
120}
121
122
123
124
Note: See TracBrowser for help on using the repository browser.