Changeset 8203 in orxonox.OLD for branches/bsp_model/src/lib/graphics
- Timestamp:
- Jun 7, 2006, 4:42:44 PM (18 years ago)
- 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
r8201 r8203 392 392 ::std::string absFileName; 393 393 char* baseName = "/worlds/bsp"; 394 394 395 395 char fileName [500]; 396 396 char ext [500]; … … 406 406 if(strlen(fileName) == 0) 407 407 { 408 408 409 409 // Default Material 410 410 this->Materials[i].mat = new Material(); … … 428 428 strcpy(ext, ".mov"); 429 429 strncat (fileName, ext, strlen(fileName) ); 430 430 431 431 PRINTF(0)("BSP FILE: Name %s . \n", fileName); 432 432 … … 631 631 sc = ((unsigned char *)(&lightMapTexture))[i]; 632 632 sc *= 1/255.0; 633 scale = 1.0; 633 634 scale = 1.8; // Adjust brightness here 635 634 636 if(sc > 1.0f && (temp = (1.0f/sc)) < scale) scale=temp; 635 637 scale*=255.0; -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r8195 r8203 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2006 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 ### File Specific: 12 12 main-programmer: bottac@ee.ethz.ch 13 13 14 14 Inspired by: 15 15 Rendering Q3 Maps by Morgan McGuire http://graphics.cs.brown.edu/games/quake/quake3.html 16 16 Unofficial Quake 3 Map Specs by Kekoa Proudfoot http://graphics.stanford.edu/~kekoa/q3/ 17 17 18 18 Collision detection adapted from: 19 19 Quake 3 Collision Detection by Nathan Ostgard http://www.devmaster.net/articles/quake3collision/ … … 67 67 BspManager::BspManager(const TiXmlElement* root) 68 68 { 69 70 69 70 71 71 if( root != NULL) 72 72 this->loadParams(root); 73 73 74 74 CDEngine::getInstance()->setBSPModel(this); 75 75 } */ … … 99 99 this->root = this->bspFile->get_root(); 100 100 this->alreadyVisible = new bool [this->bspFile->numFaces]; 101 101 102 102 CDEngine::getInstance()->setBSPModel(this); 103 103 } … … 106 106 const void BspManager::tick(float time) 107 107 { 108 108 109 109 } 110 110 const void BspManager::draw() … … 126 126 this->drawDebugCube(&this->out1); 127 127 this->drawDebugCube(&this->out2); 128 128 129 129 */ 130 130 131 131 132 132 // Draw Debug Terrain … … 165 165 166 166 167 167 168 168 // this->checkCollision(this->root, &this->cam); //!< Test Collision Detection 169 170 169 170 171 171 this->outputStartsOut = true; 172 172 this->outputAllSolid = false; 173 173 this->outputFraction = 1.0f; 174 174 this->checkCollision(State::getPlayer()->getPlayable()); 175 175 176 176 177 177 if ( viscluster < 0 || ((int *)(this->bspFile->header))[35] == 0 ) //!< if (sizeof(Visdata) == 0) … … 188 188 189 189 /** Do Frustum culling and draw 'em all **/ 190 190 191 191 Vector dir = State::getCameraNode()->getAbsDirX(); 192 192 … … 829 829 void BspManager::checkCollisionBox(void) 830 830 { 831 831 832 832 }; 833 833 … … 873 873 dest.z += forwardDir.z; 874 874 Vector out = dest; 875 876 877 878 879 880 881 882 883 875 884 if(!worldEntity->isA(CL_PLAYABLE)) { 876 885 … … 879 888 } 880 889 else { 890 881 891 bool collision = false; 882 892 Vector position1 = position + Vector(0.0,0.1,0.0); … … 928 938 929 939 // Return the normal here: Normal's stored in this->collPlane; 930 940 931 941 if(collision) worldEntity->collidesWithGround(out,out1,out2); 942 // registerCollision(WorldEntity* entity, Vector(this->collPlane.x, ), Vector position); 932 943 933 944 }
Note: See TracChangeset
for help on using the changeset viewer.