Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8233 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer


Ignore:
Timestamp:
Jun 8, 2006, 1:26:50 PM (19 years ago)
Author:
bottac
Message:

Colision test

Location:
branches/bsp_model/src/lib/graphics/importer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/bsp_file.cc

    r8203 r8233  
    603603  MoviePlayer * testMC = new MoviePlayer(mat);
    604604  testMC->start(0);
     605 
     606  this->MovieMaterials.push_back(testMC);
    605607
    606608  //Material* tmp = new Material();
     
    632634  sc *= 1/255.0;
    633635
    634   scale = 1.8; // Adjust brightness here
     636  scale = 1.0f; // Adjust brightness here
    635637
    636638  if(sc > 1.0f && (temp = (1.0f/sc)) < scale) scale=temp;
  • branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc

    r8221 r8233  
    103103const void BspManager::tick(float time)
    104104{
     105  //if(!this->bspFile->MovieMaterials.empty())
     106  //this->bspFile->MovieMaterials.front()->tick(time );
    105107
    106108}
     
    305307  if(this->lastTex != curFace.texture) {
    306308    if(this->bspFile->Materials[curFace.texture].animated) {
    307       glBlendFunc(GL_ONE,GL_ONE_MINUS_SRC_COLOR);
    308       glEnable(GL_BLEND);
     309      glBlendFunc(GL_ZERO,GL_ONE);
     310      //glEnable(GL_BLEND);
    309311      if(this->bspFile->Materials[curFace.texture].aviMat->getStatus() == 2) this->bspFile->Materials[curFace.texture].aviMat->start(0);
    310       this->bspFile->Materials[curFace.texture].aviMat->tick(0.005);
     312      //this->bspFile->Materials[curFace.texture].aviMat->tick(0.005);
    311313      int n =  this->bspFile->Materials[curFace.texture].aviMat->getTexture();
    312314      glActiveTextureARB(GL_TEXTURE0_ARB);
    313315      glBindTexture(GL_TEXTURE_2D, n );
    314       glDisable(GL_BLEND);
     316     // glDisable(GL_BLEND);
    315317    } else {
    316318      this->bspFile->Materials[curFace.texture].mat->select();
     
    324326    glEnable(GL_TEXTURE_2D);
    325327  } else {
     328   // glEnable(GL_BLEND);
     329    //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
     330    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    326331    glActiveTextureARB(GL_TEXTURE1_ARB);
    327332    glBindTexture(GL_TEXTURE_2D, this->bspFile->glLightMapTextures[curFace.lm_index]);
    328333    glEnable(GL_TEXTURE_2D);
     334  //  glDisable(GL_BLEND);
    329335  }
    330336
     
    887893    Vector dest1 = position1 + forwardDir;
    888894    Vector dest2 = position2 + forwardDir;
    889     dest = position - Vector(0.0, 20.0,0.0);
     895    dest = position - Vector(0.0, 40.0,0.0);
    890896    Vector out1;
    891897    Vector out2;
    892 
     898    /*
    893899    this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 );
    894900    if(this->outputFraction == 1.0f)  out1 = dest;
     
    911917    }
    912918
     919    */
     920   
     921    float height = 10;
     922       
     923       
    913924    this->checkCollisionRayN(this->root,0.0f,1.0f, &position, &dest );
    914925    if(this->outputFraction == 1.0f) out = dest;
     
    919930      out.z = position.z + (dest.z -position.z) * this->outputFraction;
    920931
    921       Vector out3 = out + Vector(3*this->collPlane->x,3*this->collPlane->y,3*this->collPlane->z);
     932      Vector out3 = out + Vector(height*this->collPlane->x,height*this->collPlane->y,height*this->collPlane->z);
    922933      this->out = out;
    923       this->out1 = out1;
    924       this->out2 = out2;
     934      //this->out1 = out1;
     935      //this->out2 = out2;
    925936      //this->drawDebugCube(&out1);
    926937      //this->drawDebugCube(&out2);
     
    929940
    930941    }
     942   
     943   
    931944
    932945    // Return the normal here: Normal's stored in this->collPlane;
Note: See TracChangeset for help on using the changeset viewer.