00001 // Filename: bulletManifoldPoint.cxx 00002 // Created by: enn0x (07Mar10) 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 "bulletManifoldPoint.h" 00016 00017 //////////////////////////////////////////////////////////////////// 00018 // Function: BulletManifoldPoint::Constructor 00019 // Access: Public 00020 // Description: 00021 //////////////////////////////////////////////////////////////////// 00022 BulletManifoldPoint:: 00023 BulletManifoldPoint(btManifoldPoint &pt) : _pt(pt) { 00024 00025 } 00026 00027 //////////////////////////////////////////////////////////////////// 00028 // Function: BulletManifoldPoint::get_lift_time 00029 // Access: Published 00030 // Description: 00031 //////////////////////////////////////////////////////////////////// 00032 int BulletManifoldPoint:: 00033 get_lift_time() const { 00034 00035 return _pt.getLifeTime(); 00036 } 00037 00038 //////////////////////////////////////////////////////////////////// 00039 // Function: BulletManifoldPoint::get_distance 00040 // Access: Published 00041 // Description: 00042 //////////////////////////////////////////////////////////////////// 00043 PN_stdfloat BulletManifoldPoint:: 00044 get_distance() const { 00045 00046 return (PN_stdfloat)_pt.getDistance(); 00047 } 00048 00049 //////////////////////////////////////////////////////////////////// 00050 // Function: BulletManifoldPoint::get_applied_impulse 00051 // Access: Published 00052 // Description: 00053 //////////////////////////////////////////////////////////////////// 00054 PN_stdfloat BulletManifoldPoint:: 00055 get_applied_impulse() const { 00056 00057 return (PN_stdfloat)_pt.getAppliedImpulse(); 00058 } 00059 00060 //////////////////////////////////////////////////////////////////// 00061 // Function: BulletManifoldPoint::get_position_world_on_a 00062 // Access: Published 00063 // Description: 00064 //////////////////////////////////////////////////////////////////// 00065 LPoint3 BulletManifoldPoint:: 00066 get_position_world_on_a() const { 00067 00068 return btVector3_to_LPoint3(_pt.getPositionWorldOnA()); 00069 } 00070 00071 //////////////////////////////////////////////////////////////////// 00072 // Function: BulletManifoldPoint::get_position_world_on_b 00073 // Access: Published 00074 // Description: 00075 //////////////////////////////////////////////////////////////////// 00076 LPoint3 BulletManifoldPoint:: 00077 get_position_world_on_b() const { 00078 00079 return btVector3_to_LPoint3(_pt.getPositionWorldOnB()); 00080 } 00081 00082 //////////////////////////////////////////////////////////////////// 00083 // Function: BulletManifoldPoint::get_local_point_a 00084 // Access: Published 00085 // Description: 00086 //////////////////////////////////////////////////////////////////// 00087 LPoint3 BulletManifoldPoint:: 00088 get_local_point_a() const { 00089 00090 return btVector3_to_LPoint3(_pt.m_localPointA); 00091 } 00092 00093 //////////////////////////////////////////////////////////////////// 00094 // Function: BulletManifoldPoint::get_local_point_b 00095 // Access: Published 00096 // Description: 00097 //////////////////////////////////////////////////////////////////// 00098 LPoint3 BulletManifoldPoint:: 00099 get_local_point_b() const { 00100 00101 return btVector3_to_LPoint3(_pt.m_localPointB); 00102 } 00103 00104 //////////////////////////////////////////////////////////////////// 00105 // Function: BulletManifoldPoint::get_part_id0 00106 // Access: Published 00107 // Description: 00108 //////////////////////////////////////////////////////////////////// 00109 int BulletManifoldPoint:: 00110 get_part_id0() const { 00111 00112 return _pt.m_partId0; 00113 } 00114 00115 //////////////////////////////////////////////////////////////////// 00116 // Function: BulletManifoldPoint::get_part_id1 00117 // Access: Published 00118 // Description: 00119 //////////////////////////////////////////////////////////////////// 00120 int BulletManifoldPoint:: 00121 get_part_id1() const { 00122 00123 return _pt.m_partId1; 00124 } 00125 00126 //////////////////////////////////////////////////////////////////// 00127 // Function: BulletManifoldPoint::get_index0 00128 // Access: Published 00129 // Description: 00130 //////////////////////////////////////////////////////////////////// 00131 int BulletManifoldPoint:: 00132 get_index0() const { 00133 00134 return _pt.m_index0; 00135 } 00136 00137 //////////////////////////////////////////////////////////////////// 00138 // Function: BulletManifoldPoint::get_index1 00139 // Access: Published 00140 // Description: 00141 //////////////////////////////////////////////////////////////////// 00142 int BulletManifoldPoint:: 00143 get_index1() const { 00144 00145 return _pt.m_index1; 00146 } 00147