Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: setClassID implemented in all files

File size: 1.5 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/**
29   \brief creates an environment
30*/
31Environment::Environment () : WorldEntity()
32{
33  this->setClassID(CL_ENVIRONMENT, "Environment");
34}
35
36
37/**
38   \brief deletes an environment
39*/
40Environment::~Environment ()
41{
42
43}
44
45/**
46   \brief ticks the environment
47   \param time the time about which to tick
48*/
49void Environment::tick (float time) {}
50
51/**
52   \brief if a hit occures
53*/
54void Environment::hit (WorldEntity* weapon, Vector* loc) {}
55
56/**
57   \brief destroys an Environment
58*/
59void Environment::destroy () {}
60
61/**
62   \brief a collision with some ship
63*/
64void Environment::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
65
66/**
67   \brief draws the Environment
68*/
69void Environment::draw ()
70{
71  //this->getRelCoor().debug();
72
73  glMatrixMode(GL_MODELVIEW);
74  glPushMatrix();
75  float matrix[4][4];
76
77  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
78  //rotate
79  this->getAbsDir().matrix (matrix);
80  glMultMatrixf((float*)matrix);
81
82  this->model->draw();
83
84  glPopMatrix();
85}
86
Note: See TracBrowser for help on using the repository browser.