Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/heathaze/src/proto/proto_world_entity.cc @ 10613

Last change on this file since 10613 was 10067, checked in by snellen, 18 years ago

adapted the proto_world_entity.* to the classlistframework, start implementation of heathaze

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