Changeset 2860 in orxonox.OLD for orxonox/branches/dave/src/environment.cc
- Timestamp:
- Nov 15, 2004, 11:13:21 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/dave/src/environment.cc
r2036 r2860 16 16 */ 17 17 18 #include <iostream>19 #include <GL/glut.h>20 #include <stdlib.h>21 22 #include "data_tank.h"23 18 24 19 #include "environment.h" 20 #include "stdincl.h" 21 #include "world_entity.h" 22 #include "vector.h" 25 23 26 24 using namespace std; … … 30 28 #define LEVEL_LENGTH 500 31 29 32 Environment::Environment () 33 : WorldEntity() 30 Environment::Environment () : WorldEntity() 34 31 { 35 32 … … 60 57 Environment::~Environment () {} 61 58 59 void Environment::tick (float time) {} 62 60 61 void Environment::hit (WorldEntity* weapon, Vector loc) {} 62 63 void Environment::destroy () {} 64 65 void Environment::collide (WorldEntity* other, Uint32 ownhitflags, Uint32 otherhitflags) {} 66 67 void Environment::draw () 68 { 69 printf("Environment::draw()"); 70 71 glMatrixMode(GL_MODELVIEW); 72 glLoadIdentity(); 73 float matrix[4][4]; 74 75 glTranslatef(get_placement()->r.x,get_placement()->r.y,get_placement()->r.z); 76 get_placement()->w.matrix (matrix); 77 glMultMatrixf ((float*)matrix); 78 79 glBegin(GL_TRIANGLES); 80 glColor3f(1,1,1); 81 glVertex3f(0,0,0.5); 82 glVertex3f(-0.5,0,-1); 83 glVertex3f(0.5,0,-1); 84 85 glVertex3f(0,0,0.5); 86 glVertex3f(0,0.5,-1); 87 glVertex3f(0,-0.5,-1); 88 glEnd(); 89 90 glBegin(GL_QUADS); 91 glColor3f(0,0,1); 92 glVertex3f(0.5,0.5,-1); 93 glVertex3f(0.5,-0.5,-1); 94 glVertex3f(-0.5,-0.5,-1); 95 glVertex3f(-0.5,0.5,-1); 96 glEnd(); 97 } 98 99 /* 63 100 void Environment::paint() 64 101 { 65 /*102 66 103 glPushMatrix(); 67 104 //glScalef(0.5, 0.5, 1.0); … … 95 132 96 133 glPopMatrix(); 97 */134 98 135 } 99 136 … … 103 140 } 104 141 142 */
Note: See TracChangeset
for help on using the changeset viewer.