Changeset 8081 in orxonox.OLD for branches/bsp_model
- Timestamp:
- Jun 1, 2006, 4:42:01 PM (19 years ago)
- Location:
- branches/bsp_model/src
- Files:
-
- 7 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/defs/class_id.h
r7256 r8081 173 173 CL_PLANET = 0x00000309, 174 174 CL_BUILDING = 0x00000310, 175 CL_BSP_ENTITY = 0x00000311, 175 176 176 177 // Playables … … 248 249 CL_OBB = 0x00720000, 249 250 CL_BOUNDING_SPHERE = 0x00740000, 251 250 252 251 253 … … 273 275 CL_HEIGHT_MAP = 0x0000090a, 274 276 CL_GRID = 0x0000090b, 275 277 CL_BSP_MODEL = 0x0000090c, //!FIXME 278 276 279 CL_MATERIAL = 0x00000810, 277 280 CL_SHADER = 0x00000811, -
branches/bsp_model/src/lib/graphics/importer/bsp_file.cc
r8030 r8081 11 11 ### File Specific: 12 12 main-programmer: bottac@ee.ethz.ch 13 14 Inspired by: 15 Rendering Q3 Maps by Morgan McGuire http://graphics.cs.brown.edu/games/quake/quake3.html 16 Unofficial Quake 3 Map Specs by Kekoa Proudfoot http://graphics.stanford.edu/~kekoa/q3/ 17 Quake 3 Collision Detection by Nathan Ostgard http://www.devmaster.net/articles/quake3collision/ 13 18 */ 14 19 … … 43 48 int BspFile::read(const char* name) 44 49 { 45 this->scale = 0.4;50 //this->scale = 0.4; 46 51 int offset; 47 52 int size; … … 592 597 int mipmapLevel = 0; //!< the maximum mipmap level for this texture 593 598 int mipmapWidth = 0; //!< the width of the mipmap 594 int mipmapHight = 0; //!< the height of the mipmap 595 599 int mipmapHight = 0; //!< the height of the mipmap3 596 600 float sc, scale, temp; 597 601 for(int i = 0; i < 128*128*3 ; i++) … … 599 603 sc = ((unsigned char *)(&lightMapTexture))[i]; 600 604 sc *= 1/255.0; 601 scale = 1.4;605 scale = 2.0; 602 606 if(sc > 1.0f && (temp = (1.0f/sc)) < scale) scale=temp; 603 607 scale*=255.0; … … 606 610 ((unsigned char *)(&lightMapTexture))[i] = (unsigned char)sc + 75; 607 611 else 608 ((unsigned char *)(&lightMapTexture))[i] = (unsigned char)sc ;612 ((unsigned char *)(&lightMapTexture))[i] = (unsigned char)sc ; 609 613 } 610 614 … … 982 986 } 983 987 988 //!TODO: This is a good place to do LittleEndian to BigEndian conversion! 984 989 void BspFile::swapAllBspCoordinates() 985 990 { … … 1015 1020 } 1016 1021 1017 1018 1019 1020 1021 1022 } 1022 1023 1023 1024 void BspFile::swapCoords(int *array) 1024 1025 { 1026 if( scale < 1) 1027 { 1025 1028 int sto = array[0]; 1026 1029 array[0] = array[1] / (int) ( 1/ scale); 1027 1030 array[1] = array[2] / (int) (1/scale); 1028 1031 array[2] = sto / (int) (1/scale); 1032 } 1033 else 1034 { 1035 int sto = array[0]; 1036 array[0] = scale * array[1] ; 1037 array[1] = scale * array[2]; 1038 array[2] = scale * sto ; 1039 } 1029 1040 1030 1041 } -
branches/bsp_model/src/lib/graphics/importer/bsp_file.h
r8030 r8081 11 11 ### File Specific: 12 12 main-programmer: bottac@ee.ethz.ch 13 14 Inspired by: 15 Rendering Q3 Maps by Morgan McGuire http://graphics.cs.brown.edu/games/quake/quake3.html 16 Unofficial Quake 3 Map Specs by Kekoa Proudfoot http://graphics.stanford.edu/~kekoa/q3/ 17 Quake 3 Collision Detection by Nathan Ostgard http://www.devmaster.net/articles/quake3collision/ 13 18 */ 14 19 -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r8030 r8081 11 11 ### File Specific: 12 12 main-programmer: bottac@ee.ethz.ch 13 14 Inspired by: 15 Rendering Q3 Maps by Morgan McGuire http://graphics.cs.brown.edu/games/quake/quake3.html 16 Unofficial Quake 3 Map Specs by Kekoa Proudfoot http://graphics.stanford.edu/~kekoa/q3/ 17 18 Collision detection adapted from: 19 Quake 3 Collision Detection by Nathan Ostgard http://www.devmaster.net/articles/quake3collision/ 13 20 */ 14 21 … … 36 43 #include "world_entity.h" 37 44 45 #include "util/loading/load_param.h" 46 #include "util/loading/factory.h" 47 48 49 //CREATE_FACTORY( BspManager, CL_BSP_MODEL); 50 38 51 BspManager::BspManager() 39 52 { 40 / / open a BSP file53 /*// open a BSP file 41 54 this->bspFile = new BspFile(); 55 this->bspFile->scale = 0.4f; 42 56 this->bspFile->read(ResourceManager::getFullName("test.bsp").c_str()); 43 57 this->bspFile->build_tree(); 44 58 this->root = this->bspFile->get_root(); 45 59 this->alreadyVisible = new bool [this->bspFile->numFaces]; 46 60 */ 47 61 CDEngine::getInstance()->setBSPModel(this); 48 } 49 50 void BspManager::draw() 51 { 52 53 62 63 64 65 } 66 67 68 /* 69 BspManager::BspManager(const TiXmlElement* root) 70 { 71 72 73 if( root != NULL) 74 this->loadParams(root); 75 76 CDEngine::getInstance()->setBSPModel(this); 77 } */ 78 79 void BspManager::load(const char* fileName, float scale) 80 { 81 //this->setClassID(CL_BSP_MODEL, "BspManager"); 82 // open a BSP file 83 this->bspFile = new BspFile(); 84 this->bspFile->scale = scale; 85 this->bspFile->read(ResourceManager::getFullName(fileName).c_str()); 86 this->bspFile->build_tree(); 87 this->root = this->bspFile->get_root(); 88 this->alreadyVisible = new bool [this->bspFile->numFaces]; 89 90 91 } 92 /* 93 BspManager::BspManager(const char* fileName, float scale) 94 { 95 // open a BSP file 96 this->bspFile = new BspFile(); 97 this->bspFile->scale = scale; 98 this->bspFile->read(fileName); 99 this->bspFile->build_tree(); 100 this->root = this->bspFile->get_root(); 101 this->alreadyVisible = new bool [this->bspFile->numFaces]; 102 103 CDEngine::getInstance()->setBSPModel(this); 104 } 105 */ 106 107 const void BspManager::draw() 108 { 109 110 /* 54 111 this->drawDebugCube(&this->out); 55 112 this->out1 = this->out; … … 67 124 this->drawDebugCube(&this->out1); 68 125 this->drawDebugCube(&this->out2); 69 126 */ 70 127 // Draw Debug Terrain 71 128 /* … … 192 249 const float dMaxs = dir.x*(float)curLeaf.maxs[0] +dir.y*(float)curLeaf.maxs[1] +dir.z*(float)curLeaf.maxs[2] - dist; 193 250 194 if(dMins < - 100.0 && dMaxs < - 100.0) {251 if(dMins < -50.0 && dMaxs < - 50.0) { 195 252 continue; 196 253 } … … 223 280 this->trasparent.pop_back(); 224 281 } 282 //glEnable(GL_TEXTURE_2D); 225 283 glActiveTextureARB(GL_TEXTURE1_ARB); 226 284 glBindTexture(GL_TEXTURE_2D, this->bspFile->whiteLightMap); 227 glEnable(GL_TEXTURE_2D); 285 286 228 287 229 288 }//draw … … 479 538 if (fraction > startFraction) 480 539 startFraction = fraction; 540 // don't store plane 541 // this->collPlane = &curPlane; 542 543 } else { // line is leaving the brush 544 float fraction = (startDistance + EPSILON) / (startDistance - endDistance); // * 545 if (fraction < endFraction) 546 endFraction = fraction; 547 // don't store plane 548 //this->collPlane = & curPlane; 549 550 } 551 552 } 553 if (startsOut == false) { 554 this->outputStartsOut = false; 555 if (endsOut == false) 556 this->outputAllSolid = true; 557 return; 558 } 559 560 if (startFraction < endFraction) { 561 if (startFraction > -1.0f && startFraction < outputFraction) { 562 if (startFraction < 0) 563 startFraction = 0; 564 this->outputFraction = startFraction; 565 } 566 } 567 568 } 569 570 void BspManager::checkBrushRayN(brush* curBrush) 571 { 572 float EPSILON = 0.000001; 573 float startDistance; 574 float endDistance; 575 576 float startFraction = -1.0f; 577 float endFraction = 1.0f; 578 bool startsOut = false; 579 bool endsOut = false; 580 581 Vector inputStart = State::getCameraTargetNode()->getLastAbsCoor(); 582 Vector inputEnd = State::getCameraTargetNode()->getAbsCoor(); 583 584 for (int i = 0; i < curBrush->n_brushsides; i++) { 585 brushside& curBrushSide = this->bspFile->brushSides[curBrush->brushside + i] ; 586 plane& curPlane = this->bspFile->planes[curBrushSide.plane] ; 587 588 startDistance = inputStart.x * curPlane.x + inputStart.y * curPlane.y+ inputStart.z * curPlane.z - curPlane.d; 589 endDistance = inputEnd.x * curPlane.x +inputEnd.y * curPlane.y +inputEnd.z * curPlane.z -curPlane.d; 590 591 if (startDistance > 0) 592 startsOut = true; 593 if (endDistance > 0) 594 endsOut = true; 595 596 // make sure the trace isn't completely on one side of the brush 597 if (startDistance > 0 && endDistance > 0) { // both are in front of the plane, its outside of this brush 598 return; 599 } 600 if (startDistance <= 0 && endDistance <= 0) { // both are behind this plane, it will get clipped by another one 601 continue; 602 } 603 604 // MMM... BEEFY 605 if (startDistance > endDistance) { // line is entering into the brush 606 float fraction = (startDistance - EPSILON) / (startDistance - endDistance); // * 607 if (fraction > startFraction) 608 startFraction = fraction; 481 609 // store plane 482 610 this->collPlane = &curPlane; … … 508 636 509 637 } 638 510 639 511 640 void BspManager::checkCollisionRay(BspTreeNode* node, float startFraction, float endFraction, Vector* start, Vector* end) … … 604 733 605 734 735 736 void BspManager::checkCollisionRayN(BspTreeNode* node, float startFraction, float endFraction, Vector* start, Vector* end) 737 { 738 739 740 float EPSILON = 0.000001; 741 float endDistance = (end)->x * (node->plane.x) +(end)->y * (node->plane.y) +(end)->z * (node->plane.z) - node->d; 742 float startDistance = (start)->x * (node->plane.x)+ (start)->y * (node->plane.y)+ (start)->z * (node->plane.z)- node->d; 743 744 745 if(node->isLeaf) { 746 leaf& curLeaf = this->bspFile->leaves[node->leafIndex]; 747 for (int i = 0; i < curLeaf.n_leafbrushes ; i++) { 748 brush& curBrush = this->bspFile->brushes[((int*)(this->bspFile->leafBrushes))[curLeaf.leafbrush_first+i]]; 749 //object *brush = &BSP.brushes[BSP.leafBrushes[leaf->firstLeafBrush + i]]; 750 if (curBrush.n_brushsides > 0 && 751 ((((BspTexture*)(this->bspFile->textures))[curBrush.texture]).contents & 1)) 752 // CheckBrush( brush ); 753 this->checkBrushRayN(&curBrush); 754 if(curBrush.n_brushsides <=0) this->outputAllSolid = true; 755 } 756 return; 757 } 758 759 760 if (startDistance >= 0 && endDistance >= 0) // A 761 { // both points are in front of the plane 762 // so check the front child 763 this->checkCollisionRayN(node->left,0,0,start,end); 764 } else if (startDistance < 0 && endDistance < 0) // B 765 { // both points are behind the plane 766 // so check the back child 767 this->checkCollisionRayN(node->right,0,0,start,end); 768 } else // C 769 { // the line spans the splitting plane 770 int side; 771 float fraction1, fraction2, middleFraction; 772 Vector middle; 773 774 // STEP 1: split the segment into two 775 if (startDistance < endDistance) { 776 side = 1; // back 777 float inverseDistance = 1.0f / (startDistance - endDistance); 778 fraction1 = (startDistance + EPSILON) * inverseDistance; 779 fraction2 = (startDistance + EPSILON) * inverseDistance; 780 } else if (endDistance < startDistance) { 781 side = 0; // front(start)->x * (node->plane.x)+ 782 float inverseDistance = 1.0f / (startDistance - endDistance); 783 fraction1 = (startDistance + EPSILON) * inverseDistance; 784 fraction2 = (startDistance - EPSILON) * inverseDistance; 785 } else { 786 side = 0; // front 787 fraction1 = 1.0f; 788 fraction2 = 0.0f; 789 } 790 791 // STEP 2: make sure the numbers are valid 792 if (fraction1 < 0.0f) fraction1 = 0.0f; 793 else if (fraction1 > 1.0f) fraction1 = 1.0f; 794 if (fraction2 < 0.0f) fraction2 = 0.0f; 795 else if (fraction2 > 1.0f) fraction2 = 1.0f; 796 797 // STEP 3: calculate the middle point for the first side 798 middleFraction = startFraction + 799 (endFraction - startFraction) * fraction1; 800 801 middle.x = start->x + fraction1 * (end->x - start->x); 802 middle.y = start->y + fraction1 * (end->y - start->y); 803 middle.z = start->z + fraction1 * (end->z - start->z); 804 805 // STEP 4: check the first side 806 //CheckNode( node->children[side], startFraction, middleFraction, start, middle ); 807 if(side == 0) this->checkCollisionRayN(node->left,startFraction, middleFraction, start, &middle ); 808 809 else this->checkCollisionRayN(node->right,startFraction, middleFraction, 810 start, &middle ); 811 812 // STEP 5: calculate the middle point for the second side 813 middleFraction = startFraction + 814 (endFraction - startFraction) * fraction2; 815 816 middle.x = start->x + fraction2 * (end->x - start->x); 817 middle.y = start->y + fraction2 * (end->y - start->y); 818 middle.z = start->z + fraction2 * (end->z - start->z); 819 820 // STEP 6: check the second side 821 if(side == 1)this->checkCollisionRayN(node->left,middleFraction, endFraction, &middle, end); 822 823 else this->checkCollisionRayN(node->right,middleFraction, endFraction,&middle, end ); 824 825 826 } 827 828 } 829 606 830 void BspManager::checkCollision(WorldEntity* worldEntity) 607 831 { 608 //return;832 return; 609 833 610 834 Vector position = worldEntity->getAbsCoor(); … … 623 847 Vector out = Vector(-1875.0,-1875.0,-1875.0); 624 848 if(!worldEntity->isA(CL_PLAYABLE)) { 849 850 851 852 625 853 } 626 854 else { … … 634 862 Vector out2; 635 863 636 this->checkCollisionRay (this->root,0.0f,1.0f, &position1, &dest1 );864 this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 ); 637 865 if(this->outputFraction == 1.0f) out1 = dest; 638 866 else { … … 644 872 } 645 873 646 this->checkCollisionRay (this->root,0.0f,1.0f, &position2, &dest2 );874 this->checkCollisionRayN(this->root,0.0f,1.0f, &position2, &dest2 ); 647 875 if(this->outputFraction == 1.0f) out2= dest; 648 876 else … … 655 883 } 656 884 657 this->checkCollisionRay (this->root,0.0f,1.0f, &position, &dest );885 this->checkCollisionRayN(this->root,0.0f,1.0f, &position, &dest ); 658 886 if(this->outputFraction == 1.0f) out = dest; 659 887 else … … 664 892 out.z = position.z + (dest.z -position.z) * this->outputFraction; 665 893 666 Vector out3 = out + Vector(3*this->collPlane->x,3*this->collPlane->y,3*this->collPlane->z);667 this->out = out;668 this->out1 = out1;669 this->out2 = out2;894 //Vector out3 = out + Vector(3*this->collPlane->x,3*this->collPlane->y,3*this->collPlane->z); 895 //this->out = out; 896 //this->out1 = out1; 897 //this->out2 = out2; 670 898 //this->drawDebugCube(&out1); 671 899 //this->drawDebugCube(&out2); … … 675 903 } 676 904 677 // if(collision) worldEntity->collidesWithGround(out,out1,out2); 905 // Return the normal here: Normal's stored in this->collPlane; 906 if(collision) worldEntity->collidesWithGround(out,out1,out2); 678 907 679 908 } -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.h
r8030 r8081 11 11 ### File Specific: 12 12 main-programmer: bottac@ee.ethz.ch 13 14 Inspired by: 15 Rendering Q3 Maps by Morgan McGuire http://graphics.cs.brown.edu/games/quake/quake3.html 16 Unofficial Quake 3 Map Specs by Kekoa Proudfoot http://graphics.stanford.edu/~kekoa/q3/ 17 18 Collision detection adapted from: 19 Quake 3 Collision Detection by Nathan Ostgard http://www.devmaster.net/articles/quake3collision/ 13 20 */ 14 21 15 22 #include <vector> 16 23 #include <deque> 17 18 24 19 25 // FORWARD DECLARATIONS … … 29 35 class WorldEntity; 30 36 37 struct BspCollisionEvent 38 { 39 Vector normal; //!< normal Vector, length 1 40 Vector place; //!< Absoloute coordinates of collision 41 }; 42 31 43 class BspManager 32 44 { … … 34 46 // Constructors 35 47 BspManager(); 48 49 BspManager(const char* fileName, float scale = 0.4f); 50 void load(const char* fileName, float scale); 36 51 37 52 // Functions 38 void draw();53 const void draw(); 39 54 void draw_debug_face(int Face); 40 55 void draw_face(int Face); 41 56 void draw_patch(face* Face); 57 42 58 43 59 void checkCollision(WorldEntity* worldEntity); … … 48 64 void checkCollision(BspTreeNode* node, Vector* cam); 49 65 void checkCollisionRay(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 66 void checkCollisionRayN(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 50 67 void checkBrushRay(brush* curBrush); 68 void checkBrushRayN(brush* curBrush); 51 69 void drawDebugCube(Vector* cam); 52 70 bool isAlreadyVisible(int Face); -
branches/bsp_model/src/world_entities/WorldEntities.am
r7167 r8081 15 15 world_entities/test_entity.cc \ 16 16 world_entities/planet.cc \ 17 world_entities/bsp_entity.cc \ 17 18 \ 18 19 world_entities/weapons/test_gun.cc \ … … 65 66 test_entity.h \ 66 67 planet.h \ 68 bsp_entity.h \ 67 69 \ 68 70 weapons/test_gun.h \ -
branches/bsp_model/src/world_entities/bsp_entity.cc
r7540 r8081 14 14 */ 15 15 16 #include " proto_world_entity.h"17 16 #include "bsp_entity.h" 17 #include "util/loading/resource_manager.h" 18 18 using namespace std; 19 19 20 20 CREATE_FACTORY(BSPEntity, CL_BSP_ENTITY); 21 21 /** 22 * constructs and loads a ProtoWorldEntity from a XML-element22 * constructs and loads a BSPEntity from a XML-element 23 23 * @param root the XML-element to load from 24 24 */ 25 ProtoWorldEntity::ProtoWorldEntity(const TiXmlElement* root)25 BSPEntity::BSPEntity(const TiXmlElement* root) 26 26 { 27 27 this->init(); … … 34 34 * standard deconstructor 35 35 */ 36 ProtoWorldEntity::~ProtoWorldEntity ()36 BSPEntity::~BSPEntity () 37 37 { 38 38 39 39 } 40 40 41 void BSPEntity::setName(const std::string& name) 42 { 43 printf("+++++++++++ LOADING NAME %s\n", name.c_str()); 44 45 this->bspManager->load(name.c_str(), 0.1f); 46 } 47 48 41 49 42 50 /** 43 * initializes the ProtoWorldEntity51 * initializes the BSPEntity 44 52 * @todo change this to what you wish 45 53 */ 46 void ProtoWorldEntity::init()54 void BSPEntity::init() 47 55 { 48 this->setClassID(CL_PROTO_WORLD_ENTITY, "ProtoWorldEntity"); 56 this->bspManager = new BspManager(); 57 this->setClassID(CL_BSP_ENTITY, "BSPEntity"); 49 58 59 this->toList(OM_ENVIRON); 60 50 61 /** 51 * @todo: Write CL_ PROTO_WORLD_ENTITY INTO THE src/defs/class_id.h (your own definition)62 * @todo: Write CL_BSP_ENTITY INTO THE src/defs/class_id.h (your own definition) 52 63 */ 53 64 … … 56 67 57 68 /** 58 * loads a ProtoWorldEntity from a XML-element69 * loads a BSPEntity from a XML-element 59 70 * @param root the XML-element to load from 60 71 * @todo make the class Loadable 61 72 */ 62 void ProtoWorldEntity::loadParams(const TiXmlElement* root)73 void BSPEntity::loadParams(const TiXmlElement* root) 63 74 { 64 75 // all the clases this Entity is directly derived from must be called in this way, to load all settings. 65 WorldEntity::loadParam(root); 76 // WorldEntity::loadParam(root); 77 78 LoadParam(root, "Name", this, BSPEntity, setName) 79 .describe("Sets the of the BSP file."); 66 80 81 /* LoadParam(root, "Scale", this, BSpEntity, setScale) 82 .describe("Sets the scale factore of the bsp level."); 83 */ 67 84 68 85 /** … … 73 90 74 91 /** 75 * advances the ProtoWorldEntity about time seconds92 * advances the BSPEntity about time seconds 76 93 * @param time the Time to step 77 94 */ 78 ProtoWorldEntity::tick(float time)95 void BSPEntity::tick(float time) 79 96 { 80 97 81 98 } 82 99 100 83 101 /** 84 102 * draws this worldEntity 85 103 */ 86 void ProtoWorldEntity::draw () const104 void BSPEntity::draw () const 87 105 { 88 glMatrixMode(GL_MODELVIEW); 89 glPushMatrix(); 90 float matrix[4][4]; 91 92 /* translate */ 93 glTranslatef (this->getAbsCoor ().x, 94 this->getAbsCoor ().y, 95 this->getAbsCoor ().z); 96 /* rotate */ 97 this->getAbsDir().matrix(matrix); 98 glMultMatrixf((float*)matrix); 99 100 if (model) 101 model->draw(); 102 glPopMatrix(); 106 this->bspManager->draw(); 103 107 } 104 108 … … 108 112 * 109 113 */ 110 void ProtoWorldEntity::collidesWith (WorldEntity* entity, const Vector& location)114 void BSPEntity::collidesWith (WorldEntity* entity, const Vector& location) 111 115 { 112 116 -
branches/bsp_model/src/world_entities/bsp_entity.h
r7540 r8081 1 1 /*! 2 * @file proto_world_entity.h2 * @file bsp_entity.h 3 3 * @brief description 4 4 */ 5 5 6 #ifndef _ PROTO_WORLD_ENTITY_H7 #define _ PROTO_WORLD_ENTITY_H6 #ifndef _BSP_ENTITY_H 7 #define _BSP_ENTITY_H 8 8 9 9 #include "world_entity.h" 10 #include "bsp_manager.h" 11 12 #include "util/loading/factory.h" 13 #include "util/loading/load_param.h" 14 15 10 16 11 17 //! A Class to ... 12 class ProtoWorldEntity : public WorldEntity18 class BSPEntity : public WorldEntity 13 19 { 14 20 15 21 public: 16 ProtoWorldEntity(const TiXmlElement* root = NULL);17 virtual ~ ProtoWorldEntity();22 BSPEntity(const TiXmlElement* root = NULL); 23 virtual ~BSPEntity(); 18 24 19 25 virtual void loadParams(const TiXmlElement* root); 26 27 void setName(const std::string& name); 28 20 29 void init(); 21 22 virtual void postSpawn ();23 virtual void leftWorld ();24 25 30 26 31 virtual void draw() const; … … 29 34 30 35 private: 36 BspManager* bspManager; 31 37 32 38 }; 33 39 34 #endif /* _ PROTO_WORLD_ENTITY_H */40 #endif /* _BSP_ENTITY_H */ -
branches/bsp_model/src/world_entities/terrain.cc
r7352 r8081 117 117 118 118 this->bspManager = new BspManager(); 119 this->bspManager->load("test.bsp", 0.4); 119 120 //this->loadTexture("maps/wall1.jpeg"); 120 121 } … … 208 209 // Vector tmpRot = this->getAbsDir().getSpacialAxis(); 209 210 //glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z ); 210 /* 211 211 212 if (this->objectList) 212 213 glCallList(this->objectList); … … 226 227 } 227 228 228 */ 229 230 this->bspManager->draw();229 230 231 // this->bspManager->draw(); 231 232 glPopMatrix(); 232 233
Note: See TracChangeset
for help on using the changeset viewer.