aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PhysXAPI/files/PxContactModifyCallback_8h-source.html
blob: 28295e9deab548c63b6913b01e1fb4a39dba5183 (plain) (blame)
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
<html>
	<head>
		<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxContactModifyCallback.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> &nbsp; 
				<a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; 
				<a class="qindex" href="annotated.html">Compound List</a> &nbsp; 
				<a class="qindex" href="functions.html">Compound Members</a> &nbsp;  
			</center>
			<hr class="second">
		</div>
<!-- Generated by Doxygen 1.5.8 -->
<h1>PxContactModifyCallback.h</h1><a href="PxContactModifyCallback_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_MODIFY_CALLBACK</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define PX_CONTACT_MODIFY_CALLBACK</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="PxPhysXConfig_8h.html">PxPhysXConfig.h</a>"</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="PxShape_8h.html">PxShape.h</a>"</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="PxContact_8h.html">PxContact.h</a>"</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="PxTransform_8h.html">foundation/PxTransform.h</a>"</span>
<a name="l00041"></a>00041 
<a name="l00042"></a>00042 <span class="preprocessor">#if !PX_DOXYGEN</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="keyword">namespace </span>physx
<a name="l00044"></a>00044 {
<a name="l00045"></a>00045 <span class="preprocessor">#endif</span>
<a name="l00046"></a>00046 <span class="preprocessor"></span>
<a name="l00047"></a>00047 <span class="keyword">class </span><a class="code" href="classPxShape.html" title="Abstract class for collision shapes.">PxShape</a>;
<a name="l00048"></a>00048 
<a name="l00061"></a><a class="code" href="classPxContactSet.html">00061</a> <span class="keyword">class </span><a class="code" href="classPxContactSet.html" title="An array of contact points, as passed to contact modification.">PxContactSet</a>
<a name="l00062"></a>00062 {
<a name="l00063"></a>00063 <span class="keyword">public</span>:
<a name="l00069"></a><a class="code" href="classPxContactSet.html#bf3a8b911e7d304ce1008b23bb575361">00069</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>&amp; <a class="code" href="classPxContactSet.html#bf3a8b911e7d304ce1008b23bb575361" title="Get the position of a specific contact point in the set.">getPoint</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const           </span>{ <span class="keywordflow">return</span> mContacts[i].contact;      }
<a name="l00070"></a>00070 
<a name="l00076"></a><a class="code" href="classPxContactSet.html#21cfe31aa14065c8b3ee6390c312e178">00076</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> <a class="code" href="classPxContactSet.html#21cfe31aa14065c8b3ee6390c312e178" title="Alter the position of a specific contact point in the set.">setPoint</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; p)         { mContacts[i].contact = p; }
<a name="l00077"></a>00077 
<a name="l00083"></a><a class="code" href="classPxContactSet.html#225b2714ca66ddb6cdf6c8a00664464e">00083</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>&amp; <a class="code" href="classPxContactSet.html#225b2714ca66ddb6cdf6c8a00664464e" title="Get the contact normal of a specific contact point in the set.">getNormal</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const          </span>{ <span class="keywordflow">return</span> mContacts[i].normal;   }
<a name="l00084"></a>00084 
<a name="l00092"></a><a class="code" href="classPxContactSet.html#fdc45b285e1aaedd29690571b2098daa">00092</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setNormal(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; n)        
<a name="l00093"></a>00093     { 
<a name="l00094"></a>00094         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00095"></a>00095         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9e58c6eb59a2e441c78dbbdc831d375f4" title="This is required if the application modified either the contact normal or the material...">PxContactPatch::eREGENERATE_PATCHES</a>;
<a name="l00096"></a>00096         mContacts[i].normal = n;
<a name="l00097"></a>00097     }
<a name="l00098"></a>00098 
<a name="l00104"></a><a class="code" href="classPxContactSet.html#08bf7523401a88b6481ae49bedc858f3">00104</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> <a class="code" href="classPxContactSet.html#08bf7523401a88b6481ae49bedc858f3" title="Get the separation of a specific contact point in the set.">getSeparation</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const             </span>{ <span class="keywordflow">return</span> mContacts[i].separation;   }
<a name="l00105"></a>00105 
<a name="l00111"></a><a class="code" href="classPxContactSet.html#dd1b219393a21fdbb6e6db51400aa900">00111</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> <a class="code" href="classPxContactSet.html#dd1b219393a21fdbb6e6db51400aa900" title="Alter the separation of a specific contact point in the set.">setSeparation</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> s)           { mContacts[i].separation = s; }
<a name="l00112"></a>00112 
<a name="l00119"></a><a class="code" href="classPxContactSet.html#25ab720b769e29f0a40aeb6bae693591">00119</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>&amp; <a class="code" href="classPxContactSet.html#25ab720b769e29f0a40aeb6bae693591" title="Get the target velocity of a specific contact point in the set.">getTargetVelocity</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> mContacts[i].targetVelocity;   }
<a name="l00120"></a>00120 
<a name="l00126"></a><a class="code" href="classPxContactSet.html#2e374d99ff72fcf410a070ee3bf17abb">00126</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setTargetVelocity(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; v)
<a name="l00127"></a>00127     { 
<a name="l00128"></a>00128         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00129"></a>00129         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9caf67d93398b35860d340dd017b13d43" title="Indicates this contact stream has target velocities set.">PxContactPatch::eHAS_TARGET_VELOCITY</a>;
<a name="l00130"></a>00130         mContacts[i].targetVelocity = v;
<a name="l00131"></a>00131     }
<a name="l00132"></a>00132 
<a name="l00138"></a><a class="code" href="classPxContactSet.html#02f160a1a9135d6d7f1e5f77557ce63e">00138</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> <a class="code" href="classPxContactSet.html#02f160a1a9135d6d7f1e5f77557ce63e" title="Get the face index with respect to the first shape of the pair for a specific contact...">getInternalFaceIndex0</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)            { <a class="code" href="group__foundation.html#g3b618390d8743c532c4131cb931df43a">PX_UNUSED</a>(i); <span class="keywordflow">return</span> <a class="code" href="PxContact_8h.html#d7d63e592ac0d23d42e12e10572039fe">PXC_CONTACT_NO_FACE_INDEX</a>; }
<a name="l00139"></a>00139 
<a name="l00145"></a><a class="code" href="classPxContactSet.html#6535e80819a6d2a5bbe38db6aa86684e">00145</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> getInternalFaceIndex1(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)            
<a name="l00146"></a>00146     {
<a name="l00147"></a>00147         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00148"></a>00148         <span class="keywordflow">if</span> (patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> &amp; <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9f45f36084b23d060d8d68255a5493da5" title="Indicates this contact stream has face indices.">PxContactPatch::eHAS_FACE_INDICES</a>)
<a name="l00149"></a>00149         {
<a name="l00150"></a>00150             <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span><a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a>*<span class="keyword">&gt;</span>(mContacts + mCount)[mCount + i];
<a name="l00151"></a>00151         }
<a name="l00152"></a>00152         <span class="keywordflow">return</span> <a class="code" href="PxContact_8h.html#d7d63e592ac0d23d42e12e10572039fe">PXC_CONTACT_NO_FACE_INDEX</a>;
<a name="l00153"></a>00153     }
<a name="l00154"></a>00154 
<a name="l00160"></a><a class="code" href="classPxContactSet.html#cfe031fe04223af2e28b026d125a6d41">00160</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> <a class="code" href="classPxContactSet.html#cfe031fe04223af2e28b026d125a6d41" title="Get the maximum impulse for a specific contact point in the set.">getMaxImpulse</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const             </span>{ <span class="keywordflow">return</span> mContacts[i].maxImpulse;   }
<a name="l00161"></a>00161 
<a name="l00169"></a><a class="code" href="classPxContactSet.html#145d98e983e46057f0fa57903f671c06">00169</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setMaxImpulse(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> s)           
<a name="l00170"></a>00170     {
<a name="l00171"></a>00171         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00172"></a>00172         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb99e30c7fa533ce8776828ca9908126991" title="Indicates this contact stream has max impulses set.">PxContactPatch::eHAS_MAX_IMPULSE</a>;
<a name="l00173"></a>00173         mContacts[i].maxImpulse = s; 
<a name="l00174"></a>00174     }
<a name="l00175"></a>00175 
<a name="l00181"></a><a class="code" href="classPxContactSet.html#643d2c1eb96b29b8119e11e04828c26e">00181</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> <a class="code" href="classPxContactSet.html#643d2c1eb96b29b8119e11e04828c26e" title="Get the restitution coefficient for a specific contact point in the set.">getRestitution</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const            </span>{ <span class="keywordflow">return</span> mContacts[i].restitution; }
<a name="l00182"></a>00182 
<a name="l00190"></a><a class="code" href="classPxContactSet.html#2c1f31f9201c804d6310ec0129cc0cea">00190</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setRestitution(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> r)      
<a name="l00191"></a>00191     {
<a name="l00192"></a>00192         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00193"></a>00193         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9e58c6eb59a2e441c78dbbdc831d375f4" title="This is required if the application modified either the contact normal or the material...">PxContactPatch::eREGENERATE_PATCHES</a>;
<a name="l00194"></a>00194         mContacts[i].restitution = r; 
<a name="l00195"></a>00195     }
<a name="l00196"></a>00196 
<a name="l00202"></a><a class="code" href="classPxContactSet.html#45700551793a60bff49adfb4775b5820">00202</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> <a class="code" href="classPxContactSet.html#45700551793a60bff49adfb4775b5820" title="Get the static friction coefficient for a specific contact point in the set.">getStaticFriction</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mContacts[i].staticFriction; }
<a name="l00203"></a>00203 
<a name="l00209"></a><a class="code" href="classPxContactSet.html#8c585855a8936d762520b1d1471bf3fe">00209</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setStaticFriction(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> f) 
<a name="l00210"></a>00210     { 
<a name="l00211"></a>00211         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00212"></a>00212         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9e58c6eb59a2e441c78dbbdc831d375f4" title="This is required if the application modified either the contact normal or the material...">PxContactPatch::eREGENERATE_PATCHES</a>;
<a name="l00213"></a>00213         mContacts[i].staticFriction = f; 
<a name="l00214"></a>00214     }
<a name="l00215"></a>00215 
<a name="l00221"></a><a class="code" href="classPxContactSet.html#70f975199ee66a0df4bf037cc8e10f3c">00221</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> <a class="code" href="classPxContactSet.html#70f975199ee66a0df4bf037cc8e10f3c" title="Get the static friction coefficient for a specific contact point in the set.">getDynamicFriction</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mContacts[i].dynamicFriction; }
<a name="l00222"></a>00222 
<a name="l00228"></a><a class="code" href="classPxContactSet.html#360344f51cce5d01c69701e3dcc3747b">00228</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setDynamicFriction(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> f) 
<a name="l00229"></a>00229     {
<a name="l00230"></a>00230         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00231"></a>00231         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb9e58c6eb59a2e441c78dbbdc831d375f4" title="This is required if the application modified either the contact normal or the material...">PxContactPatch::eREGENERATE_PATCHES</a>; 
<a name="l00232"></a>00232         mContacts[i].dynamicFriction = f; 
<a name="l00233"></a>00233     }
<a name="l00234"></a>00234 
<a name="l00240"></a><a class="code" href="classPxContactSet.html#930b0b6a5450e9b2e83634d6803f4045">00240</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> <a class="code" href="classPxContactSet.html#930b0b6a5450e9b2e83634d6803f4045" title="Ignore the contact point.">ignore</a>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i)                            { mContacts[i].maxImpulse = 0.f; }
<a name="l00241"></a>00241 
<a name="l00245"></a><a class="code" href="classPxContactSet.html#63434463f6bea994645e3dcbdc2cf2d0">00245</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> <a class="code" href="classPxContactSet.html#63434463f6bea994645e3dcbdc2cf2d0" title="The number of contact points in the set.">size</a>()<span class="keyword"> const                              </span>{ <span class="keywordflow">return</span> mCount; }
<a name="l00246"></a>00246 
<a name="l00253"></a><a class="code" href="classPxContactSet.html#8179bfc84e3433909eb82553ddd9afeb">00253</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="l00254"></a>00254 <span class="keyword">    </span>{ 
<a name="l00255"></a>00255         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00256"></a>00256         <span class="keywordflow">return</span> patch-&gt;mMassModification.mInvMassScale0;
<a name="l00257"></a>00257     }
<a name="l00258"></a>00258 
<a name="l00265"></a><a class="code" href="classPxContactSet.html#23297c2c731c90d482a6553140b3afb6">00265</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="l00266"></a>00266 <span class="keyword">    </span>{ 
<a name="l00267"></a>00267         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00268"></a>00268         <span class="keywordflow">return</span> patch-&gt;mMassModification.mInvMassScale1;
<a name="l00269"></a>00269     }
<a name="l00270"></a>00270 
<a name="l00277"></a><a class="code" href="classPxContactSet.html#107184e5d6bbd33e445ca52de23c4016">00277</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="l00278"></a>00278 <span class="keyword">    </span>{ 
<a name="l00279"></a>00279         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00280"></a>00280         <span class="keywordflow">return</span> patch-&gt;mMassModification.mInvInertiaScale0;
<a name="l00281"></a>00281     }
<a name="l00282"></a>00282 
<a name="l00289"></a><a class="code" href="classPxContactSet.html#4ce891dceb271dab78a4d9001de5c95b">00289</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="l00290"></a>00290 <span class="keyword">    </span>{ 
<a name="l00291"></a>00291         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00292"></a>00292         <span class="keywordflow">return</span> patch-&gt;mMassModification.mInvInertiaScale1;
<a name="l00293"></a>00293     }
<a name="l00294"></a>00294 
<a name="l00301"></a><a class="code" href="classPxContactSet.html#74648acc75bce20cfd555e76298b514f">00301</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setInvMassScale0(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> scale)                   
<a name="l00302"></a>00302     { 
<a name="l00303"></a>00303         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00304"></a>00304         patch-&gt;mMassModification.mInvMassScale0 = scale;
<a name="l00305"></a>00305         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb90b3667ec3f96024527acc84fc850cbb1" title="Indicates this contact stream has modified mass ratios.">PxContactPatch::eHAS_MODIFIED_MASS_RATIOS</a>;
<a name="l00306"></a>00306     }
<a name="l00307"></a>00307 
<a name="l00314"></a><a class="code" href="classPxContactSet.html#d77be76292fb196ff129d70c372c5d97">00314</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setInvMassScale1(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> scale)                   
<a name="l00315"></a>00315     { 
<a name="l00316"></a>00316         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00317"></a>00317         patch-&gt;mMassModification.mInvMassScale1 = scale;
<a name="l00318"></a>00318         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb90b3667ec3f96024527acc84fc850cbb1" title="Indicates this contact stream has modified mass ratios.">PxContactPatch::eHAS_MODIFIED_MASS_RATIOS</a>;
<a name="l00319"></a>00319     }
<a name="l00320"></a>00320 
<a name="l00327"></a><a class="code" href="classPxContactSet.html#e145d9eec7403316390478f401837dcf">00327</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setInvInertiaScale0(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> scale)                    
<a name="l00328"></a>00328     { 
<a name="l00329"></a>00329         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00330"></a>00330         patch-&gt;mMassModification.mInvInertiaScale0 = scale;
<a name="l00331"></a>00331         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb90b3667ec3f96024527acc84fc850cbb1" title="Indicates this contact stream has modified mass ratios.">PxContactPatch::eHAS_MODIFIED_MASS_RATIOS</a>;
<a name="l00332"></a>00332     }
<a name="l00333"></a>00333 
<a name="l00340"></a><a class="code" href="classPxContactSet.html#74a22b5ae3140aba546b66415427a7d5">00340</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a>     <span class="keywordtype">void</span> setInvInertiaScale1(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> scale)                    
<a name="l00341"></a>00341     { 
<a name="l00342"></a>00342         <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* patch = getPatch();
<a name="l00343"></a>00343         patch-&gt;mMassModification.mInvInertiaScale1 = scale;
<a name="l00344"></a>00344         patch-&gt;<a class="code" href="structPxContactPatch.html#6dd6eed1e599102e1c2cc16fab3a5ddb">internalFlags</a> |= <a class="code" href="structPxContactPatch.html#704320591170cbad6698b74b5d1d9eb90b3667ec3f96024527acc84fc850cbb1" title="Indicates this contact stream has modified mass ratios.">PxContactPatch::eHAS_MODIFIED_MASS_RATIOS</a>;
<a name="l00345"></a>00345     }
<a name="l00346"></a>00346 
<a name="l00347"></a>00347 <span class="keyword">protected</span>:
<a name="l00348"></a>00348 
<a name="l00349"></a><a class="code" href="classPxContactSet.html#0aef84a136055ad90c1af8a53f2fe8a8">00349</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="structPxContactPatch.html" title="Header for contact patch where all points share same material and normal.">PxContactPatch</a>* getPatch()<span class="keyword"> const</span>
<a name="l00350"></a>00350 <span class="keyword">    </span>{
<a name="l00351"></a>00351         <span class="keyword">const</span> <span class="keywordtype">size_t</span> headerOffset = <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>)*mCount;
<a name="l00352"></a>00352         <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</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">&gt;</span>(<span class="keyword">reinterpret_cast&lt;</span><a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>*<span class="keyword">&gt;</span>(mContacts) - headerOffset);
<a name="l00353"></a>00353     }
<a name="l00354"></a>00354 
<a name="l00355"></a><a class="code" href="classPxContactSet.html#fcc7a677fe3cf662ebab5a49f5a454b9">00355</a>     <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a>                   mCount;         
<a name="l00356"></a><a class="code" href="classPxContactSet.html#614a3d5bbdfe9fccce114e0ce64913a8">00356</a>     <a class="code" href="structPxModifiableContact.html" title="A modifiable contact point. This has additional fields per-contact to permit modification...">PxModifiableContact</a>*    mContacts;      
<a name="l00357"></a>00357 };
<a name="l00358"></a>00358 
<a name="l00359"></a>00359 
<a name="l00360"></a>00360 
<a name="l00367"></a><a class="code" href="classPxContactModifyPair.html">00367</a> <span class="keyword">class </span><a class="code" href="classPxContactModifyPair.html" title="An array of instances of this class is passed to PxContactModifyCallback::onContactModify()...">PxContactModifyPair</a>
<a name="l00368"></a>00368 {
<a name="l00369"></a>00369 <span class="keyword">public</span>:
<a name="l00370"></a>00370 
<a name="l00377"></a><a class="code" href="classPxContactModifyPair.html#5102f62e13acc449f81670353cdac114">00377</a>     <span class="keyword">const</span> <a class="code" href="classPxRigidActor.html" title="PxRigidActor represents a base class shared between dynamic and static rigid bodies...">PxRigidActor</a>*     actor[2];
<a name="l00384"></a><a class="code" href="classPxContactModifyPair.html#e562e272dd6588e55139200aed047c38">00384</a>     <span class="keyword">const</span> <a class="code" href="classPxShape.html" title="Abstract class for collision shapes.">PxShape</a>*          shape[2];
<a name="l00385"></a>00385 
<a name="l00394"></a><a class="code" href="classPxContactModifyPair.html#8d6715a77c2fb18a8ee9906813149d22">00394</a>     <a class="code" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a>             transform[2];
<a name="l00395"></a>00395 
<a name="l00400"></a><a class="code" href="classPxContactModifyPair.html#9266a6cd1e9604f2bc6f7104064bb388">00400</a>     <a class="code" href="classPxContactSet.html" title="An array of contact points, as passed to contact modification.">PxContactSet</a>            contacts;
<a name="l00401"></a>00401 };
<a name="l00402"></a>00402 
<a name="l00403"></a>00403 
<a name="l00422"></a><a class="code" href="classPxContactModifyCallback.html">00422</a> <span class="keyword">class </span><a class="code" href="classPxContactModifyCallback.html" title="An interface class that the user can implement in order to modify contact constraints...">PxContactModifyCallback</a>
<a name="l00423"></a>00423 {
<a name="l00424"></a>00424 <span class="keyword">public</span>:
<a name="l00425"></a>00425 
<a name="l00436"></a>00436     <span class="keyword">virtual</span> <span class="keywordtype">void</span> onContactModify(<a class="code" href="classPxContactModifyPair.html" title="An array of instances of this class is passed to PxContactModifyCallback::onContactModify()...">PxContactModifyPair</a>* <span class="keyword">const</span> pairs, <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> count) = 0;
<a name="l00437"></a>00437 
<a name="l00438"></a>00438 <span class="keyword">protected</span>:
<a name="l00439"></a><a class="code" href="classPxContactModifyCallback.html#d6c57abf114d4c594973c2d365a98b6f">00439</a>     <span class="keyword">virtual</span> <a class="code" href="classPxContactModifyCallback.html#d6c57abf114d4c594973c2d365a98b6f">~PxContactModifyCallback</a>(){}
<a name="l00440"></a>00440 };
<a name="l00441"></a>00441 
<a name="l00460"></a><a class="code" href="classPxCCDContactModifyCallback.html">00460</a> <span class="keyword">class </span><a class="code" href="classPxCCDContactModifyCallback.html" title="An interface class that the user can implement in order to modify CCD contact constraints...">PxCCDContactModifyCallback</a>
<a name="l00461"></a>00461 {
<a name="l00462"></a>00462 <span class="keyword">public</span>:
<a name="l00463"></a>00463 
<a name="l00474"></a>00474     <span class="keyword">virtual</span> <span class="keywordtype">void</span> onCCDContactModify(<a class="code" href="classPxContactModifyPair.html" title="An array of instances of this class is passed to PxContactModifyCallback::onContactModify()...">PxContactModifyPair</a>* <span class="keyword">const</span> pairs, <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> count) = 0;
<a name="l00475"></a>00475 
<a name="l00476"></a>00476 <span class="keyword">protected</span>:
<a name="l00477"></a><a class="code" href="classPxCCDContactModifyCallback.html#323e56a126465efff8afccade4d72642">00477</a>     <span class="keyword">virtual</span> <a class="code" href="classPxCCDContactModifyCallback.html#323e56a126465efff8afccade4d72642">~PxCCDContactModifyCallback</a>(){}
<a name="l00478"></a>00478 };
<a name="l00479"></a>00479 
<a name="l00480"></a>00480 
<a name="l00481"></a>00481 <span class="preprocessor">#if !PX_DOXYGEN</span>
<a name="l00482"></a>00482 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span>
<a name="l00483"></a>00483 <span class="preprocessor">#endif</span>
<a name="l00484"></a>00484 <span class="preprocessor"></span>
<a name="l00486"></a>00486 <span class="preprocessor">#endif</span>
</pre></div></div>

<hr style="width: 100%; height: 2px;"><br>
Copyright &copy; 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>