Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/md2_loader/src/world_entities/test_entity.cc @ 4153

Last change on this file since 4153 was 4153, checked in by patrick, 19 years ago

orxonox/branches/md2_loader: now the model gets displayed at the first track fork location - no texture until now. doesn't look that bad… actualy looks quite good :))

File size: 1.4 KB
RevLine 
[4151]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
19#include "test_entity.h"
20#include "stdincl.h"
21#include "model.h"
[4152]22#include "md2Model.h"
[4151]23
24using namespace std;
25
26
27
28TestEntity::TestEntity () : WorldEntity()
29{
[4152]30 //This is for md2 test purposes only! if this is seen in the trunk: hit me :)
31  MD2Loader* md2loader = new MD2Loader();
32  this->model = new t3DModel;
33  this->md2Model = new MD2Model();
34
35  md2loader->importMD2(model, "../data/models/jack/tris.md2", "test.bmp");
[4151]36}
37
38
39TestEntity::~TestEntity () 
[4153]40{}
[4151]41
42
43void TestEntity::tick (float time) {}
44
[4153]45
[4151]46void TestEntity::hit (WorldEntity* weapon, Vector* loc) {}
47
[4153]48
[4151]49void TestEntity::destroy () {}
50
[4153]51
[4151]52void TestEntity::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
53
[4153]54
[4151]55void TestEntity::draw () 
56{
57  glMatrixMode(GL_MODELVIEW);
58  glPushMatrix();
59  float matrix[4][4];
60 
61  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
62   this->getAbsDir().matrix (matrix);
63  glMultMatrixf((float*)matrix);
64 
[4152]65  //this->model->draw();
66  /* TESTGING TESTING TESTING */
67  this->md2Model->draw(this->model);
[4151]68
69  glPopMatrix();
70}
71
Note: See TracBrowser for help on using the repository browser.