Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Aug 13, 2005, 9:07:56 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: smooth-rotation is better now
PNODE_MOVEMENT_ROTATE-children are correcly smooth-reparented
some other minor fixes

THIS IS 5000 :)
so
generated the endOfTheWorld-function
implemented de-generic recapitualisation Procedures
imported magnificizer
dezentralized obscurities
some other minor stuff
flush
eliminated deamons

man… i must have to much time

Location:
orxonox/trunk/src/world_entities
Files:
4 edited

Legend:

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

    r4998 r5000  
    142142    case VIEW_FRONT:
    143143      this->toFovy = 120.0;
    144 //       this->softReparent("Player");
    145 //       this->target->softReparent("Player");
    146 //       this->setRelCoorSoft(4, 0, 0);
    147 //       this->target->setRelCoorSoft(10,0,0);
    148       this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0)));
     144       this->softReparent("Player");
     145       this->target->softReparent("Player");
     146       this->setRelCoorSoft(4, 0, 0);
     147       this->target->setRelCoorSoft(10,0,0);
     148      //this->target->setRelDirSoft(Quaternion(M_PI/4.0, Vector(0,1,0)));
    149149      break;
    150150    case VIEW_LEFT:
  • orxonox/trunk/src/world_entities/player.cc

    r4998 r5000  
    121121void Player::init()
    122122{
    123   this->setAbsDir(0,1,0);
     123//  this->setAbsDir(0,1,0);
    124124
    125125  this->setClassID(CL_PLAYER, "Player");
  • orxonox/trunk/src/world_entities/weapons/test_gun.cc

    r4982 r5000  
    178178
    179179  pj->setParent(NullParent::getInstance());
    180 /*
    181   PNode* target = this->getWeaponManager()->getFixedTarget();
    182   if (target != NULL)
    183   {
    184     pj->setVelocity(this->getVelocity()+(target->getAbsCoor() - this->getAbsCoor())*.5);//this->getVelocity());
    185   }
    186   else*/
     180
    187181  pj->setVelocity(this->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*20);
    188182
     
    219213void TestGun::draw ()
    220214{
    221   this->getWeaponManager()->getFixedTarget()->debugDraw(10);
    222 
    223215  /* draw gun body */
    224216  glMatrixMode(GL_MODELVIEW);
    225217  glPushMatrix();
    226   float matrix[4][4];
    227218  glTranslatef (this->getAbsCoor ().x,
    228219                this->getAbsCoor ().y,
    229220                this->getAbsCoor ().z);
    230   this->getAbsDir ().matrix (matrix);
    231   glMultMatrixf((float*)matrix);
     221
     222  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     223  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
     224
    232225  if( this->leftRight == W_RIGHT)
    233226    glScalef(1.0, 1.0, -1.0);
     
    241234                this->objectComponent1->getAbsCoor ().y,
    242235                this->objectComponent1->getAbsCoor ().z);
    243   this->objectComponent1->getAbsDir ().matrix (matrix);
    244   glMultMatrixf((float*)matrix);
     236  tmpRot = this->objectComponent1->getAbsDir().getSpacialAxis();
     237  glRotatef (this->objectComponent1->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    245238  this->model->draw(0);
    246239  glPopMatrix();
  • orxonox/trunk/src/world_entities/weapons/turret.cc

    r4982 r5000  
    164164  glMatrixMode(GL_MODELVIEW);
    165165  glPushMatrix();
    166   float matrix[4][4];
    167166  glTranslatef (this->getAbsCoor ().x,
    168167                this->getAbsCoor ().y,
    169168                this->getAbsCoor ().z);
    170   this->getAbsDir ().matrix (matrix);
    171   glMultMatrixf((float*)matrix);
     169  Vector tmpRot = this->getAbsDir().getSpacialAxis();
     170  glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    172171
    173172  this->model->draw();
Note: See TracChangeset for help on using the changeset viewer.