Panda3D
|
00001 // Filename: bulletContactResult.cxx 00002 // Created by: enn0x (08Mar10) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "bulletContactResult.h" 00016 00017 BulletContact BulletContactResult::_empty; 00018 00019 //////////////////////////////////////////////////////////////////// 00020 // Function: BulletContactResult::Constructor 00021 // Access: Protected 00022 // Description: 00023 //////////////////////////////////////////////////////////////////// 00024 BulletContactResult:: 00025 BulletContactResult() : btCollisionWorld::ContactResultCallback() { 00026 00027 } 00028 00029 //////////////////////////////////////////////////////////////////// 00030 // Function: BulletContactResult::addSingleResult 00031 // Access: Published 00032 // Description: 00033 //////////////////////////////////////////////////////////////////// 00034 btScalar BulletContactResult:: 00035 addSingleResult(btManifoldPoint &mp, 00036 const btCollisionObject *obj0, int part_id0, int idx0, 00037 const btCollisionObject *obj1, int part_id1, int idx1) { 00038 00039 00040 BulletContact contact; 00041 00042 contact._mp = ∓ 00043 contact._obj0 = obj0; 00044 contact._obj1 = obj1; 00045 contact._part_id0 = part_id0; 00046 contact._part_id1 = part_id1; 00047 contact._idx0 = idx0; 00048 contact._idx1 = idx1; 00049 00050 _contacts.push_back(contact); 00051 00052 return 1.0f; 00053 } 00054