Changeset 3238 in orxonox.OLD for orxonox/branches/buerli/src/environment.cc
- Timestamp:
- Dec 20, 2004, 2:42:54 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/buerli/src/environment.cc
r2036 r3238 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 glMatrixMode(GL_MODELVIEW); 70 glLoadIdentity(); 71 float matrix[4][4]; 72 73 glTranslatef(getPlacement()->r.x,getPlacement()->r.y,getPlacement()->r.z); 74 getPlacement()->w.matrix (matrix); 75 glMultMatrixf ((float*)matrix); 76 77 glBegin(GL_TRIANGLES); 78 glColor3f(1,0,1); 79 glVertex3f(0,0,0.5); 80 glVertex3f(-0.5,0,-1); 81 glVertex3f(0.5,0,-1); 82 83 glVertex3f(0,0,0.5); 84 glVertex3f(0,0.5,-1); 85 glVertex3f(0,-0.5,-1); 86 glEnd(); 87 88 glBegin(GL_QUADS); 89 glColor3f(1,0,1); 90 glVertex3f(0.5,0.5,-1); 91 glVertex3f(0.5,-0.5,-1); 92 glVertex3f(-0.5,-0.5,-1); 93 glVertex3f(-0.5,0.5,-1); 94 glEnd(); 95 } 96 97 /* 63 98 void Environment::paint() 64 99 { 65 /*100 66 101 glPushMatrix(); 67 102 //glScalef(0.5, 0.5, 1.0); … … 95 130 96 131 glPopMatrix(); 97 */132 98 133 } 99 134 … … 103 138 } 104 139 140 */
Note: See TracChangeset
for help on using the changeset viewer.