/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ### File Specific main-programmer: Patrick Boenzli co-programmer: */ #include "environment.h" #include "stdincl.h" #include "world_entity.h" #include "vector.h" #include "importer/model.h" using namespace std; Environment::Environment () : WorldEntity() { this->model = new Model("../data/models/fighter.obj"); } Environment::~Environment () { delete this->model; } void Environment::tick (float time) {} void Environment::hit (WorldEntity* weapon, Vector loc) {} void Environment::destroy () {} void Environment::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} void Environment::draw () { glMatrixMode(GL_MODELVIEW); glLoadIdentity(); float matrix[4][4]; glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); //rotate this->getAbsDir ().matrix (matrix); glMultMatrixf((float*)matrix); glMatrixMode(GL_MODELVIEW); glRotatef(90.0f,0.0f,1.0f,0.0f); glScalef(.5f,.5f,.5f); this->model->draw(); }