Panda3D
 All Classes Functions Variables Enumerations
bulletManifoldPoint.cxx
1 // Filename: bulletManifoldPoint.cxx
2 // Created by: enn0x (07Mar10)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "bulletManifoldPoint.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: BulletManifoldPoint::Constructor
19 // Access: Public
20 // Description:
21 ////////////////////////////////////////////////////////////////////
22 BulletManifoldPoint::
23 BulletManifoldPoint(btManifoldPoint &pt)
24  : _pt(pt) {
25 
26 }
27 
28 ////////////////////////////////////////////////////////////////////
29 // Function: BulletManifoldPoint::Copy Constructor
30 // Access: Public
31 // Description:
32 ////////////////////////////////////////////////////////////////////
33 BulletManifoldPoint::
34 BulletManifoldPoint(const BulletManifoldPoint &other)
35  : _pt(other._pt) {
36 
37 }
38 
39 ////////////////////////////////////////////////////////////////////
40 // Function: BulletManifoldPoint::Copy Assignment
41 // Access: Public
42 // Description:
43 ////////////////////////////////////////////////////////////////////
44 BulletManifoldPoint& BulletManifoldPoint::
45 operator=(const BulletManifoldPoint& other) {
46 
47  this->_pt = other._pt;
48  return *this;
49 }
50 
51 ////////////////////////////////////////////////////////////////////
52 // Function: BulletManifoldPoint::get_lift_time
53 // Access: Published
54 // Description:
55 ////////////////////////////////////////////////////////////////////
56 int BulletManifoldPoint::
57 get_life_time() const {
58 
59  return _pt.getLifeTime();
60 }
61 
62 ////////////////////////////////////////////////////////////////////
63 // Function: BulletManifoldPoint::get_distance
64 // Access: Published
65 // Description:
66 ////////////////////////////////////////////////////////////////////
67 PN_stdfloat BulletManifoldPoint::
68 get_distance() const {
69 
70  return (PN_stdfloat)_pt.getDistance();
71 }
72 
73 ////////////////////////////////////////////////////////////////////
74 // Function: BulletManifoldPoint::get_applied_impulse
75 // Access: Published
76 // Description:
77 ////////////////////////////////////////////////////////////////////
78 PN_stdfloat BulletManifoldPoint::
79 get_applied_impulse() const {
80 
81  return (PN_stdfloat)_pt.getAppliedImpulse();
82 }
83 
84 ////////////////////////////////////////////////////////////////////
85 // Function: BulletManifoldPoint::get_position_world_on_a
86 // Access: Published
87 // Description:
88 ////////////////////////////////////////////////////////////////////
89 LPoint3 BulletManifoldPoint::
90 get_position_world_on_a() const {
91 
92  return btVector3_to_LPoint3(_pt.getPositionWorldOnA());
93 }
94 
95 ////////////////////////////////////////////////////////////////////
96 // Function: BulletManifoldPoint::get_position_world_on_b
97 // Access: Published
98 // Description:
99 ////////////////////////////////////////////////////////////////////
100 LPoint3 BulletManifoldPoint::
101 get_position_world_on_b() const {
102 
103  return btVector3_to_LPoint3(_pt.getPositionWorldOnB());
104 }
105 
106 ////////////////////////////////////////////////////////////////////
107 // Function: BulletManifoldPoint::get_normal_world_on_b
108 // Access: Published
109 // Description:
110 ////////////////////////////////////////////////////////////////////
111 LPoint3 BulletManifoldPoint::
112 get_normal_world_on_b() const {
113 
114  return btVector3_to_LPoint3(_pt.m_normalWorldOnB);
115 }
116 
117 ////////////////////////////////////////////////////////////////////
118 // Function: BulletManifoldPoint::get_local_point_a
119 // Access: Published
120 // Description:
121 ////////////////////////////////////////////////////////////////////
122 LPoint3 BulletManifoldPoint::
123 get_local_point_a() const {
124 
125  return btVector3_to_LPoint3(_pt.m_localPointA);
126 }
127 
128 ////////////////////////////////////////////////////////////////////
129 // Function: BulletManifoldPoint::get_local_point_b
130 // Access: Published
131 // Description:
132 ////////////////////////////////////////////////////////////////////
133 LPoint3 BulletManifoldPoint::
134 get_local_point_b() const {
135 
136  return btVector3_to_LPoint3(_pt.m_localPointB);
137 }
138 
139 ////////////////////////////////////////////////////////////////////
140 // Function: BulletManifoldPoint::get_part_id0
141 // Access: Published
142 // Description:
143 ////////////////////////////////////////////////////////////////////
144 int BulletManifoldPoint::
145 get_part_id0() const {
146 
147  return _pt.m_partId0;
148 }
149 
150 ////////////////////////////////////////////////////////////////////
151 // Function: BulletManifoldPoint::get_part_id1
152 // Access: Published
153 // Description:
154 ////////////////////////////////////////////////////////////////////
155 int BulletManifoldPoint::
156 get_part_id1() const {
157 
158  return _pt.m_partId1;
159 }
160 
161 ////////////////////////////////////////////////////////////////////
162 // Function: BulletManifoldPoint::get_index0
163 // Access: Published
164 // Description:
165 ////////////////////////////////////////////////////////////////////
166 int BulletManifoldPoint::
167 get_index0() const {
168 
169  return _pt.m_index0;
170 }
171 
172 ////////////////////////////////////////////////////////////////////
173 // Function: BulletManifoldPoint::get_index1
174 // Access: Published
175 // Description:
176 ////////////////////////////////////////////////////////////////////
177 int BulletManifoldPoint::
178 get_index1() const {
179 
180  return _pt.m_index1;
181 }
182 
This is a three-component point in space (as opposed to a three-component vector, which represents a ...
Definition: lpoint3.h:99