aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html
diff options
context:
space:
mode:
authorgit perforce import user <a@b>2016-10-25 12:29:14 -0600
committerSheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees>2016-10-25 18:56:37 -0500
commit3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch)
treefa6485c169e50d7415a651bf838f5bcd0fd3bfbd /PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html
downloadphysx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz
physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip
Initial commit:
PhysX 3.4.0 Update @ 21294896 APEX 1.4.0 Update @ 21275617 [CL 21300167]
Diffstat (limited to 'PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html')
-rw-r--r--PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html278
1 files changed, 278 insertions, 0 deletions
diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html
new file mode 100644
index 00000000..46419a2b
--- /dev/null
+++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxMassProperties_8h-source.html
@@ -0,0 +1,278 @@
+<html>
+ <head>
+ <title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxMassProperties.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>PxMassProperties.h</h1><a href="PxMassProperties_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This code contains NVIDIA Confidential Information and is disclosed to you</span>
+<a name="l00002"></a>00002 <span class="comment">// under a form of NVIDIA software license agreement provided separately to you.</span>
+<a name="l00003"></a>00003 <span class="comment">//</span>
+<a name="l00004"></a>00004 <span class="comment">// Notice</span>
+<a name="l00005"></a>00005 <span class="comment">// NVIDIA Corporation and its licensors retain all intellectual property and</span>
+<a name="l00006"></a>00006 <span class="comment">// proprietary rights in and to this software and related documentation and</span>
+<a name="l00007"></a>00007 <span class="comment">// any modifications thereto. Any use, reproduction, disclosure, or</span>
+<a name="l00008"></a>00008 <span class="comment">// distribution of this software and related documentation without an express</span>
+<a name="l00009"></a>00009 <span class="comment">// license agreement from NVIDIA Corporation is strictly prohibited.</span>
+<a name="l00010"></a>00010 <span class="comment">//</span>
+<a name="l00011"></a>00011 <span class="comment">// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES</span>
+<a name="l00012"></a>00012 <span class="comment">// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO</span>
+<a name="l00013"></a>00013 <span class="comment">// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,</span>
+<a name="l00014"></a>00014 <span class="comment">// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.</span>
+<a name="l00015"></a>00015 <span class="comment">//</span>
+<a name="l00016"></a>00016 <span class="comment">// Information and code furnished is believed to be accurate and reliable.</span>
+<a name="l00017"></a>00017 <span class="comment">// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such</span>
+<a name="l00018"></a>00018 <span class="comment">// information or for any infringement of patents or other rights of third parties that may</span>
+<a name="l00019"></a>00019 <span class="comment">// result from its use. No license is granted by implication or otherwise under any patent</span>
+<a name="l00020"></a>00020 <span class="comment">// or patent rights of NVIDIA Corporation. Details are subject to change without notice.</span>
+<a name="l00021"></a>00021 <span class="comment">// This code supersedes and replaces all information previously supplied.</span>
+<a name="l00022"></a>00022 <span class="comment">// NVIDIA Corporation products are not authorized for use as critical</span>
+<a name="l00023"></a>00023 <span class="comment">// components in life support devices or systems without express written approval of</span>
+<a name="l00024"></a>00024 <span class="comment">// NVIDIA Corporation.</span>
+<a name="l00025"></a>00025 <span class="comment">//</span>
+<a name="l00026"></a>00026 <span class="comment">// Copyright (c) 2008-2016 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_EXTENSIONS_MASS_PROPERTIES_H</span>
+<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define PX_PHYSICS_EXTENSIONS_MASS_PROPERTIES_H</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="PxMath_8h.html">foundation/PxMath.h</a>"</span>
+<a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="PxMathUtils_8h.html">foundation/PxMathUtils.h</a>"</span>
+<a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="PxVec3_8h.html">foundation/PxVec3.h</a>"</span>
+<a name="l00041"></a>00041 <span class="preprocessor">#include "<a class="code" href="PxMat33_8h.html">foundation/PxMat33.h</a>"</span>
+<a name="l00042"></a>00042 <span class="preprocessor">#include "<a class="code" href="PxQuat_8h.html">foundation/PxQuat.h</a>"</span>
+<a name="l00043"></a>00043 <span class="preprocessor">#include "<a class="code" href="PxTransform_8h.html">foundation/PxTransform.h</a>"</span>
+<a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="PxGeometry_8h.html">geometry/PxGeometry.h</a>"</span>
+<a name="l00045"></a>00045 <span class="preprocessor">#include "<a class="code" href="PxBoxGeometry_8h.html">geometry/PxBoxGeometry.h</a>"</span>
+<a name="l00046"></a>00046 <span class="preprocessor">#include "<a class="code" href="PxSphereGeometry_8h.html">geometry/PxSphereGeometry.h</a>"</span>
+<a name="l00047"></a>00047 <span class="preprocessor">#include "<a class="code" href="PxCapsuleGeometry_8h.html">geometry/PxCapsuleGeometry.h</a>"</span>
+<a name="l00048"></a>00048 <span class="preprocessor">#include "<a class="code" href="PxConvexMeshGeometry_8h.html">geometry/PxConvexMeshGeometry.h</a>"</span>
+<a name="l00049"></a>00049 <span class="preprocessor">#include "<a class="code" href="PxConvexMesh_8h.html">geometry/PxConvexMesh.h</a>"</span>
+<a name="l00050"></a>00050
+<a name="l00051"></a>00051 <span class="preprocessor">#if !PX_DOXYGEN</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="keyword">namespace </span>physx
+<a name="l00053"></a>00053 {
+<a name="l00054"></a>00054 <span class="preprocessor">#endif</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span>
+<a name="l00063"></a><a class="code" href="classPxMassProperties.html">00063</a> <span class="keyword">class </span><a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a>
+<a name="l00064"></a>00064 {
+<a name="l00065"></a>00065 <span class="keyword">public</span>:
+<a name="l00069"></a><a class="code" href="classPxMassProperties.html#1cbdb127fcb5b2b3617693e24ccdb49b">00069</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxMassProperties.html#1cbdb127fcb5b2b3617693e24ccdb49b" title="Default constructor.">PxMassProperties</a>() : inertiaTensor(<a class="code" href="group__foundation.html#gg70160ca5bbafef277790b3e0f12baf3895e14c69af8048aedd218cd6e96ad50f">PxIdentity</a>), centerOfMass(0.0f), mass(1.0f) {}
+<a name="l00070"></a>00070
+<a name="l00074"></a><a class="code" href="classPxMassProperties.html#5a7eadca391b0cd981c0b35e08c82662">00074</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxMassProperties.html#5a7eadca391b0cd981c0b35e08c82662" title="Construct from individual elements.">PxMassProperties</a>(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> m, <span class="keyword">const</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a>&amp; inertiaT, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; com) : inertiaTensor(inertiaT), centerOfMass(com), mass(m) {}
+<a name="l00075"></a>00075
+<a name="l00083"></a><a class="code" href="classPxMassProperties.html#cc8eadc90e93df0e25d4dfb63988a596">00083</a> <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a>(<span class="keyword">const</span> <a class="code" href="classPxGeometry.html" title="A geometry object.">PxGeometry</a>&amp; geometry)
+<a name="l00084"></a>00084 {
+<a name="l00085"></a>00085 <span class="keywordflow">switch</span> (geometry.<a class="code" href="classPxGeometry.html#da00045053aaa9bdc56eeb38066cbe29" title="Returns the type of the geometry.">getType</a>())
+<a name="l00086"></a>00086 {
+<a name="l00087"></a>00087 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed52c5cbcb67ffa54ebcdc1674f12b07fb8">PxGeometryType::eSPHERE</a>:
+<a name="l00088"></a>00088 {
+<a name="l00089"></a>00089 <span class="keyword">const</span> <a class="code" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>&amp; s = <span class="keyword">static_cast&lt;</span><span class="keyword">const </span><a class="code" href="classPxSphereGeometry.html" title="A class representing the geometry of a sphere.">PxSphereGeometry</a>&amp;<span class="keyword">&gt;</span>(geometry);
+<a name="l00090"></a>00090 mass = (4.0f / 3.0f) * <a class="code" href="group__foundation.html#gbcd49a429b8119de54375b3538ae8a8d">PxPi</a> * s.<a class="code" href="classPxSphereGeometry.html#092be2e608f402b2c2da0309ad6fb2df" title="The radius of the sphere.">radius</a> * s.<a class="code" href="classPxSphereGeometry.html#092be2e608f402b2c2da0309ad6fb2df" title="The radius of the sphere.">radius</a> * s.<a class="code" href="classPxSphereGeometry.html#092be2e608f402b2c2da0309ad6fb2df" title="The radius of the sphere.">radius</a>;
+<a name="l00091"></a>00091 inertiaTensor = <a class="code" href="classPxMat33.html#e7052afa072d3c45c1f570a6a794c6a5" title="Construct from diagonal, off-diagonals are zero.">PxMat33::createDiagonal</a>(<a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(2.0f / 5.0f * mass * s.<a class="code" href="classPxSphereGeometry.html#092be2e608f402b2c2da0309ad6fb2df" title="The radius of the sphere.">radius</a> * s.<a class="code" href="classPxSphereGeometry.html#092be2e608f402b2c2da0309ad6fb2df" title="The radius of the sphere.">radius</a>));
+<a name="l00092"></a>00092 centerOfMass = <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(0.0f);
+<a name="l00093"></a>00093 }
+<a name="l00094"></a>00094 <span class="keywordflow">break</span>;
+<a name="l00095"></a>00095
+<a name="l00096"></a>00096 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed54ac248bdee2283c0471c9dc0eba40c34">PxGeometryType::eBOX</a>:
+<a name="l00097"></a>00097 {
+<a name="l00098"></a>00098 <span class="keyword">const</span> <a class="code" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>&amp; b = <span class="keyword">static_cast&lt;</span><span class="keyword">const </span><a class="code" href="classPxBoxGeometry.html" title="Class representing the geometry of a box.">PxBoxGeometry</a>&amp;<span class="keyword">&gt;</span>(geometry);
+<a name="l00099"></a>00099 mass = b.<a class="code" href="classPxBoxGeometry.html#8fe8be4ca1467353956634d550dc8561" title="Half of the width, height, and depth of the box.">halfExtents</a>.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> * b.<a class="code" href="classPxBoxGeometry.html#8fe8be4ca1467353956634d550dc8561" title="Half of the width, height, and depth of the box.">halfExtents</a>.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> * b.<a class="code" href="classPxBoxGeometry.html#8fe8be4ca1467353956634d550dc8561" title="Half of the width, height, and depth of the box.">halfExtents</a>.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a> * 8.0f;
+<a name="l00100"></a>00100 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> d2 = b.<a class="code" href="classPxBoxGeometry.html#8fe8be4ca1467353956634d550dc8561" title="Half of the width, height, and depth of the box.">halfExtents</a>.<a class="code" href="classPxVec3.html#9cc40866bdd9940ef8a3cc8d2a75a593" title="a[i] * b[i], for all i.">multiply</a>(b.<a class="code" href="classPxBoxGeometry.html#8fe8be4ca1467353956634d550dc8561" title="Half of the width, height, and depth of the box.">halfExtents</a>);
+<a name="l00101"></a>00101 inertiaTensor = <a class="code" href="classPxMat33.html#e7052afa072d3c45c1f570a6a794c6a5" title="Construct from diagonal, off-diagonals are zero.">PxMat33::createDiagonal</a>(<a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(d2.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> + d2.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>, d2.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> + d2.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>, d2.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> + d2.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>)) * (mass * 2.0f / 3.0f);
+<a name="l00102"></a>00102 centerOfMass = <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(0.0f);
+<a name="l00103"></a>00103 }
+<a name="l00104"></a>00104 <span class="keywordflow">break</span>;
+<a name="l00105"></a>00105
+<a name="l00106"></a>00106 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed578c4217b41a6ba726f8a77faecf46bb8">PxGeometryType::eCAPSULE</a>:
+<a name="l00107"></a>00107 {
+<a name="l00108"></a>00108 <span class="keyword">const</span> <a class="code" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>&amp; c = <span class="keyword">static_cast&lt;</span><span class="keyword">const </span><a class="code" href="classPxCapsuleGeometry.html" title="Class representing the geometry of a capsule.">PxCapsuleGeometry</a>&amp;<span class="keyword">&gt;</span>(geometry);
+<a name="l00109"></a>00109 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> r = c.<a class="code" href="classPxCapsuleGeometry.html#c4f07af35bc86338c5bd01e11266dadd" title="The radius of the capsule.">radius</a>, h = c.<a class="code" href="classPxCapsuleGeometry.html#f5affd7d085f89d0a90a35b97214cc40" title="half of the capsule&amp;#39;s height, measured between the centers of the hemispherical...">halfHeight</a>;
+<a name="l00110"></a>00110 mass = ((4.0f / 3.0f) * r + 2 * c.<a class="code" href="classPxCapsuleGeometry.html#f5affd7d085f89d0a90a35b97214cc40" title="half of the capsule&amp;#39;s height, measured between the centers of the hemispherical...">halfHeight</a>) * <a class="code" href="group__foundation.html#gbcd49a429b8119de54375b3538ae8a8d">PxPi</a> * r * r;
+<a name="l00111"></a>00111
+<a name="l00112"></a>00112 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> a = r*r*r * (8.0f / 15.0f) + h*r*r * (3.0f / 2.0f) + h*h*r * (4.0f / 3.0f) + h*h*h * (2.0f / 3.0f);
+<a name="l00113"></a>00113 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> b = r*r*r * (8.0f / 15.0f) + h*r*r;
+<a name="l00114"></a>00114 inertiaTensor = <a class="code" href="classPxMat33.html#e7052afa072d3c45c1f570a6a794c6a5" title="Construct from diagonal, off-diagonals are zero.">PxMat33::createDiagonal</a>(<a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(b, a, a) * <a class="code" href="group__foundation.html#gbcd49a429b8119de54375b3538ae8a8d">PxPi</a> * r * r);
+<a name="l00115"></a>00115 centerOfMass = <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(0.0f);
+<a name="l00116"></a>00116 }
+<a name="l00117"></a>00117 <span class="keywordflow">break</span>;
+<a name="l00118"></a>00118
+<a name="l00119"></a>00119 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed59f3d57b4f0e71ce2a6cf29bee36162ed">PxGeometryType::eCONVEXMESH</a>:
+<a name="l00120"></a>00120 {
+<a name="l00121"></a>00121 <span class="keyword">const</span> <a class="code" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>&amp; c = <span class="keyword">static_cast&lt;</span><span class="keyword">const </span><a class="code" href="classPxConvexMeshGeometry.html" title="Convex mesh geometry class.">PxConvexMeshGeometry</a>&amp;<span class="keyword">&gt;</span>(geometry);
+<a name="l00122"></a>00122 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> unscaledCoM;
+<a name="l00123"></a>00123 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> unscaledInertiaTensor;
+<a name="l00124"></a>00124 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> unscaledMass;
+<a name="l00125"></a>00125 c.<a class="code" href="classPxConvexMeshGeometry.html#2fdc589d347de81e55c8b45b7c133feb" title="A reference to the convex mesh object.">convexMesh</a>-&gt;<a class="code" href="classPxConvexMesh.html#497cea6e1975b9081760afc602985bbc" title="Returns the mass properties of the mesh assuming unit density.">getMassInformation</a>(unscaledMass, unscaledInertiaTensor, unscaledCoM);
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127 <span class="keyword">const</span> <a class="code" href="classPxMeshScale.html" title="A class expressing a nonuniform scaling transformation.">PxMeshScale</a>&amp; s = c.<a class="code" href="classPxConvexMeshGeometry.html#777f625bb1fd49fabf03eb4be02ed581" title="The scaling transformation (from vertex space to shape space).">scale</a>;
+<a name="l00128"></a>00128 mass = unscaledMass * s.<a class="code" href="classPxMeshScale.html#12f2dbcf5214c4c5956dab0e75831449" title="A nonuniform scaling.">scale</a>.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> * s.<a class="code" href="classPxMeshScale.html#12f2dbcf5214c4c5956dab0e75831449" title="A nonuniform scaling.">scale</a>.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> * s.<a class="code" href="classPxMeshScale.html#12f2dbcf5214c4c5956dab0e75831449" title="A nonuniform scaling.">scale</a>.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>;
+<a name="l00129"></a>00129 centerOfMass = s.<a class="code" href="classPxMeshScale.html#63902c04c9a3f326b5f969fa931e53fd" title="The orientation of the scaling axes.">rotation</a>.<a class="code" href="classPxQuat.html#b5ffbf8b2b7bd871e6ac0b854fd5730e">rotate</a>(s.<a class="code" href="classPxMeshScale.html#12f2dbcf5214c4c5956dab0e75831449" title="A nonuniform scaling.">scale</a>.<a class="code" href="classPxVec3.html#9cc40866bdd9940ef8a3cc8d2a75a593" title="a[i] * b[i], for all i.">multiply</a>(s.<a class="code" href="classPxMeshScale.html#63902c04c9a3f326b5f969fa931e53fd" title="The orientation of the scaling axes.">rotation</a>.<a class="code" href="classPxQuat.html#6ce4a234b750b076459632e60579cf78">rotateInv</a>(unscaledCoM)));
+<a name="l00130"></a>00130 inertiaTensor = scaleInertia(unscaledInertiaTensor, s.<a class="code" href="classPxMeshScale.html#63902c04c9a3f326b5f969fa931e53fd" title="The orientation of the scaling axes.">rotation</a>, s.<a class="code" href="classPxMeshScale.html#12f2dbcf5214c4c5956dab0e75831449" title="A nonuniform scaling.">scale</a>);
+<a name="l00131"></a>00131 }
+<a name="l00132"></a>00132 <span class="keywordflow">break</span>;
+<a name="l00133"></a>00133
+<a name="l00134"></a>00134 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed577b1d68c4f5a18bc259a623e1497a880">PxGeometryType::eHEIGHTFIELD</a>:
+<a name="l00135"></a>00135 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed531e6fe000bdf2ba4c3bd2527351247fc">PxGeometryType::ePLANE</a>:
+<a name="l00136"></a>00136 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed56b3210a7dca3bddcc8755338987725eb">PxGeometryType::eTRIANGLEMESH</a>:
+<a name="l00137"></a>00137 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed573f7721d7db869464f4038638466d5ac" title="internal use only!">PxGeometryType::eINVALID</a>:
+<a name="l00138"></a>00138 <span class="keywordflow">case</span> <a class="code" href="structPxGeometryType.html#efc79f72c4c479192ac19d41a6f30ed5fa28e3dbd2e28f7c0948c35723f42105" title="internal use only!">PxGeometryType::eGEOMETRY_COUNT</a>:
+<a name="l00139"></a>00139 {
+<a name="l00140"></a>00140 *<span class="keyword">this</span> = <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a>();
+<a name="l00141"></a>00141 }
+<a name="l00142"></a>00142 <span class="keywordflow">break</span>;
+<a name="l00143"></a>00143 }
+<a name="l00144"></a>00144
+<a name="l00145"></a>00145 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(inertiaTensor.column0.isFinite() &amp;&amp; inertiaTensor.column1.isFinite() &amp;&amp; inertiaTensor.column2.isFinite());
+<a name="l00146"></a>00146 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(centerOfMass.isFinite());
+<a name="l00147"></a>00147 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(<a class="code" href="group__foundation.html#gd6de0f4af98c5c5280b8fe695dc87318" title="returns true if the passed number is a finite floating point number as opposed to...">PxIsFinite</a>(mass));
+<a name="l00148"></a>00148 }
+<a name="l00149"></a>00149
+<a name="l00156"></a><a class="code" href="classPxMassProperties.html#17203e50d0713712a2784a2ad51ed198">00156</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a> <a class="code" href="group__foundation.html#ga7415102b45174d3eda4d4f2f12127bc">operator*</a>(<span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> scale)<span class="keyword"> const</span>
+<a name="l00157"></a>00157 <span class="keyword"> </span>{
+<a name="l00158"></a>00158 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(<a class="code" href="group__foundation.html#gd6de0f4af98c5c5280b8fe695dc87318" title="returns true if the passed number is a finite floating point number as opposed to...">PxIsFinite</a>(scale));
+<a name="l00159"></a>00159
+<a name="l00160"></a>00160 <span class="keywordflow">return</span> <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a>(mass * scale, inertiaTensor * scale, centerOfMass);
+<a name="l00161"></a>00161 }
+<a name="l00162"></a>00162
+<a name="l00168"></a><a class="code" href="classPxMassProperties.html#6b65afdb22147ade5f1ca7f77e591924">00168</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">void</span> translate(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; t)
+<a name="l00169"></a>00169 {
+<a name="l00170"></a>00170 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(t.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00171"></a>00171
+<a name="l00172"></a>00172 inertiaTensor = translateInertia(inertiaTensor, mass, t);
+<a name="l00173"></a>00173 centerOfMass += t;
+<a name="l00174"></a>00174
+<a name="l00175"></a>00175 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(inertiaTensor.column0.isFinite() &amp;&amp; inertiaTensor.column1.isFinite() &amp;&amp; inertiaTensor.column2.isFinite());
+<a name="l00176"></a>00176 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(centerOfMass.isFinite());
+<a name="l00177"></a>00177 }
+<a name="l00178"></a>00178
+<a name="l00186"></a><a class="code" href="classPxMassProperties.html#53afd0d4b906ee9d96b23ea0bb41287b">00186</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">static</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> getMassSpaceInertia(<span class="keyword">const</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a>&amp; inertia, <a class="code" href="classPxQuat.html" title="This is a quaternion class. For more information on quaternion mathematics consult...">PxQuat</a>&amp; massFrame)
+<a name="l00187"></a>00187 {
+<a name="l00188"></a>00188 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(inertia.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> diagT = <a class="code" href="group__common.html#gde7a77d4ae9d14e363364a9d72cf4932">PxDiagonalize</a>(inertia, massFrame);
+<a name="l00191"></a>00191 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(diagT.isFinite());
+<a name="l00192"></a>00192 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(massFrame.<a class="code" href="classPxQuat.html#a435b2284fdc3d4ad85bec6074f2bad4" title="returns true if all elements are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00193"></a>00193 <span class="keywordflow">return</span> diagT;
+<a name="l00194"></a>00194 }
+<a name="l00195"></a>00195
+<a name="l00204"></a><a class="code" href="classPxMassProperties.html#cf94746d2a0e2e989bad06d97c6c387b">00204</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">static</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> translateInertia(<span class="keyword">const</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a>&amp; inertia, <span class="keyword">const</span> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> mass, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; t)
+<a name="l00205"></a>00205 {
+<a name="l00206"></a>00206 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(inertia.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00207"></a>00207 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(<a class="code" href="group__foundation.html#gd6de0f4af98c5c5280b8fe695dc87318" title="returns true if the passed number is a finite floating point number as opposed to...">PxIsFinite</a>(mass));
+<a name="l00208"></a>00208 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(t.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00209"></a>00209
+<a name="l00210"></a>00210 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> s( <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(0,t.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>,-t.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>),
+<a name="l00211"></a>00211 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(-t.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>,0,t.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>),
+<a name="l00212"></a>00212 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(t.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>,-t.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>,0) );
+<a name="l00213"></a>00213
+<a name="l00214"></a>00214 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> translatedIT = s.getTranspose() * s * mass + inertia;
+<a name="l00215"></a>00215 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(translatedIT.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; translatedIT.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; translatedIT.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00216"></a>00216 <span class="keywordflow">return</span> translatedIT;
+<a name="l00217"></a>00217 }
+<a name="l00218"></a>00218
+<a name="l00226"></a><a class="code" href="classPxMassProperties.html#4d63a246cd8a59f8709126a4b4528fb6">00226</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">static</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> rotateInertia(<span class="keyword">const</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a>&amp; inertia, <span class="keyword">const</span> <a class="code" href="classPxQuat.html" title="This is a quaternion class. For more information on quaternion mathematics consult...">PxQuat</a>&amp; q)
+<a name="l00227"></a>00227 {
+<a name="l00228"></a>00228 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(inertia.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00229"></a>00229 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(q.<a class="code" href="classPxQuat.html#3890ca4efba038ab0fc84bb39c5267db" title="returns true if finite and magnitude is close to unit">isUnit</a>());
+<a name="l00230"></a>00230
+<a name="l00231"></a>00231 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> m(q);
+<a name="l00232"></a>00232 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> rotatedIT = m * inertia * m.<a class="code" href="classPxMat33.html#4ac2e5e46952e91a18126a5de02d2697" title="Get transposed matrix.">getTranspose</a>();
+<a name="l00233"></a>00233 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(rotatedIT.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; rotatedIT.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; rotatedIT.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00234"></a>00234 <span class="keywordflow">return</span> rotatedIT;
+<a name="l00235"></a>00235 }
+<a name="l00236"></a>00236
+<a name="l00245"></a><a class="code" href="classPxMassProperties.html#4ba3bf338320c9f0bf558b5d3a9046bd">00245</a> <span class="keyword">static</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> scaleInertia(<span class="keyword">const</span> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a>&amp; inertia, <span class="keyword">const</span> <a class="code" href="classPxQuat.html" title="This is a quaternion class. For more information on quaternion mathematics consult...">PxQuat</a>&amp; scaleRotation, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>&amp; scale)
+<a name="l00246"></a>00246 {
+<a name="l00247"></a>00247 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(inertia.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; inertia.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00248"></a>00248 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(scaleRotation.<a class="code" href="classPxQuat.html#3890ca4efba038ab0fc84bb39c5267db" title="returns true if finite and magnitude is close to unit">isUnit</a>());
+<a name="l00249"></a>00249 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(scale.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00250"></a>00250
+<a name="l00251"></a>00251 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> localInertiaT = rotateInertia(inertia, scaleRotation); <span class="comment">// rotate inertia into scaling frame</span>
+<a name="l00252"></a>00252 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> diagonal(localInertiaT[0][0], localInertiaT[1][1], localInertiaT[2][2]);
+<a name="l00253"></a>00253
+<a name="l00254"></a>00254 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> xyz2 = <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(diagonal.<a class="code" href="classPxVec3.html#f29c27e8aae481d97570e7990388bdf5" title="returns the scalar product of this and other.">dot</a>(<a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(0.5f))) - diagonal; <span class="comment">// original x^2, y^2, z^2</span>
+<a name="l00255"></a>00255 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> scaledxyz2 = xyz2.<a class="code" href="classPxVec3.html#9cc40866bdd9940ef8a3cc8d2a75a593" title="a[i] * b[i], for all i.">multiply</a>(scale).<a class="code" href="classPxVec3.html#9cc40866bdd9940ef8a3cc8d2a75a593" title="a[i] * b[i], for all i.">multiply</a>(scale);
+<a name="l00256"></a>00256
+<a name="l00257"></a>00257 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> xx = scaledxyz2.y + scaledxyz2.z,
+<a name="l00258"></a>00258 yy = scaledxyz2.z + scaledxyz2.x,
+<a name="l00259"></a>00259 zz = scaledxyz2.x + scaledxyz2.y;
+<a name="l00260"></a>00260
+<a name="l00261"></a>00261 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> xy = localInertiaT[0][1] * scale.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> * scale.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>,
+<a name="l00262"></a>00262 xz = localInertiaT[0][2] * scale.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> * scale.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>,
+<a name="l00263"></a>00263 yz = localInertiaT[1][2] * scale.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> * scale.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>;
+<a name="l00264"></a>00264
+<a name="l00265"></a>00265 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> scaledInertia( <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(xx, xy, xz),
+<a name="l00266"></a>00266 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(xy, yy, yz),
+<a name="l00267"></a>00267 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(xz, yz, zz));
+<a name="l00268"></a>00268
+<a name="l00269"></a>00269 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> scaledIT = rotateInertia(scaledInertia * (scale.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> * scale.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> * scale.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>), scaleRotation.<a class="code" href="classPxQuat.html#a4418a046f8851753a23a375515b0614">getConjugate</a>());
+<a name="l00270"></a>00270 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(scaledIT.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; scaledIT.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; scaledIT.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00271"></a>00271 <span class="keywordflow">return</span> scaledIT;
+<a name="l00272"></a>00272 }
+<a name="l00273"></a>00273
+<a name="l00282"></a><a class="code" href="classPxMassProperties.html#63e7875cb60efa35150002e56fcfa43f">00282</a> <span class="keyword">static</span> <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a> sum(<span class="keyword">const</span> <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a>* props, <span class="keyword">const</span> <a class="code" href="classPxTransform.html" title="class representing a rigid euclidean transform as a quaternion and a vector">PxTransform</a>* transforms, <span class="keyword">const</span> <a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> count)
+<a name="l00283"></a>00283 {
+<a name="l00284"></a>00284 <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> combinedMass = 0.0f;
+<a name="l00285"></a>00285 <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> combinedCoM(0.0f);
+<a name="l00286"></a>00286 <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> combinedInertiaT = <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a>(<a class="code" href="group__foundation.html#ggc10bd69c94c165a52f6de39678ef9d4c0ea259a79d3556f2986a96b5fbf8d4bc">PxZero</a>);
+<a name="l00287"></a>00287
+<a name="l00288"></a>00288 <span class="keywordflow">for</span>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i = 0; i &lt; count; i++)
+<a name="l00289"></a>00289 {
+<a name="l00290"></a>00290 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(props[i].inertiaTensor.column0.isFinite() &amp;&amp; props[i].<a class="code" href="classPxMassProperties.html#eefe4de17f788dacbf9c48fd5ec857ac" title="The inertia tensor of the object.">inertiaTensor</a>.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; props[i].<a class="code" href="classPxMassProperties.html#eefe4de17f788dacbf9c48fd5ec857ac" title="The inertia tensor of the object.">inertiaTensor</a>.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00291"></a>00291 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(props[i].centerOfMass.isFinite());
+<a name="l00292"></a>00292 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(<a class="code" href="group__foundation.html#gd6de0f4af98c5c5280b8fe695dc87318" title="returns true if the passed number is a finite floating point number as opposed to...">PxIsFinite</a>(props[i].mass));
+<a name="l00293"></a>00293
+<a name="l00294"></a>00294 combinedMass += props[i].<a class="code" href="classPxMassProperties.html#978392fb04bb472602f9fc1315d5f116" title="The mass of the object.">mass</a>;
+<a name="l00295"></a>00295 <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> comTm = transforms[i].<a class="code" href="classPxTransform.html#ee2fa4f5d0f6a1bad831fe0c81094ebd">transform</a>(props[i].centerOfMass);
+<a name="l00296"></a>00296 combinedCoM += comTm * props[i].<a class="code" href="classPxMassProperties.html#978392fb04bb472602f9fc1315d5f116" title="The mass of the object.">mass</a>;
+<a name="l00297"></a>00297 }
+<a name="l00298"></a>00298
+<a name="l00299"></a>00299 combinedCoM /= combinedMass;
+<a name="l00300"></a>00300
+<a name="l00301"></a>00301 <span class="keywordflow">for</span>(<a class="code" href="namespacephysx.html#9b7fbd746d18bf5b6545713a8d818f41">PxU32</a> i = 0; i &lt; count; i++)
+<a name="l00302"></a>00302 {
+<a name="l00303"></a>00303 <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> comTm = transforms[i].<a class="code" href="classPxTransform.html#ee2fa4f5d0f6a1bad831fe0c81094ebd">transform</a>(props[i].centerOfMass);
+<a name="l00304"></a>00304 combinedInertiaT += translateInertia(rotateInertia(props[i].inertiaTensor, transforms[i].q), props[i].mass, combinedCoM - comTm);
+<a name="l00305"></a>00305 }
+<a name="l00306"></a>00306
+<a name="l00307"></a>00307 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(combinedInertiaT.<a class="code" href="classPxMat33.html#89d12d4e50ffc5ef8e480bdd3dadb78a">column0</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; combinedInertiaT.<a class="code" href="classPxMat33.html#62f190479e12e7b9ec5cf831b23c95e9">column1</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>() &amp;&amp; combinedInertiaT.<a class="code" href="classPxMat33.html#9af2a3d4f9cca979c3e46a6406de6957">column2</a>.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00308"></a>00308 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(combinedCoM.<a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160" title="returns true if all 3 elems of the vector are finite (not NAN or INF, etc.)">isFinite</a>());
+<a name="l00309"></a>00309 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(<a class="code" href="group__foundation.html#gd6de0f4af98c5c5280b8fe695dc87318" title="returns true if the passed number is a finite floating point number as opposed to...">PxIsFinite</a>(combinedMass));
+<a name="l00310"></a>00310
+<a name="l00311"></a>00311 <span class="keywordflow">return</span> <a class="code" href="classPxMassProperties.html" title="Utility class to compute and manipulate mass and inertia tensor properties.">PxMassProperties</a>(combinedMass, combinedInertiaT, combinedCoM);
+<a name="l00312"></a>00312 }
+<a name="l00313"></a>00313
+<a name="l00314"></a>00314
+<a name="l00315"></a><a class="code" href="classPxMassProperties.html#eefe4de17f788dacbf9c48fd5ec857ac">00315</a> <a class="code" href="classPxMat33.html" title="3x3 matrix class">PxMat33</a> inertiaTensor;
+<a name="l00316"></a><a class="code" href="classPxMassProperties.html#8f4e5b19248941b3ee2369afadb20e96">00316</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> centerOfMass;
+<a name="l00317"></a><a class="code" href="classPxMassProperties.html#978392fb04bb472602f9fc1315d5f116">00317</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> mass;
+<a name="l00318"></a>00318 };
+<a name="l00319"></a>00319
+<a name="l00320"></a>00320 <span class="preprocessor">#if !PX_DOXYGEN</span>
+<a name="l00321"></a>00321 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span>
+<a name="l00322"></a>00322 <span class="preprocessor">#endif</span>
+<a name="l00323"></a>00323 <span class="preprocessor"></span>
+<a name="l00325"></a>00325 <span class="preprocessor">#endif</span>
+</pre></div></div>
+
+<hr style="width: 100%; height: 2px;"><br>
+Copyright &copy; 2008-2016 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>