Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3658 was 3658, checked in by bensch, 19 years ago

orxonox/trunk: resource manager working, player uses it.

File size: 1.3 KB
RevLine 
[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"
[3484]23#include "objModel.h"
[1883]24
25using namespace std;
26
27
[1942]28
[2816]29Environment::Environment () : WorldEntity()
[1883]30{
[3658]31  this->model = (Model*) ResourceManager::load("models/reaplow.obj", OBJ);
32  //  this->model = new OBJModel("../data/models/fighter.obj");
[1883]33}
34
35
36
[3365]37Environment::~Environment () 
38{
[3566]39
[3365]40}
[1883]41
[2816]42void Environment::tick (float time) {}
[1883]43
[3578]44void Environment::hit (WorldEntity* weapon, Vector* loc) {}
[2816]45
46void Environment::destroy () {}
47
48void Environment::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
49
50void Environment::draw () 
51{
52  glMatrixMode(GL_MODELVIEW);
[3526]53  glPushMatrix();
[2816]54  float matrix[4][4];
55 
[3365]56  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
57  //rotate
[3433]58  this->getAbsDir().matrix (matrix);
[3365]59  glMultMatrixf((float*)matrix);
[2816]60 
[3365]61  this->model->draw();
[3526]62
63  glPopMatrix();
[2816]64}
65
Note: See TracBrowser for help on using the repository browser.