1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in
Show
Ignore:
Timestamp:
02/17/12 11:53:29 (15 months ago)
Author:
hikerstk
Message:

Removed unused function.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/src/physics/physics.cpp

    r10830 r10872  
    213213 
    214214//----------------------------------------------------------------------------- 
    215 /** Determines the side (left, front, ...) of a rigid body with a box  
    216  *  collision shape that has a given contact point. 
    217  *  \param body The rigid body (box shape). 
    218  *  \param contact_point The contact point (in local coordinates) of the  
    219  *         contact point. 
    220  */ 
    221 Physics::CollisionSide Physics::getCollisionSide(const btRigidBody *body, 
    222                                                  const Vec3 &contact_point) 
    223 { 
    224     if(contact_point.getX()>0) 
    225         return COL_RIGHT; 
    226     else 
    227         return COL_LEFT; 
    228  
    229     btVector3 aabb_min, aabb_max; 
    230     static btTransform zero_trans(btQuaternion(0, 0, 0)); 
    231     body->getCollisionShape()->getAabb(zero_trans, aabb_min, aabb_max); 
    232     btVector3 extend = 0.5f*(aabb_max - aabb_min); 
    233  
    234     CollisionSide result = COL_LEFT; 
    235     if(contact_point.getX()>0) // --> right side 
    236     { 
    237         if(contact_point.getZ()>0) // --> front or right side 
    238         { 
    239             result = fabsf(extend.getX() - contact_point.getX()) < 
    240                      fabsf(extend.getZ() - contact_point.getZ()) ? COL_RIGHT  
    241                                                                  : COL_FRONT;  
    242         } 
    243         else   // getZ()<0  --> back or right side 
    244         { 
    245             result = fabsf( extend.getX() - contact_point.getX()) < 
    246                      fabsf( extend.getZ() + contact_point.getZ()) ? COL_RIGHT  
    247                                                                   : COL_BACK;  
    248         } 
    249     } 
    250     else   // getX() < 0 --> left side 
    251     { 
    252         if(contact_point.getZ()>0) // --> front or left side 
    253         { 
    254             result = fabsf(extend.getX() + contact_point.getX()) < 
    255                      fabsf(extend.getZ() - contact_point.getZ()) ? COL_LEFT  
    256                                                                  : COL_FRONT;  
    257         } 
    258         else   // --> back or left side 
    259         { 
    260             result = fabsf(extend.getX() + contact_point.getX()) < 
    261                      fabsf(extend.getZ() + contact_point.getZ()) ? COL_LEFT  
    262                                                                  : COL_BACK;  
    263         } 
    264     } 
    265  
    266     return result; 
    267 }   // getCollisionSide 
    268  
    269 //----------------------------------------------------------------------------- 
    270215/** Handles the special case of two karts colliding with each other, which  
    271216 *  means that bombs must be passed on. If both karts have a bomb, they'll