Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5376 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Oct 13, 2005, 2:11:05 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: fancy effects in Shell

Location:
trunk/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5354 r5376  
    622622    if (unlikely(this->toCoordinate != NULL))
    623623    {
    624       Vector moveVect = (*this->toCoordinate - this->getRelCoor2D()) *fabsf(dt)*bias;
     624      Vector moveVect = (*this->toCoordinate - this->relCoordinate) *fabsf(dt)*bias;
    625625
    626626      if (likely(moveVect.len() >= .001))//PNODE_ITERATION_DELTA))
     
    630630      else
    631631      {
    632         delete this->toCoordinate;
    633         this->toCoordinate = NULL;
     632        this->setRelCoor2D(*this->toCoordinate+moveVect);
    634633        PRINTF(5)("SmoothMove of %s finished\n", this->getName());
    635634      }
     
    637636    if (unlikely(this->toDirection != NULL))
    638637    {
    639       float rotFlot = (*this->toDirection - this->getRelDir2D()) *fabsf(dt)*bias;
    640       if (likely(rotFlot >= .001))//PNODE_ITERATION_DELTA))
     638      float rotFlot = (*this->toDirection - this->relDirection) *fabsf(dt)*bias;
     639      if (likely(fabsf(rotFlot) >= .001))//PNODE_ITERATION_DELTA))
    641640      {
    642641        this->shiftDir2D(rotFlot);
     
    644643      else
    645644      {
    646         delete this->toDirection;
    647         this->toDirection = NULL;
     645        this->setRelDir2D(*this->toDirection+rotFlot);
    648646        PRINTF(5)("SmoothRotate of %s finished\n", this->getName());
    649647      }
     
    722720    {
    723721      this->prevRelDirection = this->relDirection;
    724       this->absDirection = this->getAbsDir2D() * this->relDirection;
     722      this->absDirection = this->getAbsDir2D() + this->relDirection;
    725723    }
    726724  }
  • trunk/src/lib/graphics/text_engine/text.cc

    r5370 r5376  
    235235      glBindTexture(GL_TEXTURE_2D, Font::getDefaultFont()->getFastTextureID());
    236236    }
    237     glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
    238 //      glRotatef(this->getAbsDir2D(), 0,0,1);
    239237    const char* tmpText = this->externText;
    240238    if (this->externText == NULL)
     
    242240    if (likely(tmpText != NULL))
    243241    {
     242      glTranslatef(getAbsCoor2D().x, getAbsCoor2D().y, 0);
     243      glRotatef(this->getAbsDir2D(), 0,0,1);
    244244      Glyph* tmpGlyph;
    245245      float posX = 0.0f;
  • trunk/src/lib/shell/shell.cc

    r5375 r5376  
    359359
    360360  /*  FANCY EFFECTS :)
     361    1:
    361362        lastText->setRelCoor2D(this->calculateLinePosition(0)- Vector(-1000,0,0));
    362363        lastText->setRelCoorSoft2D(this->calculateLinePosition(0),10);
     364    2:
     365
     366    lastText->setRelDir2D(-90);
     367    lastText->setRelDirSoft2D(0, 10);
     368    lastText->setRelCoor2D(this->calculateLinePosition(0)- Vector(-1000,0,0));
     369    lastText->setRelCoorSoft2D(this->calculateLinePosition(0),10);
    363370  */
    364371    lastText->setRelCoor2D(this->calculateLinePosition(0));
Note: See TracChangeset for help on using the changeset viewer.