Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3238 in orxonox.OLD for orxonox/branches/buerli/src/environment.cc


Ignore:
Timestamp:
Dec 20, 2004, 2:42:54 AM (20 years ago)
Author:
bensch
Message:

orxonox/branches: updated branches: buerli, nico, sound. And moved bezierTrack to old.bezierTrack. Conflicts resolved in a usefull order.
Conflics mostly resolved in favor of trunk
merge.

File:
1 edited

Legend:

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

    r2036 r3238  
    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  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/*
    6398void Environment::paint()
    6499{
    65   /*
     100 
    66101  glPushMatrix();
    67102  //glScalef(0.5, 0.5, 1.0);
     
    95130 
    96131  glPopMatrix();
    97   */
     132 
    98133}
    99134
     
    103138}
    104139
     140*/
Note: See TracChangeset for help on using the changeset viewer.