Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2860 in orxonox.OLD for orxonox/branches/dave/src/environment.cc


Ignore:
Timestamp:
Nov 15, 2004, 11:13:21 PM (20 years ago)
Author:
dave
Message:

orxonox/branches/dave: das level hat jetzt form angenommen, stand:nach der Convention vom Samstag….

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/dave/src/environment.cc

    r2036 r2860  
    1616*/
    1717
    18 #include <iostream>
    19 #include <GL/glut.h>
    20 #include <stdlib.h>
    21 
    22 #include "data_tank.h"
    2318
    2419#include "environment.h"
     20#include "stdincl.h"
     21#include "world_entity.h"
     22#include "vector.h"
    2523
    2624using namespace std;
     
    3028#define LEVEL_LENGTH 500
    3129
    32 Environment::Environment ()
    33   : WorldEntity()
     30Environment::Environment () : WorldEntity()
    3431{
    3532
     
    6057Environment::~Environment () {}
    6158
     59void Environment::tick (float time) {}
    6260
     61void Environment::hit (WorldEntity* weapon, Vector loc) {}
     62
     63void Environment::destroy () {}
     64
     65void Environment::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
     66
     67void 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/*
    63100void Environment::paint()
    64101{
    65   /*
     102 
    66103  glPushMatrix();
    67104  //glScalef(0.5, 0.5, 1.0);
     
    95132 
    96133  glPopMatrix();
    97   */
     134 
    98135}
    99136
     
    103140}
    104141
     142*/
Note: See TracChangeset for help on using the changeset viewer.