Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/branches/md2_loader: reimplemente the whole md2_loader to make it more performant

File size: 1.5 KB
Line 
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"
22#include "md2Model.h"
23
24using namespace std;
25
26
27
28TestEntity::TestEntity () : WorldEntity()
29{ 
30  //this->md2Model = new MD2Model();
31
32  MD2Model2* model2 = new MD2Model2();
33  model2->loadModel("../data/models/tris.md2");
34
35  this->material = new Material("Clown");
36  this->material->setDiffuseMap("../data/models/tris.pcx");
37  this->material->setIllum(3);
38  this->material->setAmbient(1.0, 1.0, 1.0);
39}
40
41
42TestEntity::~TestEntity () 
43{}
44
45
46void TestEntity::tick (float time) 
47{
48  //this->md2Model->tick(time);
49}
50
51
52void TestEntity::hit (WorldEntity* weapon, Vector* loc) {}
53
54
55void TestEntity::destroy () {}
56
57
58void TestEntity::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
59
60
61void TestEntity::draw () 
62{
63  glMatrixMode(GL_MODELVIEW);
64  glPushMatrix();
65  float matrix[4][4];
66 
67  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
68   this->getAbsDir().matrix (matrix);
69  glMultMatrixf((float*)matrix);
70 
71
72  /* TESTGING TESTING TESTING */
73  //this->material->select();
74  //this->md2Model->draw(this->model);
75  //this->md2Model->animate();
76
77  glPopMatrix();
78}
79
Note: See TracBrowser for help on using the repository browser.