Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7713 in orxonox.OLD for trunk/src/lib/collision_detection


Ignore:
Timestamp:
May 19, 2006, 12:44:16 AM (19 years ago)
Author:
patrick
Message:

trunk: removed some valgrind errors, but no serious ones. Thunder sound now works, found a bug in my old class. its absolete anyway with the atmoshperic engine

Location:
trunk/src/lib/collision_detection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/lib/collision_detection/cd_engine.h

    r7711 r7713  
    5656  void debug();
    5757
     58  /** @returns true if cd alg returns after detecting first error (default behavour) */
     59  inline bool isAbordOnFirstCollision() const { return this->bAbordOnFirstCollision; }
     60  /** sets @param flag true if the alg should return after detection of the first error */
     61  inline void setAbordOnFirstCollision(bool flag) { this->bAbordOnFirstCollision = flag; }
     62
    5863
    5964 private:
  • TabularUnified trunk/src/lib/collision_detection/obb_tree_node.cc

    r7711 r7713  
    522522    /* so there is a collision and this is the last box in the tree (i.e. leaf) */
    523523    /* FIXME: If we would choose || insead of && there would also be asymmetrical cases supported */
    524     if( unlikely(this->nodeRight == NULL && this->nodeLeft == NULL))
     524    if( unlikely(this->nodeRight == NULL || this->nodeLeft == NULL))
    525525    {
    526526      nodeA->collidesWith(nodeB, (((const OBBTreeNode*)&treeNode)->bvElement->center));
     
    542542
    543543  /* first check all axis */
    544   Vector t;
    545   float rA = 0.0f;
    546   float rB = 0.0f;
    547   Vector l;
    548   Vector rotAxisA[3];
    549   Vector rotAxisB[3];
     544  Vector      t;
     545  float       rA = 0.0f;
     546  float       rB = 0.0f;
     547  Vector      l;
     548  Vector      rotAxisA[3];
     549  Vector      rotAxisB[3];
    550550
    551551  rotAxisA[0] =  nodeA->getAbsDir().apply(boxA.axis[0]);
Note: See TracChangeset for help on using the changeset viewer.