aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PhysXAPI/files/PxGeometryHelpers_8h-source.html
blob: 34389a71d8088cb846d21c7bc7587c8f6fe8c95e (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
<html>
	<head>
		<title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxGeometryHelpers.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>PxGeometryHelpers.h</h1><a href="PxGeometryHelpers_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_PHYSICS_GEOMETRYHELPERS</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define PX_PHYSICS_GEOMETRYHELPERS</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="PxPhysXCommonConfig_8h.html">common/PxPhysXCommonConfig.h</a>"</span>
<a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="PxGeometry_8h.html">PxGeometry.h</a>"</span>
<a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="PxBoxGeometry_8h.html">PxBoxGeometry.h</a>"</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="PxSphereGeometry_8h.html">PxSphereGeometry.h</a>"</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="PxCapsuleGeometry_8h.html">PxCapsuleGeometry.h</a>"</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="PxPlaneGeometry_8h.html">PxPlaneGeometry.h</a>"</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include "<a class="code" href="PxConvexMeshGeometry_8h.html">PxConvexMeshGeometry.h</a>"</span>
<a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="PxTriangleMeshGeometry_8h.html">PxTriangleMeshGeometry.h</a>"</span>
<a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="PxHeightFieldGeometry_8h.html">PxHeightFieldGeometry.h</a>"</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="PxPlane_8h.html">foundation/PxPlane.h</a>"</span>
<a name="l00047"></a>00047 <span class="preprocessor">#include "<a class="code" href="PxTransform_8h.html">foundation/PxTransform.h</a>"</span>
<a name="l00048"></a>00048 <span class="preprocessor">#include "<a class="code" href="PxUnionCast_8h.html">foundation/PxUnionCast.h</a>"</span>
<a name="l00049"></a>00049 
<a name="l00050"></a>00050 <span class="preprocessor">#if !PX_DOXYGEN</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="keyword">namespace </span>physx
<a name="l00052"></a>00052 {
<a name="l00053"></a>00053 <span class="preprocessor">#endif</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00064"></a>00064 <a class="code" href="group__foundation.html#ga645944027e6f4e405de626910e82d8d">PX_ALIGN_PREFIX</a>(4)
<a name="l00065"></a><a class="code" href="classPxGeometryHolder.html">00065</a> class <a class="code" href="classPxGeometryHolder.html" title="Geometry holder class.">PxGeometryHolder</a>
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 <span class="keyword">public</span>:
<a name="l00068"></a><a class="code" href="classPxGeometryHolder.html#9cb321cfc08b5cb744bd52905e0a896f">00068</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed5">PxGeometryType::Enum</a> getType()<span class="keyword"> const</span>
<a name="l00069"></a>00069 <span class="keyword">    </span>{
<a name="l00070"></a>00070         <span class="keywordflow">return</span> any().getType();
<a name="l00071"></a>00071     }
<a name="l00072"></a>00072 
<a name="l00073"></a><a class="code" href="classPxGeometryHolder.html#6c9aeca0bda5885f935c8aaae56851bd">00073</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>&amp; any()
<a name="l00074"></a>00074     { 
<a name="l00075"></a>00075         <span class="keywordflow">return</span> *PxUnionCast&lt;PxGeometry*&gt;(&amp;bytes.geometry); 
<a name="l00076"></a>00076     }
<a name="l00077"></a>00077 
<a name="l00078"></a><a class="code" href="classPxGeometryHolder.html#22cea9e04a1ba570f7342cd3aa15a222">00078</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>&amp; any()<span class="keyword"> const </span>
<a name="l00079"></a>00079 <span class="keyword">    </span>{ 
<a name="l00080"></a>00080         <span class="keywordflow">return</span> *PxUnionCast&lt;const PxGeometry*&gt;(&amp;bytes.geometry); 
<a name="l00081"></a>00081     }
<a name="l00082"></a>00082 
<a name="l00083"></a><a class="code" href="classPxGeometryHolder.html#725211588eba5f168eb9266a25e0b59b">00083</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>&amp; sphere()
<a name="l00084"></a>00084     {
<a name="l00085"></a>00085         <span class="keywordflow">return</span> get&lt;PxSphereGeometry, PxGeometryType::eSPHERE&gt;();
<a name="l00086"></a>00086     }
<a name="l00087"></a>00087 
<a name="l00088"></a><a class="code" href="classPxGeometryHolder.html#5f6cfb9a87f87c5f103c37f4c607640b">00088</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>&amp; sphere()<span class="keyword"> const</span>
<a name="l00089"></a>00089 <span class="keyword">    </span>{
<a name="l00090"></a>00090         <span class="keywordflow">return</span> get&lt;const PxSphereGeometry, PxGeometryType::eSPHERE&gt;();
<a name="l00091"></a>00091     }
<a name="l00092"></a>00092 
<a name="l00093"></a><a class="code" href="classPxGeometryHolder.html#da7be9a86ef1c21903f8a6999449f8c9">00093</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>&amp; plane()
<a name="l00094"></a>00094     {
<a name="l00095"></a>00095         <span class="keywordflow">return</span> get&lt;PxPlaneGeometry, PxGeometryType::ePLANE&gt;();
<a name="l00096"></a>00096     }
<a name="l00097"></a>00097 
<a name="l00098"></a><a class="code" href="classPxGeometryHolder.html#95639c24f8d42a3bba5c8426b05355e0">00098</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>&amp; plane()<span class="keyword"> const</span>
<a name="l00099"></a>00099 <span class="keyword">    </span>{
<a name="l00100"></a>00100         <span class="keywordflow">return</span> get&lt;const PxPlaneGeometry, PxGeometryType::ePLANE&gt;();
<a name="l00101"></a>00101     }
<a name="l00102"></a>00102 
<a name="l00103"></a><a class="code" href="classPxGeometryHolder.html#e2ab723c270524b88de42f7b7fefa693">00103</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>&amp; capsule()
<a name="l00104"></a>00104     {
<a name="l00105"></a>00105         <span class="keywordflow">return</span> get&lt;PxCapsuleGeometry, PxGeometryType::eCAPSULE&gt;();
<a name="l00106"></a>00106     }
<a name="l00107"></a>00107 
<a name="l00108"></a><a class="code" href="classPxGeometryHolder.html#c99d31993a61c9babd02c3a1932bfb93">00108</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>&amp; capsule()<span class="keyword"> const</span>
<a name="l00109"></a>00109 <span class="keyword">    </span>{
<a name="l00110"></a>00110         <span class="keywordflow">return</span> get&lt;const PxCapsuleGeometry, PxGeometryType::eCAPSULE&gt;();
<a name="l00111"></a>00111     }
<a name="l00112"></a>00112 
<a name="l00113"></a><a class="code" href="classPxGeometryHolder.html#b6b7c8b6ccc215e2aa3030abf141d188">00113</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>&amp; box()
<a name="l00114"></a>00114     {
<a name="l00115"></a>00115         <span class="keywordflow">return</span> get&lt;PxBoxGeometry, PxGeometryType::eBOX&gt;();
<a name="l00116"></a>00116     }
<a name="l00117"></a>00117 
<a name="l00118"></a><a class="code" href="classPxGeometryHolder.html#301e33dda67529a3c613550ab80b6d02">00118</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>&amp; box()<span class="keyword"> const</span>
<a name="l00119"></a>00119 <span class="keyword">    </span>{
<a name="l00120"></a>00120         <span class="keywordflow">return</span> get&lt;const PxBoxGeometry, PxGeometryType::eBOX&gt;();
<a name="l00121"></a>00121     }
<a name="l00122"></a>00122 
<a name="l00123"></a><a class="code" href="classPxGeometryHolder.html#993d07984abdcd1800f2f36a4b89538a">00123</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>&amp; convexMesh()
<a name="l00124"></a>00124     {
<a name="l00125"></a>00125         <span class="keywordflow">return</span> get&lt;PxConvexMeshGeometry, PxGeometryType::eCONVEXMESH&gt;();
<a name="l00126"></a>00126     }
<a name="l00127"></a>00127 
<a name="l00128"></a><a class="code" href="classPxGeometryHolder.html#4e6e3b37b46f402aab0a48967fe9cd62">00128</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>&amp; convexMesh()<span class="keyword"> const</span>
<a name="l00129"></a>00129 <span class="keyword">    </span>{
<a name="l00130"></a>00130         <span class="keywordflow">return</span> get&lt;const PxConvexMeshGeometry, PxGeometryType::eCONVEXMESH&gt;();
<a name="l00131"></a>00131     }
<a name="l00132"></a>00132 
<a name="l00133"></a><a class="code" href="classPxGeometryHolder.html#cbb2fae2f28bd2a84d5459ca524eabf3">00133</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>&amp; triangleMesh()
<a name="l00134"></a>00134     {
<a name="l00135"></a>00135         <span class="keywordflow">return</span> get&lt;PxTriangleMeshGeometry, PxGeometryType::eTRIANGLEMESH&gt;();
<a name="l00136"></a>00136     }
<a name="l00137"></a>00137 
<a name="l00138"></a><a class="code" href="classPxGeometryHolder.html#8fe080404ed2c89714b7f288a9d7aa6f">00138</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>&amp; triangleMesh()<span class="keyword"> const</span>
<a name="l00139"></a>00139 <span class="keyword">    </span>{
<a name="l00140"></a>00140         <span class="keywordflow">return</span> get&lt;const PxTriangleMeshGeometry, PxGeometryType::eTRIANGLEMESH&gt;();
<a name="l00141"></a>00141     }
<a name="l00142"></a>00142 
<a name="l00143"></a><a class="code" href="classPxGeometryHolder.html#a93f73423d7bd5d0a528df4ba8c51ada">00143</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>&amp; heightField()
<a name="l00144"></a>00144     {
<a name="l00145"></a>00145         <span class="keywordflow">return</span> get&lt;PxHeightFieldGeometry, PxGeometryType::eHEIGHTFIELD&gt;();
<a name="l00146"></a>00146     }
<a name="l00147"></a>00147 
<a name="l00148"></a><a class="code" href="classPxGeometryHolder.html#7978336557ca5e3178d05bb9c5d2ba20">00148</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <a class="code" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>&amp; heightField()<span class="keyword"> const</span>
<a name="l00149"></a>00149 <span class="keyword">    </span>{
<a name="l00150"></a>00150         <span class="keywordflow">return</span> get&lt;const PxHeightFieldGeometry, PxGeometryType::eHEIGHTFIELD&gt;();
<a name="l00151"></a>00151     }
<a name="l00152"></a>00152 
<a name="l00153"></a><a class="code" href="classPxGeometryHolder.html#7f4cab3419580e1d985858d1f5ffb653">00153</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">void</span> storeAny(<span class="keyword">const</span> <a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>&amp; geometry)
<a name="l00154"></a>00154     {
<a name="l00155"></a>00155         <a class="code" href="group__foundation.html#g09414aeb1a283b875edb1fa83e551aca">PX_ASSERT_WITH_MESSAGE</a>( (geometry.<a class="code" href="classPxGeometry.html#da00045053aaa9bdc56eeb38066cbe29" title="Returns the type of the geometry.">getType</a>() &gt;= <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed52c5cbcb67ffa54ebcdc1674f12b07fb8">PxGeometryType::eSPHERE</a>) &amp;&amp;
<a name="l00156"></a>00156                                 (geometry.<a class="code" href="classPxGeometry.html#da00045053aaa9bdc56eeb38066cbe29" title="Returns the type of the geometry.">getType</a>() &lt; <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed5fa28e3dbd2e28f7c0948c35723f42105" title="internal use only!">PxGeometryType::eGEOMETRY_COUNT</a>),
<a name="l00157"></a>00157                                 <span class="stringliteral">"Unexpected GeometryType in PxGeometryHolder::storeAny"</span>);
<a name="l00158"></a>00158 
<a name="l00159"></a>00159         <span class="keywordflow">switch</span>(geometry.<a class="code" href="classPxGeometry.html#da00045053aaa9bdc56eeb38066cbe29" title="Returns the type of the geometry.">getType</a>())
<a name="l00160"></a>00160         {
<a name="l00161"></a>00161         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed52c5cbcb67ffa54ebcdc1674f12b07fb8">PxGeometryType::eSPHERE</a>:       put&lt;PxSphereGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00162"></a>00162         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed531e6fe000bdf2ba4c3bd2527351247fc">PxGeometryType::ePLANE</a>:        put&lt;PxPlaneGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00163"></a>00163         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed578c4217b41a6ba726f8a77faecf46bb8">PxGeometryType::eCAPSULE</a>:      put&lt;PxCapsuleGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00164"></a>00164         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed54ac248bdee2283c0471c9dc0eba40c34">PxGeometryType::eBOX</a>:          put&lt;PxBoxGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00165"></a>00165         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed59f3d57b4f0e71ce2a6cf29bee36162ed">PxGeometryType::eCONVEXMESH</a>:   put&lt;PxConvexMeshGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00166"></a>00166         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed56b3210a7dca3bddcc8755338987725eb">PxGeometryType::eTRIANGLEMESH</a>: put&lt;PxTriangleMeshGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00167"></a>00167         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed577b1d68c4f5a18bc259a623e1497a880">PxGeometryType::eHEIGHTFIELD</a>:  put&lt;PxHeightFieldGeometry&gt;(geometry); <span class="keywordflow">break</span>;
<a name="l00168"></a>00168         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed5fa28e3dbd2e28f7c0948c35723f42105" title="internal use only!">PxGeometryType::eGEOMETRY_COUNT</a>:
<a name="l00169"></a>00169         <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed573f7721d7db869464f4038638466d5ac" title="internal use only!">PxGeometryType::eINVALID</a>:      <span class="keywordflow">break</span>;
<a name="l00170"></a>00170         }
<a name="l00171"></a>00171     }
<a name="l00172"></a>00172 
<a name="l00173"></a><a class="code" href="classPxGeometryHolder.html#6baa5591f15ee31feb06bf32774be779">00173</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxGeometryHolder.html#6baa5591f15ee31feb06bf32774be779">PxGeometryHolder</a>()                          {}
<a name="l00174"></a><a class="code" href="classPxGeometryHolder.html#908ace749c6c04d14ca4b27538bc3938">00174</a>     <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxGeometryHolder.html#908ace749c6c04d14ca4b27538bc3938">PxGeometryHolder</a>(<span class="keyword">const</span> <a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>&amp; geometry){ storeAny(geometry);   }
<a name="l00175"></a>00175 
<a name="l00176"></a>00176     <span class="keyword">private</span>:
<a name="l00177"></a><a class="code" href="classPxGeometryHolder.html#ed9b1ec5ec2cacafa9e3d5ee43dabc7b">00177</a>         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keywordtype">void</span> put(<span class="keyword">const</span> <a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>&amp; geometry)
<a name="l00178"></a>00178         {
<a name="l00179"></a>00179             <span class="keyword">static_cast&lt;</span>T&amp;<span class="keyword">&gt;</span>(any()) = static_cast&lt;const T&amp;&gt;(geometry);
<a name="l00180"></a>00180         }
<a name="l00181"></a>00181 
<a name="l00182"></a><a class="code" href="classPxGeometryHolder.html#fac1dbf383d07e5943b1a0684cff9278">00182</a>         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, PxGeometryType::Enum type&gt; T&amp; <span class="keyword">get</span>()
<a name="l00183"></a>00183         {
<a name="l00184"></a>00184             <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(getType() == type);
<a name="l00185"></a>00185             <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T&amp;<span class="keyword">&gt;</span>(any());
<a name="l00186"></a>00186         }
<a name="l00187"></a>00187 
<a name="l00188"></a><a class="code" href="classPxGeometryHolder.html#fb30bce3ee8c0f9f1ea9bff057abbb63">00188</a>         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T, PxGeometryType::Enum type&gt; T&amp; <span class="keyword">get</span>() <span class="keyword">const</span>
<a name="l00189"></a>00189         {
<a name="l00190"></a>00190             <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(getType() == type);
<a name="l00191"></a>00191             <span class="keywordflow">return</span> <span class="keyword">static_cast&lt;</span>T&amp;<span class="keyword">&gt;</span>(any());
<a name="l00192"></a>00192         }
<a name="l00193"></a>00193 
<a name="l00194"></a>00194     <span class="keyword">union </span>{
<a name="l00195"></a><a class="code" href="classPxGeometryHolder.html#fcb5030748d06e0f7602bb88ee3e32d5">00195</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    geometry[<span class="keyword">sizeof</span>(<a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>)];
<a name="l00196"></a><a class="code" href="classPxGeometryHolder.html#6fab820a0dc0a5bc48869009d47c34f3">00196</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    box[<span class="keyword">sizeof</span>(<a class="code" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>)];
<a name="l00197"></a><a class="code" href="classPxGeometryHolder.html#bff8115d43e86a7d3c7ecdc5aeef1d1a">00197</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    sphere[<span class="keyword">sizeof</span>(<a class="code" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>)];
<a name="l00198"></a><a class="code" href="classPxGeometryHolder.html#257945977ceabbc34e4ddd5a90580002">00198</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    capsule[<span class="keyword">sizeof</span>(<a class="code" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>)];
<a name="l00199"></a><a class="code" href="classPxGeometryHolder.html#d67cf9387e22e8f90140f782e27591ac">00199</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    plane[<span class="keyword">sizeof</span>(<a class="code" href="classPxPlaneGeometry.html" title="Class describing a plane geometry.">PxPlaneGeometry</a>)];
<a name="l00200"></a><a class="code" href="classPxGeometryHolder.html#c33b37ad65b0faa230784e6be0e49ad6">00200</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    convex[<span class="keyword">sizeof</span>(<a class="code" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>)];
<a name="l00201"></a><a class="code" href="classPxGeometryHolder.html#c8a0e2e83c34c91eb1facd01deb3f484">00201</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    mesh[<span class="keyword">sizeof</span>(<a class="code" href="classPxTriangleMeshGeometry.html" title="Triangle mesh geometry class.">PxTriangleMeshGeometry</a>)];
<a name="l00202"></a><a class="code" href="classPxGeometryHolder.html#13086e315b9865701c5d4c03031723ca">00202</a>         <a class="code" href="namespacephysx.html#3849f86abc21d3a58949481603fe8309">PxU8</a>    heightfield[<span class="keyword">sizeof</span>(<a class="code" href="classPxHeightFieldGeometry.html" title="Height field geometry class.">PxHeightFieldGeometry</a>)];
<a name="l00203"></a>00203     } bytes;
<a name="l00204"></a>00204 }
<a name="l00205"></a>00205 <a class="code" href="group__foundation.html#g7160eeaa47f99f991d9b1f113b398143">PX_ALIGN_SUFFIX</a>(4);
<a name="l00206"></a>00206 
<a name="l00207"></a>00207 
<a name="l00208"></a>00208 
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 <span class="preprocessor">#if !PX_DOXYGEN</span>
<a name="l00211"></a>00211 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span>
<a name="l00212"></a>00212 <span class="preprocessor">#endif</span>
<a name="l00213"></a>00213 <span class="preprocessor"></span>
<a name="l00215"></a>00215 <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>