Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3993 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Apr 27, 2005, 12:12:28 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: patch to use relative coordinates again, some smaller changes in the preLoading/loading mechanisms

Location:
orxonox/trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3986 r3993  
    201201  wi->init(this);
    202202  this->garbageCollector = GarbageCollector::getInstance();
     203  this->trackManager = TrackManager::getInstance();
     204  this->lightMan = LightManager::getInstance();
     205  this->nullParent = NullParent::getInstance ();
     206  this->nullParent->setName ("NullParent");
     207
    203208}
    204209
     
    215220      this->glmis->step();
    216221      // initializing the TrackManager
    217       trackManager = TrackManager::getInstance();
     222
    218223      //trackManager->addPoint(Vector(0,0,0));
    219224      trackManager->addPoint(Vector(150, -35, 5));
     
    277282
    278283      // LIGHT initialisation
    279       lightMan = LightManager::getInstance();
     284
    280285      lightMan->setAmbientColor(.1,.1,.1);
    281286      lightMan->addLight();
     
    298303          {
    299304            lightMan->setPosition(-5.0, 10.0, -40.0);
    300             this->nullParent = NullParent::getInstance ();
    301             this->nullParent->setName ("NullParent");
    302305
    303306            // !\todo old track-system has to be removed
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3988 r3993  
    178178    case ANIM_LINEAR:
    179179      this->animFuncMov = &Animation3D::mLinear;
    180       //this->object->setRelCoor(this->currentKeyFrame->position);
     180      this->object->setRelCoor(this->currentKeyFrame->position);
    181181      this->currentKeyFrame->lastPosition = Vector();
    182182      break;
    183183    case ANIM_SINE:
    184184      this->animFuncMov = &Animation3D::mSine;
    185       //this->object->setRelCoor(this->currentKeyFrame->position);
     185      this->object->setRelCoor(this->currentKeyFrame->position);
    186186      this->currentKeyFrame->lastPosition = Vector();
    187187      break;
    188188    case ANIM_COSINE:
    189189      this->animFuncMov = &Animation3D::mCosine;
    190       //this->object->setRelCoor(this->currentKeyFrame->position);
     190      this->object->setRelCoor(this->currentKeyFrame->position);
    191191      this->currentKeyFrame->lastPosition = Vector();
    192192      break;
    193193    case ANIM_EXP:
     194      this->object->setRelCoor(this->currentKeyFrame->position);
    194195      this->animFuncMov = &Animation3D::mExp;
    195196      break;
    196197    case ANIM_NEG_EXP:
    197198      this->animFuncMov = &Animation3D::mNegExp;
     199      this->object->setRelCoor(this->currentKeyFrame->position);
    198200      this->expFactorMov = -1.0 / this->currentKeyFrame->duration * logf(DELTA_X_3D);
    199201      this->currentKeyFrame->lastPosition = Vector();
    200202      break;
    201203    case ANIM_QUADRATIC:
     204      this->object->setRelCoor(this->currentKeyFrame->position);
    202205      this->animFuncMov = &Animation3D::mQuadratic;
    203206      break;
    204207    case ANIM_RANDOM:
     208      this->object->setRelCoor(this->currentKeyFrame->position);
    205209      this->animFuncMov = &Animation3D::mRandom;
    206210      break;
     
    353357    case ANIM_CONSTANT:
    354358      this->animFuncRot = &Animation3D::rConstant;
    355       printf("a;sdlfkja;lskdjf;alskjdf;lasjdf;lasjdf;lasjdf;lajsdf\n");
    356359      break;
    357360    case ANIM_LINEAR:
  • orxonox/trunk/src/world_entities/test_gun.cc

    r3987 r3993  
    4949  this->objectComponent1 = new PNode();
    5050  this->animation1 = new Animation3D(this->objectComponent1);
    51   //this->animation2 = new Animation3D(this);
     51  this->animation2 = new Animation3D(this);
     52  this->animation3 = new Animation3D(this);
    5253  //parent->addChild(this->objectComponent1, PNODE_ALL);
    5354  this->addChild(this->objectComponent1, PNODE_ALL);
    5455
    5556  this->animation1->setInfinity(ANIM_INF_CONSTANT);
    56   //this->animation2->setInfinity(ANIM_INF_CONSTANT);
     57  this->animation2->setInfinity(ANIM_INF_CONSTANT);
     58  this->animation3->setInfinity(ANIM_INF_CONSTANT);
    5759  if( this->leftRight == W_LEFT)
    5860    {
     
    6769      this->animation1->addKeyFrame(Vector(0, 0, 0), Quaternion(), 0.0, ANIM_LINEAR, ANIM_CONSTANT);
    6870
    69 
    70       //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    71       //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    72       //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     71      this->animation2->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     72      this->animation2->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     73
     74      this->animation3->addKeyFrame(Vector(-2.6, 0.1, 3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     75      this->animation3->addKeyFrame(Vector(-2.6, 0.1, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
    7376    }
    7477  else if( this->leftRight == W_RIGHT)
     
    8689
    8790
     91      this->animation2->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     92      this->animation2->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     93
     94      this->animation3->addKeyFrame(Vector(-2.6, 0.1, -3.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
     95      this->animation3->addKeyFrame(Vector(-2.6, 0.1, -2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_CONSTANT);
    8896      //this->animation2->addKeyFrame(Vector(0, 0, 0.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
    8997      //this->animation2->addKeyFrame(Vector(0, 0, 2.0), Quaternion(), 0.1, ANIM_LINEAR, ANIM_LINEAR);
     
    112120void TestGun::activate()
    113121{
    114   printf("ACTIVATE \n");
    115   //this->animation2->replay();
     122  if( this->leftRight == W_RIGHT) printf("ACTIVATE right weapon\n");
     123  else printf("ACTIVATE left weapon\n");
     124 
     125  this->animation2->replay();
    116126}
    117127
     
    127137{
    128138  printf("DEACTIVATE\n");
     139  this->animation3->replay();
    129140}
    130141
     
    200211  //this->getRelCoor().debug();
    201212  //this->getAbsCoor().debug();
    202 
    203   this->objectComponent1->getRelCoor().debug();
     213  //this->objectComponent1->getRelCoor().debug();
    204214  //this->objectComponent1->getAbsCoor().debug();
    205215
  • orxonox/trunk/src/world_entities/weapon.cc

    r3888 r3993  
    110110void WeaponManager::nextWeaponConf()
    111111{
    112   PRINTF(4)("Changing weapon configuration: from %i\n", this->currConfID);
     112  PRINTF(4)("Changing weapon configuration: from %i to next\n", this->currConfID);
    113113
    114114  Weapon* w;
Note: See TracChangeset for help on using the changeset viewer.