Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/projectile.cc @ 3574

Last change on this file since 3574 was 3574, checked in by patrick, 19 years ago

orxonox/trunk: little projectile mod - restructure of the draw functnion

File size: 1.2 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: Patrick Boenzli
15   co-programmer:
16*/
17
18
19#include "projectile.h"
20#include "stdincl.h"
21#include "world_entity.h"
22#include "vector.h"
23#include "objModel.h"
24
25using namespace std;
26
27
28
29Projectile::Projectile () : WorldEntity()
30{
31  this->model = new OBJModel("");
32}
33
34
35
36Projectile::~Projectile () 
37{
38  delete this->model;
39}
40
41void Projectile::tick (float time) 
42{}
43
44void Projectile::hit (WorldEntity* weapon, Vector loc) 
45{}
46
47void Projectile::destroy () 
48{}
49
50void Projectile::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) 
51{}
52
53void Projectile::draw () 
54{
55  glMatrixMode(GL_MODELVIEW);
56  glPushMatrix();
57
58  float matrix[4][4]; 
59  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
60  this->getAbsDir().matrix (matrix);
61  glMultMatrixf((float*)matrix); 
62  this->model->draw();
63
64  glPopMatrix();
65}
66
Note: See TracBrowser for help on using the repository browser.