Changeset 5026 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Aug 15, 2005, 8:30:28 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/bv_tree.h
r4836 r5026 16 16 class BVTreeNode; 17 17 class PNode; 18 class WorldEntity; 18 19 19 20 typedef enum DrawMode … … 42 43 43 44 virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB) = NULL; 45 virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) = NULL; 44 46 45 47 virtual void drawBV(int depth, int drawMode) const = NULL; -
orxonox/trunk/src/lib/collision_detection/cd_engine.cc
r4968 r5026 66 66 void CDEngine::checkCollisions() 67 67 { 68 //this->checkCollisionObjects();68 this->checkCollisionObjects(); 69 69 this->checkCollisionGround(); 70 70 } … … 86 86 { 87 87 PRINTF(3)("checking object %s against %s\n", entity1->getName(), entity2->getName()); 88 entity1->collideWith(entity2);88 //entity1->getOBBTree()->collideWith(entity1, entity2); 89 89 entity2 = iterator2->nextElement(); 90 90 } -
orxonox/trunk/src/lib/collision_detection/cd_engine.h
r4924 r5026 11 11 #include "collision_defs.h" 12 12 #include "abstract_model.h" 13 13 14 14 15 template<class T> class tList; … … 34 35 //! The class representing the collision detection system of orxonox 35 36 class CDEngine : public BaseObject { 37 38 friend class WorldEntity; 36 39 37 40 public: -
orxonox/trunk/src/lib/collision_detection/obb_tree.cc
r4836 r5026 22 22 #include "compiler.h" 23 23 #include "material.h" 24 #include "world_entity.h" 24 25 #include "p_node.h" 25 26 … … 109 110 110 111 112 void OBBTree::collideWith(WorldEntity* entity1, WorldEntity* entity2) 113 { 114 this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), (PNode*)entity1, (PNode*)entity2); 115 } 116 117 118 /** 119 * this collides two bvtrees together. the trees are attached to pnodes Objects A and B 120 * @param tree: the other tree to collide with (Object B) 121 * @param nodeA: PNode of object A 122 * @param nodeB: Pnode of object B 123 */ 111 124 void OBBTree::collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB) 112 125 { -
orxonox/trunk/src/lib/collision_detection/obb_tree.h
r4836 r5026 29 29 30 30 virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB); 31 virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2); 31 32 32 33 virtual void drawBV(int depth, int drawMode) const; -
orxonox/trunk/src/world_entities/world_entity.cc
r4998 r5026 101 101 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 102 102 */ 103 void WorldEntity::collide With(WorldEntity* entity)103 void WorldEntity::collidesWith(WorldEntity* entity) 104 104 { 105 this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);105 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity); 106 106 } 107 107 -
orxonox/trunk/src/world_entities/world_entity.h
r4885 r5026 40 40 /** @returns true if the entity is visible, false otherwise */ 41 41 bool isVisible() const { return this->bVisible; }; 42 42 43 void setCharacterAttributes(CharacterAttributes* charAttr); 43 44 CharacterAttributes* getCharacterAttributes(); 45 46 /** @returns a reference to the obb tree of this worldentity */ 47 BVTree* getOBBTree() { return this->obbTree; } 44 48 45 49 virtual void postSpawn (); … … 47 51 48 52 virtual void hit (WorldEntity* weapon, Vector* loc); 49 virtual void collide With (WorldEntity* entity);53 virtual void collidesWith (WorldEntity* entity); 50 54 51 55 /** @returns the Count of Faces on this WorldEntity */
Note: See TracChangeset
for help on using the changeset viewer.