Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/trunk/src/world_entities/environment.cc @ 3998

Last change on this file since 3998 was 3986, checked in by patrick, 20 years ago

orxonox/trunk: fixed two major bugs in the animation3d framework (addKeyFrame, tick issues), added shoot animation again. one of both animation is still placed at the wrong place, since the weapons are not symmetrical

File size: 1.3 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 "environment.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
29Environment::Environment () : WorldEntity()
30{
31  this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);
32  //  this->model = new OBJModel("../data/models/fighter.obj");
33}
34
35
36
37Environment::~Environment () 
38{
39
40}
41
42void Environment::tick (float time) {}
43
44void Environment::hit (WorldEntity* weapon, Vector* loc) {}
45
46void Environment::destroy () {}
47
48void Environment::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
49
50void Environment::draw () 
51{
52  //this->getRelCoor().debug();
53
54  glMatrixMode(GL_MODELVIEW);
55  glPushMatrix();
56  float matrix[4][4];
57 
58  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
59  //rotate
60  this->getAbsDir().matrix (matrix);
61  glMultMatrixf((float*)matrix);
62 
63  this->model->draw();
64
65  glPopMatrix();
66}
67
Note: See TracBrowser for help on using the repository browser.