Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/world_entities/src/world_entities/weapons/ground_turret.cc @ 5679

Last change on this file since 5679 was 5679, checked in by manuel, 18 years ago

debug commit

File size: 1.9 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: Manuel Leuenberger
13   co-programmer: ...
14*/
15
16#include "ground_turret.h"
17
18using namespace std;
19
20
21/**
22 * constructs and loads a GroundTurret from a XML-element
23 * @param root the XML-element to load from
24 */
25GroundTurret::GroundTurret(const TiXmlElement* root)
26{
27  this->init();
28  if (root != NULL)
29    this->loadParams(root);
30}
31
32
33/**
34 * standard deconstructor
35 */
36GroundTurret::~GroundTurret ()
37{
38
39}
40
41
42/**
43 * initializes the GroundTurret
44 * @todo change this to what you wish
45 */
46void GroundTurret::init()
47{
48  this->setClassID(CL_GROUND_TURRET, "GroundTurret");
49
50}
51
52
53/**
54 * loads a GroundTurret from a XML-element
55 * @param root the XML-element to load from
56 * @todo make the class Loadable
57 */
58void GroundTurret::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//  static_cast<WorldEntity*>(this)->loadParam(root);
62
63
64  /**
65   * @todo: make the class Loadable
66   */
67}
68
69
70/**
71 * advances the GroundTurret about time seconds
72 * @param time the Time to step
73 */
74//GroundTurret::tick(float time)
75//{
76//
77//}
78
79/**
80 * draws this worldEntity
81 */
82void GroundTurret::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 GroundTurret::collidesWith (WorldEntity* entity, const Vector& location)
107{
108
109}
Note: See TracBrowser for help on using the repository browser.