Panda3D

bulletContactResult.I

00001 // Filename: bulletContactResult.I
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 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: BulletContactResult::get_node0
00018 //       Access: Published
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE PandaNode *BulletContact::
00022 get_node0() const {
00023 
00024   return _obj0 ? (PandaNode *)_obj0->getUserPointer() : NULL;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: BulletContactResult::get_node1
00029 //       Access: Published
00030 //  Description:
00031 ////////////////////////////////////////////////////////////////////
00032 INLINE PandaNode *BulletContact::
00033 get_node1() const {
00034 
00035   return _obj1 ? (PandaNode *)_obj1->getUserPointer() : NULL;
00036 }
00037 
00038 ////////////////////////////////////////////////////////////////////
00039 //     Function: BulletContactResult::get_manifold_point
00040 //       Access: Published
00041 //  Description:
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE const BulletManifoldPoint *BulletContact::
00044 get_manifold_point() const {
00045 
00046   return new BulletManifoldPoint(*_mp);
00047 }
00048 
00049 ////////////////////////////////////////////////////////////////////
00050 //     Function: BulletContactResult::get_idx0
00051 //       Access: Published
00052 //  Description:
00053 ////////////////////////////////////////////////////////////////////
00054 INLINE const int BulletContact::
00055 get_idx0() const {
00056 
00057   return _idx0;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: BulletContactResult::get_idx1
00062 //       Access: Published
00063 //  Description:
00064 ////////////////////////////////////////////////////////////////////
00065 INLINE const int BulletContact::
00066 get_idx1() const {
00067 
00068   return _idx1;
00069 }
00070 
00071 ////////////////////////////////////////////////////////////////////
00072 //     Function: BulletContactResult::get_part_id0
00073 //       Access: Published
00074 //  Description:
00075 ////////////////////////////////////////////////////////////////////
00076 INLINE const int BulletContact::
00077 get_part_id0() const {
00078 
00079   return _part_id0;
00080 }
00081 
00082 ////////////////////////////////////////////////////////////////////
00083 //     Function: BulletContactResult::get_part_id1
00084 //       Access: Published
00085 //  Description:
00086 ////////////////////////////////////////////////////////////////////
00087 INLINE const int BulletContact::
00088 get_part_id1() const {
00089 
00090   return _part_id1;
00091 }
00092 
00093 ////////////////////////////////////////////////////////////////////
00094 //     Function: BulletContactResult::get_num_contacts
00095 //       Access: Published
00096 //  Description:
00097 ////////////////////////////////////////////////////////////////////
00098 INLINE int BulletContactResult::
00099 get_num_contacts() const {
00100 
00101   return _contacts.size();
00102 }
00103 
00104 ////////////////////////////////////////////////////////////////////
00105 //     Function: BulletContactResult::get_contact
00106 //       Access: Published
00107 //  Description:
00108 ////////////////////////////////////////////////////////////////////
00109 INLINE const BulletContact &BulletContactResult::
00110 get_contact(int idx) const {
00111 
00112   nassertr(idx >= 0 && idx < (int)_contacts.size(), _empty);
00113   return _contacts[idx];
00114 }
00115 
 All Classes Functions Variables Enumerations