1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
|
<html>
<head>
<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxContact.h Source File</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
<body bgcolor="#FFFFFF">
<div id="header">
<hr class="first">
<img alt="" src="images/PhysXlogo.png" align="middle"> <br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<a class="qindex" href="hierarchy.html">Class Hierarchy</a>
<a class="qindex" href="annotated.html">Compound List</a>
<a class="qindex" href="functions.html">Compound Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<h1>PxContact.h</h1><a href="PxContact_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
<a name="l00002"></a>00002 <span class="comment">// Redistribution and use in source and binary forms, with or without</span>
<a name="l00003"></a>00003 <span class="comment">// modification, are permitted provided that the following conditions</span>
<a name="l00004"></a>00004 <span class="comment">// are met:</span>
<a name="l00005"></a>00005 <span class="comment">// * Redistributions of source code must retain the above copyright</span>
<a name="l00006"></a>00006 <span class="comment">// notice, this list of conditions and the following disclaimer.</span>
<a name="l00007"></a>00007 <span class="comment">// * Redistributions in binary form must reproduce the above copyright</span>
<a name="l00008"></a>00008 <span class="comment">// notice, this list of conditions and the following disclaimer in the</span>
<a name="l00009"></a>00009 <span class="comment">// documentation and/or other materials provided with the distribution.</span>
<a name="l00010"></a>00010 <span class="comment">// * Neither the name of NVIDIA CORPORATION nor the names of its</span>
<a name="l00011"></a>00011 <span class="comment">// contributors may be used to endorse or promote products derived</span>
<a name="l00012"></a>00012 <span class="comment">// from this software without specific prior written permission.</span>
<a name="l00013"></a>00013 <span class="comment">//</span>
<a name="l00014"></a>00014 <span class="comment">// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY</span>
<a name="l00015"></a>00015 <span class="comment">// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<a name="l00016"></a>00016 <span class="comment">// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR</span>
<a name="l00017"></a>00017 <span class="comment">// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR</span>
<a name="l00018"></a>00018 <span class="comment">// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,</span>
<a name="l00019"></a>00019 <span class="comment">// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,</span>
<a name="l00020"></a>00020 <span class="comment">// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR</span>
<a name="l00021"></a>00021 <span class="comment">// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY</span>
<a name="l00022"></a>00022 <span class="comment">// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00023"></a>00023 <span class="comment">// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span>
<a name="l00024"></a>00024 <span class="comment">// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>
<a name="l00025"></a>00025 <span class="comment">//</span>
<a name="l00026"></a>00026 <span class="comment">// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.</span>
<a name="l00027"></a>00027 <span class="comment">// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.</span>
<a name="l00028"></a>00028 <span class="comment">// Copyright (c) 2001-2004 NovodeX AG. All rights reserved. </span>
<a name="l00029"></a>00029
<a name="l00030"></a>00030
<a name="l00031"></a>00031 <span class="preprocessor">#ifndef PX_CONTACT_H</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define PX_CONTACT_H</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="PxVec3_8h.html">foundation/PxVec3.h</a>"</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="PxAssert_8h.html">foundation/PxAssert.h</a>"</span>
<a name="l00036"></a>00036
<a name="l00037"></a>00037 <span class="preprocessor">#if !PX_DOXYGEN</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span><span class="keyword">namespace </span>physx
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040 <span class="preprocessor">#endif</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor">#if PX_VC</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(push)</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(disable: 4324) // Padding was added at the end of a structure because of a __declspec(align) value.</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a><a class="code" href="PxContact_8h.html#d7d63e592ac0d23d42e12e10572039fe">00047</a> <span class="preprocessor">#define PXC_CONTACT_NO_FACE_INDEX 0xffffffff</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <a class="code" href="group__foundation.html#ga645944027e6f4e405de626910e82d8d">PX_ALIGN_PREFIX</a>(16)
<a name="l00050"></a><a class="code" href="structPxMassModificationProps.html">00050</a> struct <a class="code" href="structPxMassModificationProps.html">PxMassModificationProps</a>
<a name="l00051"></a>00051 {
<a name="l00052"></a><a class="code" href="structPxMassModificationProps.html#8e2beb82d6ad7cbde650efce10d9ea41">00052</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> mInvMassScale0;
<a name="l00053"></a><a class="code" href="structPxMassModificationProps.html#70262f2157ec8746217cdd6cd7f01346">00053</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> mInvInertiaScale0;
<a name="l00054"></a><a class="code" href="structPxMassModificationProps.html#2530d4bf2a6abc49be7f3f842f971588">00054</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> mInvMassScale1;
<a name="l00055"></a><a class="code" href="structPxMassModificationProps.html#cd3a32386f50966f32a42271ecac6dbd">00055</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> mInvInertiaScale1;
<a name="l00056"></a>00056 }
<a name="l00057"></a>00057 <a class="code" href="group__foundation.html#g7160eeaa47f99f991d9b1f113b398143">PX_ALIGN_SUFFIX</a>(16);
<a name="l00058"></a>00058
<a name="l00063"></a>00063 <a class="code" href="group__foundation.html#ga645944027e6f4e405de626910e82d8d">PX_ALIGN_PREFIX</a>(16)
<a name="l00064"></a><a class="code" href="structPxContactPatch.html">00064</a> struct <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>
<a name="l00065"></a>00065 {
<a name="l00066"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9">00066</a> <span class="keyword">enum</span> <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9">PxContactPatchFlags</a>
<a name="l00067"></a>00067 {
<a name="l00068"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9f45f36084b23d060d8d68255a5493da5">00068</a> eHAS_FACE_INDICES = 1,
<a name="l00069"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9c9c1a5e826b50a161bc6d0656bc2c1ca">00069</a> eMODIFIABLE = 2,
<a name="l00070"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb95d458af3c038a84b13c5f44508f00f31">00070</a> eFORCE_NO_RESPONSE = 4,
<a name="l00071"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb90b3667ec3f96024527acc84fc850cbb1">00071</a> eHAS_MODIFIED_MASS_RATIOS = 8,
<a name="l00072"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9caf67d93398b35860d340dd017b13d43">00072</a> eHAS_TARGET_VELOCITY = 16,
<a name="l00073"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb99e30c7fa533ce8776828ca9908126991">00073</a> eHAS_MAX_IMPULSE = 32,
<a name="l00074"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9e58c6eb59a2e441c78dbbdc831d375f4">00074</a> eREGENERATE_PATCHES = 64,
<a name="l00075"></a>00075
<a name="l00076"></a><a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb92907c86838f9d60fe66944c198ca3e48">00076</a> eCOMPRESSED_MODIFIED_CONTACT = 128
<a name="l00077"></a>00077 };
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <a class="code" href="group__foundation.html#g95024dd88a7efd73c060616238ccbe8a">PX_ALIGN</a>(16, <a class="code" href="structPxMassModificationProps.html">PxMassModificationProps</a> mMassModification); <span class="comment">//16</span>
<a name="l00083"></a>00083 <span class="comment"></span> <a class="code" href="group__foundation.html#g95024dd88a7efd73c060616238ccbe8a">PX_ALIGN</a>(16, <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> normal); <span class="comment">//28</span>
<a name="l00087"></a><a class="code" href="structPxContactPatch.html#699efaf2e4f28fd4661c46a5248d70d1">00087</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> restitution; <span class="comment">//32</span>
<a name="l00088"></a>00088
<a name="l00089"></a><a class="code" href="structPxContactPatch.html#02ea0a2efb0fed52c4cb9a8219c5d275">00089</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> dynamicFriction; <span class="comment">//36</span>
<a name="l00090"></a><a class="code" href="structPxContactPatch.html#cf94a4b4a3610acae52002510d117458">00090</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> staticFriction; <span class="comment">//40</span>
<a name="l00091"></a><a class="code" href="structPxContactPatch.html#46068e61351c8df238534bc59caa7882">00091</a> <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a> startContactIndex; <span class="comment">//41</span>
<a name="l00092"></a><a class="code" href="structPxContactPatch.html#7b3b618ffe8837691cb56543a7462e66">00092</a> <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a> nbContacts; <span class="comment">//42 //Can be a U8</span>
<a name="l00093"></a>00093
<a name="l00094"></a><a class="code" href="structPxContactPatch.html#8e5278067def84d90e068a8d3cf6fc01">00094</a> <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a> materialFlags; <span class="comment">//43 //Can be a U16</span>
<a name="l00095"></a><a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">00095</a> <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a> internalFlags; <span class="comment">//44 //Can be a U16</span>
<a name="l00096"></a><a class="code" href="structPxContactPatch.html#271d410b04d40c20bbd1fcf981a221e1">00096</a> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a> materialIndex0; <span class="comment">//46 //Can be a U16</span>
<a name="l00097"></a><a class="code" href="structPxContactPatch.html#150b3ca1257f0f5cf6b5e23ac1546bbc">00097</a> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a> materialIndex1; <span class="comment">//48 //Can be a U16</span>
<a name="l00098"></a>00098
<a name="l00099"></a>00099
<a name="l00100"></a>00100 }
<a name="l00101"></a>00101 <a class="code" href="group__foundation.html#g7160eeaa47f99f991d9b1f113b398143">PX_ALIGN_SUFFIX</a>(16);
<a name="l00102"></a>00102
<a name="l00107"></a>00107 <a class="code" href="group__foundation.html#ga645944027e6f4e405de626910e82d8d">PX_ALIGN_PREFIX</a>(16)
<a name="l00108"></a><a class="code" href="structPxContact.html">00108</a> struct <a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>
<a name="l00109"></a>00109 {
<a name="l00113"></a><a class="code" href="structPxContact.html#9b965bed8de83188fc4eb40ebfc89efc">00113</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> contact; <span class="comment">//12</span>
<a name="l00117"></a><a class="code" href="structPxContact.html#1d45531c43034871f7c302e9f7c0a13f">00117</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> separation; <span class="comment">//16</span>
<a name="l00118"></a>00118 }
<a name="l00119"></a>00119 <a class="code" href="group__foundation.html#g7160eeaa47f99f991d9b1f113b398143">PX_ALIGN_SUFFIX</a>(16);
<a name="l00120"></a>00120
<a name="l00121"></a>00121 <a class="code" href="group__foundation.html#ga645944027e6f4e405de626910e82d8d">PX_ALIGN_PREFIX</a>(16)
<a name="l00122"></a><a class="code" href="structPxExtendedContact.html">00122</a> struct <a class="code" href="structPxExtendedContact.html">PxExtendedContact</a> : public <a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>
<a name="l00123"></a>00123 {
<a name="l00127"></a>00127 <a class="code" href="group__foundation.html#g95024dd88a7efd73c060616238ccbe8a">PX_ALIGN</a>(16, <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> targetVelocity); <span class="comment">//28</span>
<a name="l00131"></a><a class="code" href="structPxExtendedContact.html#3e72241eb626ae4d39b355ec44d7b37e">00131</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> maxImpulse; <span class="comment">//32</span>
<a name="l00132"></a>00132 }
<a name="l00133"></a>00133 <a class="code" href="group__foundation.html#g7160eeaa47f99f991d9b1f113b398143">PX_ALIGN_SUFFIX</a>(16);
<a name="l00134"></a>00134
<a name="l00139"></a>00139 <a class="code" href="group__foundation.html#ga645944027e6f4e405de626910e82d8d">PX_ALIGN_PREFIX</a>(16)
<a name="l00140"></a><a class="code" href="structPxModifiableContact.html">00140</a> struct <a class="code" href="structPxModifiableContact.html" title="A modifiable contact point. This has additional fields per-contact to permit modification...">PxModifiableContact</a> : public <a class="code" href="structPxExtendedContact.html">PxExtendedContact</a>
<a name="l00141"></a>00141 {
<a name="l00145"></a>00145 <a class="code" href="group__foundation.html#g95024dd88a7efd73c060616238ccbe8a">PX_ALIGN</a>(16, <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> normal); <span class="comment">//44</span>
<a name="l00149"></a><a class="code" href="structPxModifiableContact.html#b064ecd581b8e47f1e597356e7592694">00149</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> restitution; <span class="comment">//48</span>
<a name="l00150"></a>00150
<a name="l00154"></a><a class="code" href="structPxModifiableContact.html#b145e46fc99cd926da504e8657871974">00154</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> materialFlags; <span class="comment">//52</span>
<a name="l00155"></a>00155
<a name="l00159"></a><a class="code" href="structPxModifiableContact.html#e712a15404551a3c82277c4238c6b2d2">00159</a> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a> materialIndex0; <span class="comment">//54</span>
<a name="l00163"></a><a class="code" href="structPxModifiableContact.html#72fd580fa4ed01bc67573e8cdfbe296e">00163</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a> materialIndex1; <span class="comment">//56</span>
<a name="l00167"></a><a class="code" href="structPxModifiableContact.html#2e0ca722e02b42c5dd09af72732ed91d">00167</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> staticFriction; <span class="comment">//60</span>
<a name="l00171"></a><a class="code" href="structPxModifiableContact.html#c38e4614b09fbbf10d8044b0630a7ac3">00171</a> <span class="comment"></span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> dynamicFriction; <span class="comment">//64</span>
<a name="l00172"></a>00172 }
<a name="l00173"></a>00173 <a class="code" href="group__foundation.html#g7160eeaa47f99f991d9b1f113b398143">PX_ALIGN_SUFFIX</a>(16);
<a name="l00174"></a>00174
<a name="l00178"></a><a class="code" href="structPxContactStreamIterator.html">00178</a> <span class="keyword">struct </span><a class="code" href="structPxContactStreamIterator.html" title="A class to iterate over a compressed contact stream. This supports read-only access...">PxContactStreamIterator</a>
<a name="l00179"></a>00179 {
<a name="l00180"></a><a class="code" href="structPxContactStreamIterator.html#df2db58b9de095857db9cfd74a1b594b">00180</a> <span class="keyword">enum</span> <a class="code" href="structPxContactStreamIterator.html#df2db58b9de095857db9cfd74a1b594b">StreamFormat</a>
<a name="l00181"></a>00181 {
<a name="l00182"></a><a class="code" href="structPxContactStreamIterator.html#df2db58b9de095857db9cfd74a1b594b70b81a23a22b8267cd467f6eb4424d54">00182</a> eSIMPLE_STREAM,
<a name="l00183"></a><a class="code" href="structPxContactStreamIterator.html#df2db58b9de095857db9cfd74a1b594b7b18ea433243e4f37a2c2c8658d35ac2">00183</a> eMODIFIABLE_STREAM,
<a name="l00184"></a><a class="code" href="structPxContactStreamIterator.html#df2db58b9de095857db9cfd74a1b594bb6971b07b959b081f8f4c302c2b2b399">00184</a> eCOMPRESSED_MODIFIABLE_STREAM
<a name="l00185"></a>00185 };
<a name="l00191"></a><a class="code" href="structPxContactStreamIterator.html#5f4f20d3a47738764ada33ba0a82abb8">00191</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> zero;
<a name="l00195"></a><a class="code" href="structPxContactStreamIterator.html#d789824d77c0eb542c0990f83d9470ce">00195</a> <span class="keyword">const</span> <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch;
<a name="l00196"></a>00196
<a name="l00200"></a><a class="code" href="structPxContactStreamIterator.html#7ff5ef6abc1aa4b52ce8d20906669634">00200</a> <span class="keyword">const</span> <a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>* contact;
<a name="l00201"></a>00201
<a name="l00205"></a><a class="code" href="structPxContactStreamIterator.html#93d9ba431d7ebd5cfe281af13ec61c06">00205</a> <span class="keyword">const</span> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a>* faceIndice;
<a name="l00206"></a>00206
<a name="l00207"></a>00207
<a name="l00211"></a><a class="code" href="structPxContactStreamIterator.html#4545778a99dad1fdc84ba545866f1ea1">00211</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> totalPatches;
<a name="l00212"></a>00212
<a name="l00216"></a><a class="code" href="structPxContactStreamIterator.html#6c42c3dc1df41933cc6fe03155d1915f">00216</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> totalContacts;
<a name="l00217"></a>00217
<a name="l00221"></a><a class="code" href="structPxContactStreamIterator.html#9be505b3ff688521967f7b37feb2f898">00221</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> nextContactIndex;
<a name="l00222"></a>00222
<a name="l00226"></a><a class="code" href="structPxContactStreamIterator.html#54397b4d83a700d42ded55dfd6f220ac">00226</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> nextPatchIndex;
<a name="l00227"></a>00227
<a name="l00228"></a>00228 <span class="comment">/*</span>
<a name="l00229"></a>00229 <span class="comment"> \brief Size of contact patch header </span>
<a name="l00230"></a>00230 <span class="comment"> \note This varies whether the patch is modifiable or not.</span>
<a name="l00231"></a>00231 <span class="comment"> */</span>
<a name="l00232"></a><a class="code" href="structPxContactStreamIterator.html#66b9776f7d6518ba9ab87c04beff871c">00232</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> contactPatchHeaderSize;
<a name="l00237"></a><a class="code" href="structPxContactStreamIterator.html#5110a83f7649e12f3a8af5002a8d7e8b">00237</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> contactPointSize;
<a name="l00241"></a><a class="code" href="structPxContactStreamIterator.html#902439f8d3cfc7472038e52aecbc0d4c">00241</a> <a class="code" href="structPxContactStreamIterator.html#df2db58b9de095857db9cfd74a1b594b">StreamFormat</a> mStreamFormat;
<a name="l00245"></a><a class="code" href="structPxContactStreamIterator.html#9de08a5556ad12f740d0ce40e8611d13">00245</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> forceNoResponse;
<a name="l00246"></a>00246
<a name="l00247"></a><a class="code" href="structPxContactStreamIterator.html#85021fbdc138b7dc5af6a81f0bd45a5d">00247</a> <span class="keywordtype">bool</span> pointStepped;
<a name="l00248"></a>00248
<a name="l00249"></a><a class="code" href="structPxContactStreamIterator.html#0579a7c96e99c4ea9e25ea5c472f87bc">00249</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> hasFaceIndices;
<a name="l00250"></a>00250
<a name="l00254"></a><a class="code" href="structPxContactStreamIterator.html#1fff9bd121666ef99f0610ed37168e55">00254</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="structPxContactStreamIterator.html" title="A class to iterate over a compressed contact stream. This supports read-only access...">PxContactStreamIterator</a>(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>* contactPatches, <span class="keyword">const</span> <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>* contactPoints, <span class="keyword">const</span> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a>* contactFaceIndices, <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> nbPatches, <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> nbContacts)
<a name="l00255"></a>00255 : zero(0.f)
<a name="l00256"></a>00256 {
<a name="l00257"></a>00257 <span class="keywordtype">bool</span> modify = <span class="keyword">false</span>;
<a name="l00258"></a>00258 <span class="keywordtype">bool</span> compressedModify = <span class="keyword">false</span>;
<a name="l00259"></a>00259 <span class="keywordtype">bool</span> response = <span class="keyword">false</span>;
<a name="l00260"></a>00260 <span class="keywordtype">bool</span> indices = <span class="keyword">false</span>;
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> pointSize = 0;
<a name="l00263"></a>00263 <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> patchHeaderSize = <span class="keyword">sizeof</span>(<a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>);
<a name="l00264"></a>00264
<a name="l00265"></a>00265 <span class="keyword">const</span> <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patches = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>*<span class="keyword">></span>(contactPatches);
<a name="l00266"></a>00266
<a name="l00267"></a>00267 <span class="keywordflow">if</span>(patches)
<a name="l00268"></a>00268 {
<a name="l00269"></a>00269 modify = (patches-><a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> & <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9c9c1a5e826b50a161bc6d0656bc2c1ca" title="Indicates this contact stream is modifiable.">PxContactPatch::eMODIFIABLE</a>) != 0;
<a name="l00270"></a>00270 compressedModify = (patches-><a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> & <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb92907c86838f9d60fe66944c198ca3e48">PxContactPatch::eCOMPRESSED_MODIFIED_CONTACT</a>) != 0;
<a name="l00271"></a>00271 indices = (patches-><a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> & <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9f45f36084b23d060d8d68255a5493da5" title="Indicates this contact stream has face indices.">PxContactPatch::eHAS_FACE_INDICES</a>) != 0;
<a name="l00272"></a>00272
<a name="l00273"></a>00273 patch = patches;
<a name="l00274"></a>00274
<a name="l00275"></a>00275 contact = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>*<span class="keyword">></span>(contactPoints);
<a name="l00276"></a>00276
<a name="l00277"></a>00277 faceIndice = contactFaceIndices;
<a name="l00278"></a>00278
<a name="l00279"></a>00279 pointSize = compressedModify ? <span class="keyword">sizeof</span>(<a class="code" href="structPxExtendedContact.html">PxExtendedContact</a>) : modify ? <span class="keyword">sizeof</span>(<a class="code" href="structPxModifiableContact.html" title="A modifiable contact point. This has additional fields per-contact to permit modification...">PxModifiableContact</a>) : <span class="keyword">sizeof</span>(<a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>);
<a name="l00280"></a>00280
<a name="l00281"></a>00281 response = (patch->internalFlags & <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb95d458af3c038a84b13c5f44508f00f31" title="Indicates this contact stream is notify-only (no contact response).">PxContactPatch::eFORCE_NO_RESPONSE</a>) == 0;
<a name="l00282"></a>00282 }
<a name="l00283"></a>00283
<a name="l00284"></a>00284
<a name="l00285"></a>00285 mStreamFormat = compressedModify ? eCOMPRESSED_MODIFIABLE_STREAM : modify ? eMODIFIABLE_STREAM : eSIMPLE_STREAM;
<a name="l00286"></a>00286 hasFaceIndices = <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a>(indices);
<a name="l00287"></a>00287 forceNoResponse = <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a>(!response);
<a name="l00288"></a>00288
<a name="l00289"></a>00289 contactPatchHeaderSize = patchHeaderSize;
<a name="l00290"></a>00290 contactPointSize = pointSize;
<a name="l00291"></a>00291 nextPatchIndex = 0;
<a name="l00292"></a>00292 nextContactIndex = 0;
<a name="l00293"></a>00293 totalContacts = nbContacts;
<a name="l00294"></a>00294 totalPatches = nbPatches;
<a name="l00295"></a>00295
<a name="l00296"></a>00296 pointStepped = <span class="keyword">false</span>;
<a name="l00297"></a>00297 }
<a name="l00298"></a>00298
<a name="l00303"></a><a class="code" href="structPxContactStreamIterator.html#6a871d90155002f41632b0f30ca3b15a">00303</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">bool</span> hasNextPatch()<span class="keyword"> const</span>
<a name="l00304"></a>00304 <span class="keyword"> </span>{
<a name="l00305"></a>00305 <span class="keywordflow">return</span> nextPatchIndex < totalPatches;
<a name="l00306"></a>00306 }
<a name="l00307"></a>00307
<a name="l00312"></a><a class="code" href="structPxContactStreamIterator.html#00325c2f9ec5f7806fd4fee360d7eebb">00312</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> getTotalContactCount()<span class="keyword"> const</span>
<a name="l00313"></a>00313 <span class="keyword"> </span>{
<a name="l00314"></a>00314 <span class="keywordflow">return</span> totalContacts;
<a name="l00315"></a>00315 }
<a name="l00316"></a>00316
<a name="l00317"></a><a class="code" href="structPxContactStreamIterator.html#76203f596d99e34fb814d637dfad12b6">00317</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> getTotalPatchCount()<span class="keyword"> const</span>
<a name="l00318"></a>00318 <span class="keyword"> </span>{
<a name="l00319"></a>00319 <span class="keywordflow">return</span> totalPatches;
<a name="l00320"></a>00320 }
<a name="l00321"></a>00321
<a name="l00325"></a><a class="code" href="structPxContactStreamIterator.html#46de7820400eb295b621f38c79884867">00325</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">void</span> nextPatch()
<a name="l00326"></a>00326 {
<a name="l00327"></a>00327 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(nextPatchIndex < totalPatches);
<a name="l00328"></a>00328 <span class="keywordflow">if</span>(nextPatchIndex)
<a name="l00329"></a>00329 {
<a name="l00330"></a>00330 <span class="keywordflow">if</span>(nextContactIndex < patch->nbContacts)
<a name="l00331"></a>00331 {
<a name="l00332"></a>00332 <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> nbToStep = patch->nbContacts - this->nextContactIndex;
<a name="l00333"></a>00333 contact = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>*<span class="keyword">></span>(<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>*<span class="keyword">></span>(contact) + contactPointSize * nbToStep);
<a name="l00334"></a>00334 }
<a name="l00335"></a>00335 patch = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>*<span class="keyword">></span>(<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>*<span class="keyword">></span>(patch) + contactPatchHeaderSize);
<a name="l00336"></a>00336 }
<a name="l00337"></a>00337 nextPatchIndex++;
<a name="l00338"></a>00338 nextContactIndex = 0;
<a name="l00339"></a>00339 }
<a name="l00340"></a>00340
<a name="l00345"></a><a class="code" href="structPxContactStreamIterator.html#b0db82d3eaf3eb77a2ffb1e5775754ad">00345</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">bool</span> hasNextContact()<span class="keyword"> const</span>
<a name="l00346"></a>00346 <span class="keyword"> </span>{
<a name="l00347"></a>00347 <span class="keywordflow">return</span> nextContactIndex < (patch->nbContacts);
<a name="l00348"></a>00348 }
<a name="l00349"></a>00349
<a name="l00353"></a><a class="code" href="structPxContactStreamIterator.html#7e153b25314fff172bca67a660ccc8c8">00353</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">void</span> nextContact()
<a name="l00354"></a>00354 {
<a name="l00355"></a>00355 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(nextContactIndex < patch->nbContacts);
<a name="l00356"></a>00356 <span class="keywordflow">if</span>(pointStepped)
<a name="l00357"></a>00357 {
<a name="l00358"></a>00358 contact = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>*<span class="keyword">></span>(<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>*<span class="keyword">></span>(contact) + contactPointSize);
<a name="l00359"></a>00359 faceIndice++;
<a name="l00360"></a>00360 }
<a name="l00361"></a>00361 nextContactIndex++;
<a name="l00362"></a>00362 pointStepped = <span class="keyword">true</span>;
<a name="l00363"></a>00363 }
<a name="l00364"></a>00364
<a name="l00365"></a>00365
<a name="l00370"></a><a class="code" href="structPxContactStreamIterator.html#43a9866f464b2b05520f9e60c2635159">00370</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& getContactNormal()<span class="keyword"> const</span>
<a name="l00371"></a>00371 <span class="keyword"> </span>{
<a name="l00372"></a>00372 <span class="keywordflow">return</span> getContactPatch().normal;
<a name="l00373"></a>00373 }
<a name="l00374"></a>00374
<a name="l00379"></a><a class="code" href="structPxContactStreamIterator.html#913753d2df0727e04bc35790c1e0c07f">00379</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getInvMassScale0()<span class="keyword"> const</span>
<a name="l00380"></a>00380 <span class="keyword"> </span>{
<a name="l00381"></a>00381 <span class="keywordflow">return</span> patch->mMassModification.mInvMassScale0;
<a name="l00382"></a>00382 }
<a name="l00383"></a>00383
<a name="l00388"></a><a class="code" href="structPxContactStreamIterator.html#c3fc9b4df9d7be47a4cc11302a35af49">00388</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getInvMassScale1()<span class="keyword"> const</span>
<a name="l00389"></a>00389 <span class="keyword"> </span>{
<a name="l00390"></a>00390 <span class="keywordflow">return</span> patch->mMassModification.mInvMassScale1;
<a name="l00391"></a>00391 }
<a name="l00392"></a>00392
<a name="l00397"></a><a class="code" href="structPxContactStreamIterator.html#010a4738bb51b22a140cc940485059f3">00397</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getInvInertiaScale0()<span class="keyword"> const</span>
<a name="l00398"></a>00398 <span class="keyword"> </span>{
<a name="l00399"></a>00399 <span class="keywordflow">return</span> patch->mMassModification.mInvInertiaScale0;
<a name="l00400"></a>00400 }
<a name="l00401"></a>00401
<a name="l00406"></a><a class="code" href="structPxContactStreamIterator.html#e3c7ba1cb35ae52a8247831825747262">00406</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getInvInertiaScale1()<span class="keyword"> const</span>
<a name="l00407"></a>00407 <span class="keyword"> </span>{
<a name="l00408"></a>00408 <span class="keywordflow">return</span> patch->mMassModification.mInvInertiaScale1;
<a name="l00409"></a>00409 }
<a name="l00410"></a>00410
<a name="l00415"></a><a class="code" href="structPxContactStreamIterator.html#5d728e087210857aa3e06d167f486dcf">00415</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getMaxImpulse()<span class="keyword"> const</span>
<a name="l00416"></a>00416 <span class="keyword"> </span>{
<a name="l00417"></a>00417 <span class="keywordflow">return</span> mStreamFormat != eSIMPLE_STREAM ? getExtendedContact().maxImpulse : <a class="code" href="group__foundation.html#g1afd8c76d275a787af09ebfceaf7fc30">PX_MAX_REAL</a>;
<a name="l00418"></a>00418 }
<a name="l00419"></a>00419
<a name="l00424"></a><a class="code" href="structPxContactStreamIterator.html#dba5592aea3209649a1d1062be99827c">00424</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& getTargetVel()<span class="keyword"> const</span>
<a name="l00425"></a>00425 <span class="keyword"> </span>{
<a name="l00426"></a>00426 <span class="keywordflow">return</span> mStreamFormat != eSIMPLE_STREAM ? getExtendedContact().targetVelocity : zero;
<a name="l00427"></a>00427 }
<a name="l00428"></a>00428
<a name="l00433"></a><a class="code" href="structPxContactStreamIterator.html#d50e5c8e8f815416304cbaced1ed3980">00433</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& getContactPoint()<span class="keyword"> const</span>
<a name="l00434"></a>00434 <span class="keyword"> </span>{
<a name="l00435"></a>00435 <span class="keywordflow">return</span> contact->contact;
<a name="l00436"></a>00436 }
<a name="l00437"></a>00437
<a name="l00442"></a><a class="code" href="structPxContactStreamIterator.html#b6bd9823f5d44bc849e74d5d52ea0f54">00442</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getSeparation()<span class="keyword"> const</span>
<a name="l00443"></a>00443 <span class="keyword"> </span>{
<a name="l00444"></a>00444 <span class="keywordflow">return</span> contact->separation;
<a name="l00445"></a>00445 }
<a name="l00446"></a>00446
<a name="l00451"></a><a class="code" href="structPxContactStreamIterator.html#397e7782437534dd5183b57717f24a4a">00451</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> getFaceIndex0()<span class="keyword"> const</span>
<a name="l00452"></a>00452 <span class="keyword"> </span>{
<a name="l00453"></a>00453 <span class="keywordflow">return</span> <a class="code" href="PxContact_8h.html#d7d63e592ac0d23d42e12e10572039fe">PXC_CONTACT_NO_FACE_INDEX</a>;
<a name="l00454"></a>00454 }
<a name="l00455"></a>00455
<a name="l00460"></a><a class="code" href="structPxContactStreamIterator.html#777a6870286e1eddcc5e9f8cca93b90b">00460</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> getFaceIndex1()<span class="keyword"> const</span>
<a name="l00461"></a>00461 <span class="keyword"> </span>{
<a name="l00462"></a>00462 <span class="keywordflow">return</span> hasFaceIndices ? *faceIndice : <a class="code" href="PxContact_8h.html#d7d63e592ac0d23d42e12e10572039fe">PXC_CONTACT_NO_FACE_INDEX</a>;
<a name="l00463"></a>00463 }
<a name="l00464"></a>00464
<a name="l00469"></a><a class="code" href="structPxContactStreamIterator.html#e61aa300ebb547085205073dd69454a2">00469</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getStaticFriction()<span class="keyword"> const</span>
<a name="l00470"></a>00470 <span class="keyword"> </span>{
<a name="l00471"></a>00471 <span class="keywordflow">return</span> getContactPatch().staticFriction;
<a name="l00472"></a>00472 }
<a name="l00473"></a>00473
<a name="l00478"></a><a class="code" href="structPxContactStreamIterator.html#d79b7ca12187d9e9b9488eb4adcc8340">00478</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getDynamicFriction()<span class="keyword"> const</span>
<a name="l00479"></a>00479 <span class="keyword"> </span>{
<a name="l00480"></a>00480 <span class="keywordflow">return</span> getContactPatch().dynamicFriction;
<a name="l00481"></a>00481 }
<a name="l00482"></a>00482
<a name="l00487"></a><a class="code" href="structPxContactStreamIterator.html#25f719cc460541c095fa0b7101fe4a32">00487</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> getRestitution()<span class="keyword"> const</span>
<a name="l00488"></a>00488 <span class="keyword"> </span>{
<a name="l00489"></a>00489 <span class="keywordflow">return</span> getContactPatch().restitution;
<a name="l00490"></a>00490 }
<a name="l00491"></a>00491
<a name="l00496"></a><a class="code" href="structPxContactStreamIterator.html#770d2ae5fd732a91054bdc74342290e6">00496</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> getMaterialFlags()<span class="keyword"> const</span>
<a name="l00497"></a>00497 <span class="keyword"> </span>{
<a name="l00498"></a>00498 <span class="keywordflow">return</span> getContactPatch().materialFlags;
<a name="l00499"></a>00499 }
<a name="l00500"></a>00500
<a name="l00505"></a><a class="code" href="structPxContactStreamIterator.html#f763064bcbbadadcdcb92374f10ef0c6">00505</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a> getMaterialIndex0()<span class="keyword"> const</span>
<a name="l00506"></a>00506 <span class="keyword"> </span>{
<a name="l00507"></a>00507 <span class="keywordflow">return</span> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a>(getContactPatch().materialIndex0);
<a name="l00508"></a>00508 }
<a name="l00509"></a>00509
<a name="l00514"></a><a class="code" href="structPxContactStreamIterator.html#5d1054f733dbaafcf0e5853e688c4ffb">00514</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a> getMaterialIndex1()<span class="keyword"> const</span>
<a name="l00515"></a>00515 <span class="keyword"> </span>{
<a name="l00516"></a>00516 <span class="keywordflow">return</span> <a class="code" href="namespacephysx.html#9caf1cbcda071b6d2a9c069faa99da23">PxU16</a>(getContactPatch().materialIndex1);
<a name="l00517"></a>00517 }
<a name="l00518"></a>00518
<a name="l00522"></a><a class="code" href="structPxContactStreamIterator.html#cc41337cff1ad0108e92e09675acd506">00522</a> <span class="keywordtype">bool</span> advanceToIndex(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> initialIndex)
<a name="l00523"></a>00523 {
<a name="l00524"></a>00524 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(this->nextPatchIndex == 0 && this->nextContactIndex == 0);
<a name="l00525"></a>00525
<a name="l00526"></a>00526 <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> numToAdvance = initialIndex;
<a name="l00527"></a>00527
<a name="l00528"></a>00528 <span class="keywordflow">if</span>(numToAdvance == 0)
<a name="l00529"></a>00529 {
<a name="l00530"></a>00530 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(hasNextPatch());
<a name="l00531"></a>00531 nextPatch();
<a name="l00532"></a>00532 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00533"></a>00533 }
<a name="l00534"></a>00534
<a name="l00535"></a>00535 <span class="keywordflow">while</span>(numToAdvance)
<a name="l00536"></a>00536 {
<a name="l00537"></a>00537 <span class="keywordflow">while</span>(hasNextPatch())
<a name="l00538"></a>00538 {
<a name="l00539"></a>00539 nextPatch();
<a name="l00540"></a>00540 <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> patchSize = patch->nbContacts;
<a name="l00541"></a>00541 <span class="keywordflow">if</span>(numToAdvance <= patchSize)
<a name="l00542"></a>00542 {
<a name="l00543"></a>00543 contact = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="structPxContact.html" title="Contact point data including face (feature) indices.">PxContact</a>*<span class="keyword">></span>(<span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>*<span class="keyword">></span>(contact) + contactPointSize * numToAdvance);
<a name="l00544"></a>00544 nextContactIndex += numToAdvance;
<a name="l00545"></a>00545 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00546"></a>00546 }
<a name="l00547"></a>00547 <span class="keywordflow">else</span>
<a name="l00548"></a>00548 {
<a name="l00549"></a>00549 numToAdvance -= patchSize;
<a name="l00550"></a>00550 }
<a name="l00551"></a>00551 }
<a name="l00552"></a>00552 }
<a name="l00553"></a>00553 <span class="keywordflow">return</span> <span class="keyword">false</span>;
<a name="l00554"></a>00554 }
<a name="l00555"></a>00555
<a name="l00556"></a>00556 <span class="keyword">private</span>:
<a name="l00557"></a>00557
<a name="l00561"></a><a class="code" href="structPxContactStreamIterator.html#12189ea8231388bf3c7f248728f2de64">00561</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>& getContactPatch()<span class="keyword"> const</span>
<a name="l00562"></a>00562 <span class="keyword"> </span>{
<a name="l00563"></a>00563 <span class="keywordflow">return</span> *<span class="keyword">static_cast<</span><span class="keyword">const </span><a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>*<span class="keyword">></span>(patch);
<a name="l00564"></a>00564 }
<a name="l00565"></a>00565
<a name="l00566"></a><a class="code" href="structPxContactStreamIterator.html#0691a829eaecbf57be60ae111dfaa91a">00566</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="structPxExtendedContact.html">PxExtendedContact</a>& getExtendedContact()<span class="keyword"> const</span>
<a name="l00567"></a>00567 <span class="keyword"> </span>{
<a name="l00568"></a>00568 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(mStreamFormat == eMODIFIABLE_STREAM || mStreamFormat == eCOMPRESSED_MODIFIABLE_STREAM);
<a name="l00569"></a>00569 <span class="keywordflow">return</span> *<span class="keyword">static_cast<</span><span class="keyword">const </span><a class="code" href="structPxExtendedContact.html">PxExtendedContact</a>*<span class="keyword">></span>(contact);
<a name="l00570"></a>00570 }
<a name="l00571"></a>00571
<a name="l00572"></a>00572 };
<a name="l00573"></a>00573
<a name="l00574"></a>00574
<a name="l00575"></a>00575 <span class="preprocessor">#if PX_VC</span>
<a name="l00576"></a>00576 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span>
<a name="l00577"></a>00577 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00578"></a>00578 <span class="preprocessor"></span>
<a name="l00579"></a>00579 <span class="preprocessor">#if !PX_DOXYGEN</span>
<a name="l00580"></a>00580 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span>
<a name="l00581"></a>00581 <span class="preprocessor">#endif</span>
<a name="l00582"></a>00582 <span class="preprocessor"></span>
<a name="l00583"></a>00583 <span class="preprocessor">#endif</span>
</pre></div></div>
<hr style="width: 100%; height: 2px;"><br>
Copyright © 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</body>
</html>
|