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
|
<html>
<head>
<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxParticleExt Class Reference</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 -->
<div class="contents">
<h1>PxParticleExt Class Reference<br>
<small>
[<a class="el" href="group__extensions.html">Extensions</a>]</small>
</h1><!-- doxytag: class="PxParticleExt" -->extensions for the partice feature (deprecated)
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="PxParticleExt_8h-source.html">PxParticleExt.h</a>></code>
<p>
<p>
<a href="classPxParticleExt-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxParticleExt_1_1IndexPool.html">IndexPool</a></td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Class to manage particle indices. Extension particle index management can be useful if no application side particle index allocation functionality is available. An <a class="el" href="classPxParticleExt_1_1IndexPool.html" title="Class to manage particle indices. Extension particle index management can be useful...">PxParticleExt::IndexPool</a> instance is meant to be used for one PxParticleSystem/PxParticleFluid instance. The instance can be created with <a class="el" href="classPxParticleExt.html#b1c48052580ebe5df919b6b5505a9bad" title="Creates a PxParticlesExt::IndexPool instance.">PxParticleExt::createIndexPool()</a>. <a href="classPxParticleExt_1_1IndexPool.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct </td><td class="memItemRight" valign="bottom"><a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxParticleExt.html#5e6cfaf89ef796fb909f5e8e583a7cef">buildBoundsHash</a> (<a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> *sortedParticleIndices, <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> *particleBounds, const <a class="el" href="classPxStrideIterator.html">PxStrideIterator</a>< const <a class="el" href="classPxVec3.html">PxVec3</a> > &positionBuffer, const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> validParticleRange, const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> *validParticleBitmap, const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> hashSize, const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> maxBounds, const PxReal gridSpacing)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Computes particle bounds by sorting particle positions into a spatial hash grid. <a href="#5e6cfaf89ef796fb909f5e8e583a7cef"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxParticleExt_1_1IndexPool.html">IndexPool</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxParticleExt.html#b1c48052580ebe5df919b6b5505a9bad">createIndexPool</a> (<a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> maxParticles)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a PxParticlesExt::IndexPool instance. <a href="#b1c48052580ebe5df919b6b5505a9bad"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxParticleExt_1_1IndexPool.html">IndexPool</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPxParticleExt.html#78c8337d805702f66993612762e20438">createIndexPool</a> (<a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> maxParticles, <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> validParticleRange, const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> *validParticleBitmap)</td></tr>
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a PxParticlesExt::IndexPool instance initialized with a preallocated set of indices specified with a bitmap. <a href="#78c8337d805702f66993612762e20438"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
extensions for the partice feature (deprecated)
<p>
<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000077">Deprecated:</a></b></dt><dd>The PhysX particle feature has been deprecated in PhysX version 3.4 </dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="5e6cfaf89ef796fb909f5e8e583a7cef"></a><!-- doxytag: member="PxParticleExt::buildBoundsHash" ref="5e6cfaf89ef796fb909f5e8e583a7cef" args="(PxU32 *sortedParticleIndices, ParticleBounds *particleBounds, const PxStrideIterator< const PxVec3 > &positionBuffer, const PxU32 validParticleRange, const PxU32 *validParticleBitmap, const PxU32 hashSize, const PxU32 maxBounds, const PxReal gridSpacing)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> PxParticleExt::buildBoundsHash </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> * </td>
<td class="paramname"> <em>sortedParticleIndices</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> * </td>
<td class="paramname"> <em>particleBounds</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPxStrideIterator.html">PxStrideIterator</a>< const <a class="el" href="classPxVec3.html">PxVec3</a> > & </td>
<td class="paramname"> <em>positionBuffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>validParticleRange</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> * </td>
<td class="paramname"> <em>validParticleBitmap</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>hashSize</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>maxBounds</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const PxReal </td>
<td class="paramname"> <em>gridSpacing</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Computes particle bounds by sorting particle positions into a spatial hash grid.
<p>
Given a strided array of particle positions, this function partitions the particles into subsets of nearby particles by mapping the particle positions onto a 3-dimensional grid and creating <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> data structures for each occupied grid cell.<p>
Each returned <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> data structure can be used to determine the indices of the particles belonging to the same grid cell. Particle indices of one grid cell are returned as contiguous blocks in the sortedParticleIndices buffer and can be found within the range [firstParticle, firstParticle + numParticles - 1]. Each returned <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> further contains an AABB "bounds" that tightly fits all particle positions within the grid cell.<p>
The number of created <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> can be retrieved via the return value. The user can cap the maximum amount of generated <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> via the maxBounds parameter. Particles that would cause this maximum to be exceeded will be skipped over and will not be part of any returned <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a>. (Note that this also hold when maxBounds is equal to hashSize. Thus, in the worst case, if no particle should ever be skipped over by the algorithm "hashSize" must be at least equal to numParticles)<p>
The user is responsible for allocating the output buffers sortedParticleIndices (for at least numParticles entries) and particleBounds (for at least maxBounds entries).<p>
The size of a cubical grid cell can be tuned by setting the gridSpacing parameter.<p>
The user supplied hashSize must be a power of two.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>sortedParticleIndices</em> </td><td>Pointer to user allocated array of size numParticles where the sorted particle indices will be written to. </td></tr>
<tr><td valign="top"><tt>[out]</tt> </td><td valign="top"><em>particleBounds</em> </td><td>Pointer to user allocated array of size maxBounds where the <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> will be written to. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>positionBuffer</em> </td><td>Strided data of input particle positions. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>validParticleRange</em> </td><td>Range of valid particles within validParticleBitmap. (See <a class="el" href="classPxParticleReadData.html#c8fb8c413f919e1f7e95700a45859c35" title="Index after the last valid particle (PxParticleFlag.eVALID set). Its 0 if there are...">PxParticleReadData.validParticleRange</a>). </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>validParticleBitmap</em> </td><td>Bitmap specifying valid slots in positionBuffer. (See <a class="el" href="classPxParticleReadData.html#f5fe5cf59728941236f20bcd2aeb7276" title="Bitmap marking valid particle indices. The bitmap is defined between [0, (PxParticleReadData...">PxParticleReadData.validParticleBitmap</a>). </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>hashSize</em> </td><td>Hash size used internally by the hashing algorithm. Must be a power of two. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>maxBounds</em> </td><td>Maximum number of bounds to be returned. Must be smaller or equal than hashSize. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>gridSpacing</em> </td><td>Side length of each cubical grid cell. </td></tr>
</table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>PxU32. Number of <a class="el" href="structPxParticleExt_1_1ParticleBounds.html">ParticleBounds</a> data structures written to the particleBounds buffer. Smaller or equal than maxBounds. </dd></dl>
</div>
</div><p>
<a class="anchor" name="78c8337d805702f66993612762e20438"></a><!-- doxytag: member="PxParticleExt::createIndexPool" ref="78c8337d805702f66993612762e20438" args="(PxU32 maxParticles, PxU32 validParticleRange, const PxU32 *validParticleBitmap)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classPxParticleExt_1_1IndexPool.html">IndexPool</a>* PxParticleExt::createIndexPool </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>maxParticles</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>validParticleRange</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> * </td>
<td class="paramname"> <em>validParticleBitmap</em></td><td> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a PxParticlesExt::IndexPool instance initialized with a preallocated set of indices specified with a bitmap.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>maxParticles</em> </td><td>Maximum number of available indices. </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>validParticleRange</em> </td><td>Range of indices represented in validParticleBitmap. (See <a class="el" href="classPxParticleReadData.html#c8fb8c413f919e1f7e95700a45859c35" title="Index after the last valid particle (PxParticleFlag.eVALID set). Its 0 if there are...">PxParticleReadData.validParticleRange</a>). </td></tr>
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>validParticleBitmap</em> </td><td>Bitmap specifying the valid particle indices that should be preallocated. (See <a class="el" href="classPxParticleReadData.html#f5fe5cf59728941236f20bcd2aeb7276" title="Bitmap marking valid particle indices. The bitmap is defined between [0, (PxParticleReadData...">PxParticleReadData.validParticleBitmap</a>). </td></tr>
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="b1c48052580ebe5df919b6b5505a9bad"></a><!-- doxytag: member="PxParticleExt::createIndexPool" ref="b1c48052580ebe5df919b6b5505a9bad" args="(PxU32 maxParticles)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classPxParticleExt_1_1IndexPool.html">IndexPool</a>* PxParticleExt::createIndexPool </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__foundation.html#gcce5749db3dcfb916e98c253374264ed">PxU32</a> </td>
<td class="paramname"> <em>maxParticles</em> </td>
<td> ) </td>
<td><code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
Creates a PxParticlesExt::IndexPool instance.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><tt>[in]</tt> </td><td valign="top"><em>maxParticles</em> </td><td>Maximum number of available indices. </td></tr>
</table>
</dl>
</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxParticleExt_8h-source.html">PxParticleExt.h</a></ul>
</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>
|