Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6922 in orxonox.OLD for branches/current_cd


Ignore:
Timestamp:
Jan 31, 2006, 11:09:15 PM (19 years ago)
Author:
patrick
Message:

cd: changed the cd interface again

Location:
branches/current_cd/src/lib/collision_detection
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/current_cd/src/lib/collision_detection/bv_tree_node.h

    r6911 r6922  
    3535
    3636  virtual void spawnBVTree(const modelInfo& modInfo, const int* triangleIndexes, int length) = 0;
    37   virtual void collideWith(const BVTreeNode& treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = 0;
     37  virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB) = 0;
    3838  virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const = 0;
    3939
  • branches/current_cd/src/lib/collision_detection/obb_tree.cc

    r6911 r6922  
    9595{
    9696  if( likely(entity2->getOBBTree() != NULL) )
    97     this->rootNode->collideWith(*(((OBBTree*)entity2->getOBBTree())->getRootNode()), entity1, entity2);
     97    this->rootNode->collideWith(((OBBTree*)entity2->getOBBTree())->getRootNode(), entity1, entity2);
    9898}
    9999
  • branches/current_cd/src/lib/collision_detection/obb_tree.h

    r6911 r6922  
    3434    inline const int getID() { return ++this->id;}
    3535    /** returns the root node of the bounding volume tree @return reference to the root node */
    36     inline const OBBTreeNode* getRootNode() const { return this->rootNode; }
     36    inline OBBTreeNode* getRootNode() const { return this->rootNode; }
    3737
    3838    void debug();
  • branches/current_cd/src/lib/collision_detection/obb_tree_node.cc

    r6921 r6922  
    517517void OBBTreeNode::collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB)
    518518{
    519   if( unlikely(treeNode == 1))
     519  if( unlikely(treeNode == NULL))
    520520    return;
    521521
    522522  PRINTF(3)("collideWith\n");
    523523  /* if the obb overlap, make subtests: check which node is realy overlaping  */
    524   PRINTF(3)("Checking OBB %i vs %i: ", this->getIndex(), treeNode.getIndex());
     524  PRINTF(3)("Checking OBB %i vs %i: ", this->getIndex(), treeNode->getIndex());
    525525  //   if( unlikely(treeNode == NULL)) return;
    526526
     
    533533    if( likely( this->nodeLeft != NULL))
    534534    {
    535       PRINTF(3)("Checking OBB %i vs %i: ", this->nodeLeft->getIndex(), treeNode.getIndex());
     535      PRINTF(3)("Checking OBB %i vs %i: ", this->nodeLeft->getIndex(), treeNode->getIndex());
    536536      if( this->overlapTest(*this->nodeLeft->bvElement, *(((const OBBTreeNode*)&treeNode)->bvElement), nodeA, nodeB))
    537537      {
    538         this->nodeLeft->collideWith(*(((const OBBTreeNode*)&treeNode)->nodeLeft), nodeA, nodeB);
    539         this->nodeLeft->collideWith(*(((const OBBTreeNode*)&treeNode)->nodeRight), nodeA, nodeB);
     538        this->nodeLeft->collideWith((((const OBBTreeNode*)treeNode)->nodeLeft), nodeA, nodeB);
     539        this->nodeLeft->collideWith((((const OBBTreeNode*)treeNode)->nodeRight), nodeA, nodeB);
    540540      }
    541541    }
     
    543543    if( likely( this->nodeRight != NULL))
    544544    {
    545       PRINTF(3)("Checking OBB %i vs %i: ", this->nodeRight->getIndex(), treeNode.getIndex());
     545      PRINTF(3)("Checking OBB %i vs %i: ", this->nodeRight->getIndex(), treeNode->getIndex());
    546546      if(this->overlapTest(*this->nodeRight->bvElement, *(((const OBBTreeNode*)&treeNode)->bvElement), nodeA, nodeB))
    547547      {
    548         this->nodeRight->collideWith(*(((const OBBTreeNode*)&treeNode)->nodeLeft), nodeA, nodeB);
    549         this->nodeRight->collideWith(*(((const OBBTreeNode*)&treeNode)->nodeRight), nodeA, nodeB);
     548        this->nodeRight->collideWith((((const OBBTreeNode*)treeNode)->nodeLeft), nodeA, nodeB);
     549        this->nodeRight->collideWith((((const OBBTreeNode*)treeNode)->nodeRight), nodeA, nodeB);
    550550      }
    551551    }
  • branches/current_cd/src/lib/collision_detection/obb_tree_node.h

    r6911 r6922  
    3232    virtual void spawnBVTree(const modelInfo& modelInf, const int* triangleIndexes, int length);
    3333
    34     virtual void collideWith(const BVTreeNode& treeNode, WorldEntity* nodeA, WorldEntity* nodeB);
     34    virtual void collideWith(BVTreeNode* treeNode, WorldEntity* nodeA, WorldEntity* nodeB);
    3535    virtual void drawBV(int depth, int drawMode, const Vector& color = Vector(1,0,0), bool top = true) const;
    3636    void debug() const;
Note: See TracChangeset for help on using the changeset viewer.