Changeset 7944 in orxonox.OLD for branches/cr/src/lib
- Timestamp:
- May 29, 2006, 12:02:04 AM (19 years ago)
- Location:
- branches/cr/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/cr/src/lib/collision_detection/obb_tree_node.cc
r7736 r7944 506 506 (treeNode->nodeRight == NULL || treeNode->nodeLeft == NULL)) ) 507 507 { 508 nodeA->collidesWith(nodeB, treeNode->bvElement->center); 509 nodeB->collidesWith(nodeA, this->bvElement->center); 508 // nodeA->collidesWith(nodeB, treeNode->bvElement->center); 509 // nodeB->collidesWith(nodeA, this->bvElement->center); 510 nodeA->registerCollision(nodeA, nodeB, (BoundingVolume*)this->bvElement, (BoundingVolume*)treeNode->bvElement); 510 511 } 511 512 -
branches/cr/src/lib/collision_reaction/cr_engine.cc
r7940 r7944 57 57 Collision* collisions = new Collision[CR_MAX_COLLISIONS]; 58 58 for( int i = 0; i < CR_MAX_COLLISIONS; i++) 59 this->cachedCollisions.push_back( collisions[i]);59 this->cachedCollisions.push_back(&collisions[i]); 60 60 } 61 61 -
branches/cr/src/lib/collision_reaction/cr_engine.h
r7940 r7944 50 50 bool unsubscribeReaction(CollisionHandle* collisionHandle); 51 51 52 53 52 void handleCollisions(); 54 53 55 54 /** @returns an instance to a collision object. instead of creating new object this ones can be resycled */ 56 inline Collision* getCollisionObject() { /* return the first element of the cache list*/}55 inline Collision* popCollisionObject() { if(!this->cachedCollisions.empty()) { this->cachedCollisions.back(); this->cachedCollisions.pop_back();} else return NULL; } 57 56 /** @param collision: returns the Collision object back to the cache list */ 58 inline void pu tCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); }57 inline void pushCollisionObject(Collision* collision) { this->cachedCollisions.push_back(collision); } 59 58 60 59
Note: See TracChangeset
for help on using the changeset viewer.