Changeset 8213 in orxonox.OLD for branches/bsp_model/src/lib/graphics/importer
- Timestamp:
- Jun 7, 2006, 9:06:41 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_manager.cc
r8204 r8213 77 77 void BspManager::load(const char* fileName, float scale) 78 78 { 79 //this->setClassID(CL_BSP_MODEL, "BspManager");79 this->setClassID(CL_BSP_MODEL, "BspManager"); 80 80 // open a BSP file 81 81 this->bspFile = new BspFile(); -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.h
r8195 r8213 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/ … … 22 22 #include <vector> 23 23 #include <deque> 24 25 #include "base_object.h" 24 26 25 27 // FORWARD DECLARATIONS … … 41 43 }; 42 44 43 class BspManager 45 class BspManager : public BaseObject 44 46 { 45 47 public: 46 48 // Constructors 47 49 BspManager(); 48 50 49 51 BspManager(const char* fileName, float scale = 0.4f); 50 52 void load(const char* fileName, float scale); … … 53 55 const void draw(); 54 56 const void tick(float time); 55 void draw_debug_face(int Face); 57 void draw_debug_face(int Face); 56 58 void draw_face(int Face); 57 59 void draw_patch(face* Face); 58 60 59 61 60 62 void checkCollision(WorldEntity* worldEntity); /*!< WorldEntities use this function to check wheter they collided with the BSPEntity. … … 65 67 BspTreeNode* getLeaf(BspTreeNode* node, Vector* cam) ; //!< Traverses the tree 66 68 void checkCollision(BspTreeNode* node, Vector* cam); //!< Obsolete. Use this function for debugging only! 67 void checkCollisionRay(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 69 void checkCollisionRay(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 68 70 void checkCollisionRayN(BspTreeNode * node,float startFraction, float endFraction, Vector* start, Vector* end); 69 71 void TraceBox( Vector& inputStart, Vector& inputEnd,Vector& inputMins, Vector& inputMaxs ); … … 74 76 bool isAlreadyVisible(int Face); 75 77 void addFace(int Face); 76 78 77 79 // Data 78 80 BspFile* bspFile; … … 83 85 plane* collPlane; 84 86 int lastTex; 85 87 86 88 //obsolete: global variables for collision detection 87 89 bool outputStartsOut; … … 90 92 Vector traceMins; //!< Mins of current bbox 91 93 Vector traceMaxs; //!< Maxs of current bbox 92 Vector traceExtents; /*!< Stores the maximum of the absolute value of each axis in the box. 94 Vector traceExtents; /*!< Stores the maximum of the absolute value of each axis in the box. 93 95 For example, if traceMins was (-100,-3,-15) and traceMaxs was (55,22,7), traceExtents */ 94 95 96 97 96 98 bool * alreadyVisible; 97 99 // Deques to store the visible faces … … 100 102 101 103 Vector out; //!< For debugging only 102 Vector out1; //!< For debugging only 104 Vector out1; //!< For debugging only 103 105 Vector out2; //!< For debugging only 104 106 };
Note: See TracChangeset
for help on using the changeset viewer.