Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/playability/src/proto/proto_world_entity.cc @ 10297

Last change on this file since 10297 was 9406, checked in by bensch, 18 years ago

orxonox/trunk: merged the proxy back

merged with commandsvn merge -r9346:HEAD https://svn.orxonox.net/orxonox/branches/proxy .

no conflicts

File size: 2.0 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
16#include "proto_world_entity.h"
17
18
19
20
21/**
22 * constructs and loads a ProtoWorldEntity from a XML-element
23 * @param root the XML-element to load from
24 */
25ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root)
26{
27  this->init();
28  if (root != NULL)
29    this->loadParams(root);
30}
31
32
33/**
34 * standard deconstructor
35 */
36ProtoWorldEntity::~ProtoWorldEntity ()
37{
38
39}
40
41
42/**
43 * initializes the ProtoWorldEntity
44 * @todo change this to what you wish
45 */
46void ProtoWorldEntity::init()
47{
48  this->setClassID(CL_PROTO_WORLD_ENTITY, "ProtoWorldEntity");
49
50  /**
51   * @todo: Write CL_PROTO_WORLD_ENTITY INTO THE src/defs/class_id.h (your own definition)
52   */
53
54}
55
56
57/**
58 * loads a ProtoWorldEntity from a XML-element
59 * @param root the XML-element to load from
60 * @todo make the class Loadable
61 */
62void ProtoWorldEntity::loadParams(const TiXmlElement* root)
63{
64  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
65  WorldEntity::loadParam(root);
66
67
68  /**
69   * @todo: make the class Loadable
70   */
71}
72
73
74/**
75 * advances the ProtoWorldEntity about time seconds
76 * @param time the Time to step
77 */
78ProtoWorldEntity::tick(float time)
79{
80
81}
82
83/**
84 * draws this worldEntity
85 */
86void ProtoWorldEntity::draw () const
87{
88  glMatrixMode(GL_MODELVIEW);
89  glPushMatrix();
90  float matrix[4][4];
91
92  /* translate */
93  glTranslatef (this->getAbsCoor ().x,
94                this->getAbsCoor ().y,
95                this->getAbsCoor ().z);
96  /* rotate */
97  this->getAbsDir().matrix(matrix);
98  glMultMatrixf((float*)matrix);
99
100  if (model)
101    model->draw();
102  glPopMatrix();
103}
104
105
106/**
107 *
108 *
109 */
110void ProtoWorldEntity::collidesWith (WorldEntity* entity, const Vector& location)
111{
112
113}
Note: See TracBrowser for help on using the repository browser.