Changeset 5029 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Aug 15, 2005, 9:17:09 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r5028 r5029 651 651 if( unlikely(this->nodeRight == NULL && this->nodeLeft == NULL)) 652 652 { 653 //nodeA->collidesWith() 653 nodeA->collidesWith(nodeB); 654 nodeB->collidesWith(nodeA); 654 655 } 655 656 } -
orxonox/trunk/src/subprojects/collision_detection/collision_detection.cc
r4903 r5029 82 82 83 83 // a = new TestEntity(); a->setName("Clown1"); 84 //b = new Environment(); b->setName("Jaeger");85 a = new Terrain();84 b = new Environment(); b->setName("Jaeger"); 85 // a = new Terrain(); 86 86 87 87 // b->setRelCoor(0.0, 0.0, -20.0); 88 88 // b->setRelDir(Quaternion(-M_PI/2.0f, Vector(0.0, 1.0, 0.0))); 89 89 90 entityList->add( a);90 entityList->add(b); 91 91 // entityList->add(b); 92 92 -
orxonox/trunk/src/world_entities/environment.cc
r4836 r5029 33 33 { 34 34 this->setClassID(CL_ENVIRONMENT, "Environment"); 35 this->model = (Model*)ResourceManager::getInstance()->load("models/ reaplow.obj"/*"worlds/vulcania.obj"*/, OBJ, RP_CAMPAIGN);35 this->model = (Model*)ResourceManager::getInstance()->load("models/bolido.obj", OBJ, RP_CAMPAIGN); 36 36 37 37 this->obbTree = new OBBTree(15, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount()); -
orxonox/trunk/src/world_entities/npc.cc
r4986 r5029 37 37 38 38 39 void NPC::collidesWith(WorldEntity* entity, const Vector& location) 40 { 39 41 40 /* define the reaction, if the ship is been hit */41 int NPC::hit()42 {43 die();44 return 0;45 42 } 43 46 44 47 45 void NPC::tick(float dt) … … 55 53 56 54 57 void NPC::die()58 {59 } -
orxonox/trunk/src/world_entities/npc.h
r4984 r5029 16 16 void addAI(AI* ai); 17 17 18 void tick(float dt); 19 int hit(); 20 void die(); 18 virtual void tick(float dt); 19 20 virtual void collidesWith (WorldEntity* entity, const Vector& location); 21 21 22 22 23 private: 23 /* position of the non player space craft */ 24 24 25 ; 25 26 -
orxonox/trunk/src/world_entities/world_entity.cc
r5026 r5029 103 103 void WorldEntity::collidesWith(WorldEntity* entity) 104 104 { 105 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity); 106 } 107 105 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);] 106 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName()); 107 } 108 109 110 /** 111 * this function is called, when two entities collide 112 * @param entity: the world entity with whom it collides 113 * 114 * Implement behaviour like damage application or other miscellaneous collision stuff in this function 115 */ 116 void WorldEntity::collidesWith(WorldEntity* entity, const Vector& location) 117 { 118 //this->obbTree->collideWith(entity->obbTree, (PNode*)this, (PNode*)entity);] 119 PRINTF(0)("COLLISION ---------------------------- with object: %s\n", entity->getName()); 120 } 108 121 109 122 /** -
orxonox/trunk/src/world_entities/world_entity.h
r5026 r5029 52 52 virtual void hit (WorldEntity* weapon, Vector* loc); 53 53 virtual void collidesWith (WorldEntity* entity); 54 virtual void collidesWith (WorldEntity* entity, const Vector& location); 54 55 55 56 /** @returns the Count of Faces on this WorldEntity */
Note: See TracChangeset
for help on using the changeset viewer.