Changeset 9172 in orxonox.OLD for branches/presentation/src/lib
- Timestamp:
- Jul 4, 2006, 9:45:39 PM (18 years ago)
- Location:
- branches/presentation/src/lib/collision_detection
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/collision_detection/obb_tree.cc
r8316 r9172 41 41 42 42 43 /** 44 * standard constructor 45 */ 46 OBBTree::OBBTree() 47 : BVTree() 48 {} 49 43 50 44 51 void OBBTree::init() … … 78 85 79 86 this->rootNode->spawnBVTree(modelInf, triangleIndexes, modelInf.numTriangles); 87 } 88 89 90 void OBBTree::createBox(Vector start, Vector end) 91 { 92 this->rootNode = new OBBTreeNode(*this, NULL, 11); 93 94 this->rootNode->createBox(start, end); 80 95 } 81 96 -
branches/presentation/src/lib/collision_detection/obb_tree.h
r7711 r9172 23 23 public: 24 24 OBBTree(int depth, const modelInfo* modInfo, WorldEntity* entity); 25 OBBTree(); 25 26 virtual ~OBBTree(); 26 27 void init(); … … 28 29 virtual void spawnBVTree(const modelInfo& modelInf); 29 30 virtual void flushTree(); 31 32 void createBox(Vector start, Vector end); 30 33 31 34 virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2); -
branches/presentation/src/lib/collision_detection/obb_tree_node.cc
r9008 r9172 90 90 delete this->bvElement; 91 91 } 92 93 94 95 void OBBTreeNode::createBox(Vector start, Vector end) 96 { 97 98 this->bvElement = new OBB(); 99 this->nodeLeft = NULL; 100 this->nodeRight = NULL; 101 102 this->bvElement->center = (end - start) * 0.5f; 103 this->bvElement->halfLength[0] = (end.x - start.x) * 0.5f; 104 this->bvElement->halfLength[1] = (end.y - start.y) * 0.5f; 105 this->bvElement->halfLength[2] = (end.z - start.z) * 0.5f; 106 } 107 92 108 93 109 … … 682 698 if( depth == 0/*!(drawMode & DRAW_SINGLE && depth != 0)*/) 683 699 { 684 if( 1/*drawMode & DRAW_POINTS*/)700 if( 0 /*drawMode & DRAW_POINTS*/) 685 701 { 686 702 glBegin(GL_POINTS); -
branches/presentation/src/lib/collision_detection/obb_tree_node.h
r7732 r9172 31 31 32 32 virtual void spawnBVTree(const modelInfo& modelInf, const int* triangleIndexes, int length); 33 void createBox(Vector start, Vector end); 33 34 34 35 virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB);
Note: See TracChangeset
for help on using the changeset viewer.