Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: some minor cleanup, of the mess i made with AutoMake-sh

File size: 1.4 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#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
18
19
20#include "environment.h"
21
22#include "resource_manager.h"
23
24#include "vector.h"
25#include "objModel.h"
26#include "obb_tree.h"
27
28using namespace std;
29
30
31/**
32 *  creates an environment
33*/
34Environment::Environment () : WorldEntity()
35{
36  this->setClassID(CL_ENVIRONMENT, "Environment");
37  this->loadModel("models/ships/bolido.obj");
38
39/*  if(this->obbTree == NULL)
40    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());*/
41}
42
43
44/**
45 *  deletes an environment
46*/
47Environment::~Environment ()
48{}
49
50
51/**
52 *  ticks the environment
53 * @param time the time about which to tick
54*/
55void Environment::tick (float time) {}
56
57
58/**
59 *  draws the Environment
60*/
61void Environment::draw ()
62{
63  glMatrixMode(GL_MODELVIEW);
64  glPushMatrix();
65  float matrix[4][4];
66
67  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
68  //rotate
69  this->getAbsDir().matrix (matrix);
70  glMultMatrixf((float*)matrix);
71
72  this->model->draw();
73
74  glPopMatrix();
75}
76
Note: See TracBrowser for help on using the repository browser.