Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/branches/md2_loader: added the TestEntity class to test the md2loader functionalities

File size: 1.2 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
23using namespace std;
24
25
26
27TestEntity::TestEntity () : WorldEntity()
28{
29  this->model = (Model*) ResourceManager::getInstance()->load("cube", RP_LEVEL);
30}
31
32
33
34TestEntity::~TestEntity () 
35{
36
37}
38
39void TestEntity::tick (float time) {}
40
41void TestEntity::hit (WorldEntity* weapon, Vector* loc) {}
42
43void TestEntity::destroy () {}
44
45void TestEntity::collide (WorldEntity* other,  Uint32 ownhitflags, Uint32 otherhitflags) {}
46
47void TestEntity::draw () 
48{
49  glMatrixMode(GL_MODELVIEW);
50  glPushMatrix();
51  float matrix[4][4];
52 
53  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
54   this->getAbsDir().matrix (matrix);
55  glMultMatrixf((float*)matrix);
56 
57  this->model->draw();
58
59  glPopMatrix();
60}
61
Note: See TracBrowser for help on using the repository browser.