Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4593 in orxonox.OLD for orxonox/trunk/src/world_entities


Ignore:
Timestamp:
Jun 10, 2005, 7:42:49 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: cooler testBullet :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/test_bullet.cc

    r4464 r4593  
    11
    22
    3 /* 
     3/*
    44   orxonox - the future of 3D-vertical-scrollers
    55
     
    1313   ### File Specific
    1414   main-programmer: Patrick Boenzli
    15    co-programmer: 
     15   co-programmer:
    1616*/
    1717
     
    3434{
    3535  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);
    3738}
    3839
     
    4142   \brief standard deconstructor
    4243*/
    43 TestBullet::~TestBullet () 
     44TestBullet::~TestBullet ()
    4445{
    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
    4849  */
    4950  //delete this->projectileModel;
     
    5657   \param time since last tick
    5758*/
    58 void TestBullet::tick (float time) 
     59void TestBullet::tick (float time)
    5960{
    6061  //Vector v = *this->flightDirection * ( this->speed * time * 1000 + 0.1);
     
    7879   \param place where it is hit
    7980*/
    80 void TestBullet::hit (WorldEntity* entity, Vector* place) 
     81void TestBullet::hit (WorldEntity* entity, Vector* place)
    8182{}
    8283
     
    8586   \brief the function gets called, when the projectile is destroyed
    8687*/
    87 void TestBullet::destroy () 
     88void TestBullet::destroy ()
    8889{}
    8990
    9091
    91 void TestBullet::draw () 
     92void TestBullet::draw ()
    9293{
    9394  glMatrixMode(GL_MODELVIEW);
    9495  glPushMatrix();
    9596
    96   float matrix[4][4]; 
     97  float matrix[4][4];
    9798  glTranslatef (this->getAbsCoor ().x, this->getAbsCoor ().y, this->getAbsCoor ().z);
    9899  this->getAbsDir().matrix (matrix);
    99   glMultMatrixf((float*)matrix); 
     100  glMultMatrixf((float*)matrix);
    100101  glScalef(2.0, 2.0, 2.0);
    101102  this->model->draw();
Note: See TracChangeset for help on using the changeset viewer.