Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/sound/src/environment.cc @ 2854

Last change on this file since 2854 was 2036, checked in by patrick, 20 years ago

orxonxo/trunk/src: extended framework: class inheritance, right including (had som bugs), framework not finished yet

File size: 1.9 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#include <iostream>
19#include <GL/glut.h>
20#include <stdlib.h>
21
22#include "data_tank.h"
23
24#include "environment.h"
25
26using namespace std;
27
28
29//Sorry Bensch
30#define LEVEL_LENGTH 500
31
32Environment::Environment () 
33  : WorldEntity()
34{
35
36  /*
37  //Sorry Bensch: x,y = 10
38  for (int x = 0; x < 50; x++)
39    {
40      for (int y = 0; y < 50; y++)
41        {
42          mountainTest[x][y] =0;
43                                                 
44        }
45    }
46  //Sorry Bensch: x,y = 9
47  for (int x = 1; x < LEVEL_LENGTH; x++)
48    {
49      for (int y = 1; y < LEVEL_LENGTH; y++)
50        {
51          //mountainTest[x][y] = (float)random() / 900000000;
52          mountainTest[x][y] = (float)(random() % 4);                                       
53        }
54    }
55  */
56}
57
58
59
60Environment::~Environment () {}
61
62
63void Environment::paint()
64{
65  /*
66  glPushMatrix();
67  //glScalef(0.5, 0.5, 1.0);
68  //glTranslatef(xCor, yCor, zCor);
69  glTranslatef( -16.0, -2.0, 0.0);
70 
71  glColor3f(0.0, 1.0, 0.0);
72 
73  glBegin(GL_LINES);
74  for (int x = 0; x < LEVEL_LENGTH; x += 1)
75    {
76      for (int y = 0; y < 190; y += 1)
77        {
78          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
79          glVertex3f((float)(2*x), (float)(2*(y+1)), mountainTest[x][y+1]);
80        }
81    }
82  glEnd();
83 
84 
85  glBegin(GL_LINES);
86  for (int y = 0; y < LEVEL_LENGTH; y += 1)
87    {
88      for (int x = 0; x < 90; x += 1)
89        {
90          glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
91          glVertex3f((float)(2*(x+1)), (float)(2*y), mountainTest[x+1][y]);
92        }
93    }
94  glEnd();
95 
96  glPopMatrix();
97  */
98}
99
100void Environment::drawEnvironment() 
101{
102
103}
104
Note: See TracBrowser for help on using the repository browser.