Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5026 in orxonox.OLD for orxonox/trunk/src/lib


Ignore:
Timestamp:
Aug 15, 2005, 8:30:28 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: changed and some missunderstandings in the BoundingVolume Class Interface and simplified them

Location:
orxonox/trunk/src/lib/collision_detection
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/collision_detection/bv_tree.h

    r4836 r5026  
    1616class BVTreeNode;
    1717class PNode;
     18class WorldEntity;
    1819
    1920typedef enum DrawMode
     
    4243
    4344  virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB) = NULL;
     45  virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2) = NULL;
    4446
    4547  virtual void drawBV(int depth, int drawMode) const = NULL;
  • orxonox/trunk/src/lib/collision_detection/cd_engine.cc

    r4968 r5026  
    6666void CDEngine::checkCollisions()
    6767{
    68   //this->checkCollisionObjects();
     68  this->checkCollisionObjects();
    6969  this->checkCollisionGround();
    7070}
     
    8686    {
    8787      PRINTF(3)("checking object %s against %s\n", entity1->getName(), entity2->getName());
    88       entity1->collideWith(entity2);
     88      //entity1->getOBBTree()->collideWith(entity1, entity2);
    8989      entity2 = iterator2->nextElement();
    9090    }
  • orxonox/trunk/src/lib/collision_detection/cd_engine.h

    r4924 r5026  
    1111#include "collision_defs.h"
    1212#include "abstract_model.h"
     13
    1314
    1415template<class T> class tList;
     
    3435//! The class representing the collision detection system of orxonox
    3536class CDEngine : public BaseObject {
     37
     38  friend class WorldEntity;
    3639
    3740 public:
  • orxonox/trunk/src/lib/collision_detection/obb_tree.cc

    r4836 r5026  
    2222#include "compiler.h"
    2323#include "material.h"
     24#include "world_entity.h"
    2425#include "p_node.h"
    2526
     
    109110
    110111
     112void 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 */
    111124void OBBTree::collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB)
    112125{
  • orxonox/trunk/src/lib/collision_detection/obb_tree.h

    r4836 r5026  
    2929
    3030    virtual void collideWith(BVTree* tree, PNode* nodeA, PNode* nodeB);
     31    virtual void collideWith(WorldEntity* entity1, WorldEntity* entity2);
    3132
    3233    virtual void drawBV(int depth, int drawMode) const;
Note: See TracChangeset for help on using the changeset viewer.