Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10698 in orxonox.OLD for trunk/src/lib/graphics/importer/bsp


Ignore:
Timestamp:
Jun 14, 2007, 5:33:43 PM (17 years ago)
Author:
snellen
Message:

merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!

Location:
trunk/src/lib/graphics/importer/bsp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/bsp/bsp_manager.cc

    r10643 r10698  
    173173  // erase alreadyVisible
    174174  for(int i = 0; i < this->bspFile->numFaces; i++) this->alreadyVisible[i] = false;
    175   float tmp = 0;
     175//   float tmp = 0;
    176176  //this->opal.clear();
    177177  //this->trasparent.clear();
     
    186186
    187187  this->viewDir=    State::getCamera()->getAbsDirX();
    188   float d = (cam.x*viewDir.x + cam.y*viewDir.y + cam.z * viewDir.z);
     188//   float d = (cam.x*viewDir.x + cam.y*viewDir.y + cam.z * viewDir.z);
    189189
    190190  BspTreeNode*  ActLeaf = this->getLeaf(this->bspFile->root, &ship);
     
    254254
    255255    for(int i = 0; i <  this->bspFile->numLeafs   ; ++i ) {
    256       leaf& camLeaf =  (this->bspFile->leaves)[ActLeaf->leafIndex] ;
     256//       leaf& camLeaf =  (this->bspFile->leaves)[ActLeaf->leafIndex] ;
    257257      leaf& curLeaf =  (this->bspFile->leaves)[i] ;
    258258      int& cluster =  curLeaf.cluster;
     
    16961696
    16971697
     1698float BspManager::checkCollisionRay(Vector StartPoint, Vector Direction, float length )
     1699{
     1700  Direction.normalize(); // Oder besser vor dem Fkt-Aufruf schon normalisieren
     1701  this->outputStartsOut = true;
     1702  this->outputAllSolid = false;
     1703  this->outputFraction = 1.0f;
     1704  this->inputStart =  StartPoint;
     1705  Vector End =   StartPoint + (Direction)*length;
     1706  this->inputEnd =   End;
     1707
     1708  this->checkCollisionRayN(this->root, 0.0f, 1.0f, &StartPoint, &(End) );
     1709
     1710  return (this->outputFraction * length);
     1711
     1712}
     1713
     1714
    16981715
    16991716/**
  • trunk/src/lib/graphics/importer/bsp/bsp_manager.h

    r10618 r10698  
    7777  void checkCollision(WorldEntity* worldEntity); /*!< WorldEntities use this function to check wheter they collided with the BspEntity.
    7878                                                      If a collision has been detected, the collides-function of worldEntity will be called.*/
     79  float checkCollisionRay(Vector StartPoint, Vector Direction, float length ) ;
    7980
    8081  int sortTransparency;              //!< sort transparent textures
Note: See TracChangeset for help on using the changeset viewer.