aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PhysXAPI/files/classPxCollectionExt.html
blob: 1fd0e6a4aca840ca628f31603b0c1a27551f3cdd (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
<html>
	<head>
		<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxCollectionExt 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> &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 -->
<div class="contents">
<h1>PxCollectionExt Class Reference<br>
<small>
[<a class="el" href="group__extensions.html">Extensions</a>]</small>
</h1><!-- doxytag: class="PxCollectionExt" --><code>#include &lt;<a class="el" href="PxCollectionExt_8h-source.html">PxCollectionExt.h</a>&gt;</code>
<p>

<p>
<a href="classPxCollectionExt-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></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 void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollectionExt.html#88b829ff0266f6ff3cead1dd7da9785c">releaseObjects</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &amp;collection, bool releaseExclusiveShapes=true)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Removes and releases all object from a collection.  <a href="#88b829ff0266f6ff3cead1dd7da9785c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollectionExt.html#f63a23e22b4a3ad678f09a388b29a160">remove</a> (<a class="el" href="classPxCollection.html">PxCollection</a> &amp;collection, <a class="el" href="group__common.html#gc1fb4b256a5d900d394e89db170a2b79">PxType</a> concreteType, <a class="el" href="classPxCollection.html">PxCollection</a> *to=NULL)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Removes objects of a given type from a collection, potentially adding them to another collection.  <a href="#f63a23e22b4a3ad678f09a388b29a160"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxCollection.html">PxCollection</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollectionExt.html#39dbd32faa242e01117cd4ecee3fd2e7">createCollection</a> (<a class="el" href="classPxPhysics.html">PxPhysics</a> &amp;physics)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Collects all objects in <a class="el" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a> that are shareable across multiple scenes.  <a href="#39dbd32faa242e01117cd4ecee3fd2e7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classPxCollection.html">PxCollection</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPxCollectionExt.html#b3e2ad3cfe56c756d78d3a071a064ecf">createCollection</a> (<a class="el" href="classPxScene.html">PxScene</a> &amp;scene)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Collects all objects from a <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a>.  <a href="#b3e2ad3cfe56c756d78d3a071a064ecf"></a><br></td></tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="b3e2ad3cfe56c756d78d3a071a064ecf"></a><!-- doxytag: member="PxCollectionExt::createCollection" ref="b3e2ad3cfe56c756d78d3a071a064ecf" args="(PxScene &amp;scene)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classPxCollection.html">PxCollection</a>* PxCollectionExt::createCollection           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxScene.html">PxScene</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>scene</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Collects all objects from a <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a>. 
<p>
This function creates a new collection from all objects that where added to the specified <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a>. Instances of the following types are included: <a class="el" href="classPxActor.html" title="PxActor is the base class for the main simulation objects in the physics SDK.">PxActor</a>, <a class="el" href="classPxAggregate.html" title="Class to aggregate actors into a single broad-phase entry.">PxAggregate</a>, <a class="el" href="classPxArticulation.html" title="a tree structure of bodies connected by joints that is treated as a unit by the dynamics...">PxArticulation</a> and <a class="el" href="classPxJoint.html" title="a base interface providing common functionality for PhysX joints">PxJoint</a> (other <a class="el" href="classPxConstraint.html" title="A plugin class for implementing constraints.">PxConstraint</a> types are not included).<p>
This is a helper function to ease the creation of collections for serialization. The function <a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization.complete()</a> can be used to complete the collection with required objects prior to serialization.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>scene</em>&nbsp;</td><td>The <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a> instance from which objects are collected. See <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a> </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Collection to which objects are added. See <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a></dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxScene.html" title="A scene is a collection of bodies, particle systems and constraints which can interact...">PxScene</a>, <a class="el" href="classPxSerialization.html#0cf59eda36c56e9e66bac0c2b5168094" title="Adds to a collection all objects such that it can be successfully serialized.">PxSerialization.complete()</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="39dbd32faa242e01117cd4ecee3fd2e7"></a><!-- doxytag: member="PxCollectionExt::createCollection" ref="39dbd32faa242e01117cd4ecee3fd2e7" args="(PxPhysics &amp;physics)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classPxCollection.html">PxCollection</a>* PxCollectionExt::createCollection           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxPhysics.html">PxPhysics</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>physics</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Collects all objects in <a class="el" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a> that are shareable across multiple scenes. 
<p>
This function creates a new collection from all objects that are shareable across multiple scenes. Instances of the following types are included: <a class="el" href="classPxConvexMesh.html" title="A convex mesh.">PxConvexMesh</a>, <a class="el" href="classPxTriangleMesh.html" title="A triangle mesh, also called a &#39;polygon soup&#39;.">PxTriangleMesh</a>, <a class="el" href="classPxHeightField.html" title="A height field class.">PxHeightField</a>, <a class="el" href="classPxShape.html" title="Abstract class for collision shapes.">PxShape</a>, <a class="el" href="classPxMaterial.html" title="Material class to represent a set of surface properties.">PxMaterial</a> and <a class="el" href="classPxClothFabric.html" title="A cloth fabric is a structure that contains all the internal solver constraints of...">PxClothFabric</a>.<p>
This is a helper function to ease the creation of collections for serialization.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>physics</em>&nbsp;</td><td>The physics SDK instance from which objects are collected. See <a class="el" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a> </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Collection to which objects are added. See <a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a></dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="classPxPhysics.html" title="Abstract singleton factory class used for instancing objects in the Physics SDK.">PxPhysics</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="88b829ff0266f6ff3cead1dd7da9785c"></a><!-- doxytag: member="PxCollectionExt::releaseObjects" ref="88b829ff0266f6ff3cead1dd7da9785c" args="(PxCollection &amp;collection, bool releaseExclusiveShapes=true)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void PxCollectionExt::releaseObjects           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>collection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>releaseExclusiveShapes</em> = <code>true</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Removes and releases all object from a collection. 
<p>
The Collection itself is not released.<p>
If the releaseExclusiveShapes flag is not set to true, release() will not be called on exclusive shapes.<p>
It is assumed that the application holds a reference to each of the objects in the collection, with the exception of objects that are not releasable (<a class="el" href="classPxBase.html#25118c0c901d602e74a0ee17679499e9" title="Whether the object is subordinate.">PxBase::isReleasable()</a>). In general, objects that violate this assumption need to be removed from the collection prior to calling releaseObjects.<p>
<dl class="note" compact><dt><b>Note:</b></dt><dd>when a shape is created with <a class="el" href="classPxRigidActor.html#428112f88e7d3ee8abdf378cb70511f8" title="Creates a new shape with default properties and a list of materials and adds it to...">PxRigidActor::createShape()</a> or <a class="el" href="classPxRigidActorExt.html#e708f5ca3fc5f1ce3db14032a89f62b9" title="Creates a new shape with default properties and a list of materials and adds it to...">PxRigidActorExt::createExclusiveShape()</a>, the only counted reference is held by the actor. If such a shape and its actor are present in the collection, the reference count will be decremented once when the actor is released, and once when the shape is released, resulting in undefined behavior. Shape reference counts can be incremented with <a class="el" href="classPxShape.html#46a4aa44d34de7625129c5d449c26e5d" title="Acquires a counted reference to a shape.">PxShape::acquireReference()</a>.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>collection</em>&nbsp;</td><td>to remove and release all object from. </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>releaseExclusiveShapes</em>&nbsp;</td><td>if this parameter is set to false, release() will not be called on exclusive shapes. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="f63a23e22b4a3ad678f09a388b29a160"></a><!-- doxytag: member="PxCollectionExt::remove" ref="f63a23e22b4a3ad678f09a388b29a160" args="(PxCollection &amp;collection, PxType concreteType, PxCollection *to=NULL)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void PxCollectionExt::remove           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>collection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__common.html#gc1fb4b256a5d900d394e89db170a2b79">PxType</a>&nbsp;</td>
          <td class="paramname"> <em>concreteType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classPxCollection.html">PxCollection</a> *&nbsp;</td>
          <td class="paramname"> <em>to</em> = <code>NULL</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Removes objects of a given type from a collection, potentially adding them to another collection. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>collection</em>&nbsp;</td><td>Collection from which objects are removed </td></tr>
    <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>concreteType</em>&nbsp;</td><td><a class="el" href="structPxConcreteType.html" title="an enumeration of concrete classes inheriting from PxBase">PxConcreteType</a> of sdk objects that should be removed </td></tr>
    <tr><td valign="top"><tt>[in,out]</tt>&nbsp;</td><td valign="top"><em>to</em>&nbsp;</td><td>Optional collection to which the removed objects are added</td></tr>
  </table>
</dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classPxCollection.html" title="Collection class for serialization.">PxCollection</a>, <a class="el" href="structPxConcreteType.html" title="an enumeration of concrete classes inheriting from PxBase">PxConcreteType</a> </dd></dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="PxCollectionExt_8h-source.html">PxCollectionExt.h</a></ul>
</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>