Last change
on this file since 3359 was
3336,
checked in by patrick, 20 years ago
|
orxonox/branches/parenting: enhanced graphics initialisation. minor change
|
File size:
1.2 KB
|
Rev | Line | |
---|
[1883] | 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 | |
---|
[2036] | 13 | ### File Specific |
---|
| 14 | main-programmer: Patrick Boenzli |
---|
| 15 | co-programmer: |
---|
[1883] | 16 | */ |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #include "environment.h" |
---|
[2816] | 20 | #include "stdincl.h" |
---|
| 21 | #include "world_entity.h" |
---|
| 22 | #include "vector.h" |
---|
[3309] | 23 | #include "importer/object.h" |
---|
[1883] | 24 | |
---|
| 25 | using namespace std; |
---|
| 26 | |
---|
| 27 | |
---|
[1942] | 28 | |
---|
[2816] | 29 | Environment::Environment () : WorldEntity() |
---|
[1883] | 30 | { |
---|
[3336] | 31 | this->model = new Object("reaplow.obj"); |
---|
[1883] | 32 | } |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
[3309] | 36 | Environment::~Environment () |
---|
| 37 | { |
---|
[3336] | 38 | delete this->model; |
---|
[3309] | 39 | } |
---|
[1883] | 40 | |
---|
[2816] | 41 | void Environment::tick (float time) {} |
---|
[1883] | 42 | |
---|
[2816] | 43 | void Environment::hit (WorldEntity* weapon, Vector loc) {} |
---|
| 44 | |
---|
| 45 | void Environment::destroy () {} |
---|
| 46 | |
---|
| 47 | void Environment::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} |
---|
| 48 | |
---|
| 49 | void Environment::draw () |
---|
| 50 | { |
---|
| 51 | glMatrixMode(GL_MODELVIEW); |
---|
| 52 | glLoadIdentity(); |
---|
| 53 | float matrix[4][4]; |
---|
[3309] | 54 | |
---|
[3302] | 55 | glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); |
---|
[3309] | 56 | //rotate |
---|
[3302] | 57 | this->getAbsDir ().matrix (matrix); |
---|
[3309] | 58 | glMultMatrixf((float*)matrix); |
---|
[2816] | 59 | |
---|
[3309] | 60 | glMatrixMode(GL_MODELVIEW); |
---|
[3336] | 61 | this->model->draw(); |
---|
[2816] | 62 | } |
---|
| 63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.