- Timestamp:
- Jun 10, 2005, 7:42:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/test_bullet.cc
r4464 r4593 1 1 2 2 3 /* 3 /* 4 4 orxonox - the future of 3D-vertical-scrollers 5 5 … … 13 13 ### File Specific 14 14 main-programmer: Patrick Boenzli 15 co-programmer: 15 co-programmer: 16 16 */ 17 17 … … 34 34 { 35 35 this->setClassID(CL_TEST_BULLET, "TestBullet"); 36 this->model = (Model*)ResourceManager::getInstance()->load("models/test_projectile.obj", OBJ, RP_LEVEL); 36 float modelSize = .5; 37 this->model = (Model*)ResourceManager::getInstance()->load("models/Rocket1.obj", OBJ, RP_LEVEL, (void*) &modelSize); 37 38 } 38 39 … … 41 42 \brief standard deconstructor 42 43 */ 43 TestBullet::~TestBullet () 44 TestBullet::~TestBullet () 44 45 { 45 /* 46 do not delete the test projectModel, since it is pnode 47 and will be cleaned out by world 46 /* 47 do not delete the test projectModel, since it is pnode 48 and will be cleaned out by world 48 49 */ 49 50 //delete this->projectileModel; … … 56 57 \param time since last tick 57 58 */ 58 void TestBullet::tick (float time) 59 void TestBullet::tick (float time) 59 60 { 60 61 //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1); … … 78 79 \param place where it is hit 79 80 */ 80 void TestBullet::hit (WorldEntity* entity, Vector* place) 81 void TestBullet::hit (WorldEntity* entity, Vector* place) 81 82 {} 82 83 … … 85 86 \brief the function gets called, when the projectile is destroyed 86 87 */ 87 void TestBullet::destroy () 88 void TestBullet::destroy () 88 89 {} 89 90 90 91 91 void TestBullet::draw () 92 void TestBullet::draw () 92 93 { 93 94 glMatrixMode(GL_MODELVIEW); 94 95 glPushMatrix(); 95 96 96 float matrix[4][4]; 97 float matrix[4][4]; 97 98 glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z); 98 99 this->getAbsDir().matrix (matrix); 99 glMultMatrixf((float*)matrix); 100 glMultMatrixf((float*)matrix); 100 101 glScalef(2.0, 2.0, 2.0); 101 102 this->model->draw();
Note: See TracChangeset
for help on using the changeset viewer.