diff options
Diffstat (limited to 'PhysX_3.4/Documentation/PhysXAPI/files/PxJointLimit_8h-source.html')
| -rw-r--r-- | PhysX_3.4/Documentation/PhysXAPI/files/PxJointLimit_8h-source.html | 280 |
1 files changed, 280 insertions, 0 deletions
diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxJointLimit_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxJointLimit_8h-source.html new file mode 100644 index 00000000..2ed397ab --- /dev/null +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxJointLimit_8h-source.html @@ -0,0 +1,280 @@ +<html> + <head> + <title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxJointLimit.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> + <a class="qindex" href="hierarchy.html">Class Hierarchy</a> + <a class="qindex" href="annotated.html">Compound List</a> + <a class="qindex" href="functions.html">Compound Members</a> + </center> + <hr class="second"> + </div> +<!-- Generated by Doxygen 1.5.8 --> +<h1>PxJointLimit.h</h1><a href="PxJointLimit_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_EXTENSIONS_JOINT_LIMIT</span> +<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#define PX_EXTENSIONS_JOINT_LIMIT</span> +<a name="l00033"></a>00033 <span class="preprocessor"></span> +<a name="l00037"></a>00037 <span class="preprocessor">#include "<a class="code" href="PxMath_8h.html">foundation/PxMath.h</a>"</span> +<a name="l00038"></a>00038 <span class="preprocessor">#include "<a class="code" href="PxPhysXConfig_8h.html">PxPhysXConfig.h</a>"</span> +<a name="l00039"></a>00039 <span class="preprocessor">#include "<a class="code" href="PxTolerancesScale_8h.html">common/PxTolerancesScale.h</a>"</span> +<a name="l00040"></a>00040 <span class="preprocessor">#include "<a class="code" href="PxJoint_8h.html">PxJoint.h</a>"</span> +<a name="l00041"></a>00041 +<a name="l00042"></a>00042 <span class="preprocessor">#if !PX_DOXYGEN</span> +<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="keyword">namespace </span>physx +<a name="l00044"></a>00044 { +<a name="l00045"></a>00045 <span class="preprocessor">#endif</span> +<a name="l00046"></a>00046 <span class="preprocessor"></span> +<a name="l00055"></a><a class="code" href="classPxJointLimitParameters.html">00055</a> <span class="keyword">class </span><a class="code" href="classPxJointLimitParameters.html" title="Describes the parameters for a joint limit.">PxJointLimitParameters</a> +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 <span class="comment">//= ATTENTION! =====================================================================================</span> +<a name="l00058"></a>00058 <span class="comment">// Changing the data layout of this class breaks the binary serialization format. See comments for </span> +<a name="l00059"></a>00059 <span class="comment">// PX_BINARY_SERIAL_VERSION. If a modification is required, please adjust the getBinaryMetaData </span> +<a name="l00060"></a>00060 <span class="comment">// function. If the modification is made on a custom branch, please change PX_BINARY_SERIAL_VERSION</span> +<a name="l00061"></a>00061 <span class="comment">// accordingly.</span> +<a name="l00062"></a>00062 <span class="comment">//==================================================================================================</span> +<a name="l00063"></a>00063 <span class="keyword">public</span>: +<a name="l00083"></a><a class="code" href="classPxJointLimitParameters.html#cf208a0f1e54fb8e9219af1e0357d4a9">00083</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> restitution; +<a name="l00084"></a>00084 +<a name="l00085"></a>00085 +<a name="l00090"></a><a class="code" href="classPxJointLimitParameters.html#82e6ed96bd05d01b7459d8200f16df9f">00090</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> bounceThreshold; +<a name="l00097"></a><a class="code" href="classPxJointLimitParameters.html#7431e7b65a92dd7fafc386c6a159a22c">00097</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> stiffness; +<a name="l00098"></a>00098 +<a name="l00105"></a><a class="code" href="classPxJointLimitParameters.html#ac6d185cfc3adea24cdb943cf893beac">00105</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> damping; +<a name="l00106"></a>00106 +<a name="l00123"></a><a class="code" href="classPxJointLimitParameters.html#dc405245761d0b153f490ec1dd65af78">00123</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> contactDistance; +<a name="l00124"></a>00124 +<a name="l00125"></a>00125 +<a name="l00126"></a>00126 +<a name="l00127"></a><a class="code" href="classPxJointLimitParameters.html#b706ebb59cf473d1537741edfab2c387">00127</a> <a class="code" href="classPxJointLimitParameters.html" title="Describes the parameters for a joint limit.">PxJointLimitParameters</a>() +<a name="l00128"></a>00128 : restitution(0) +<a name="l00129"></a>00129 , bounceThreshold(0) +<a name="l00130"></a>00130 , stiffness(0) +<a name="l00131"></a>00131 , damping(0) +<a name="l00132"></a>00132 , contactDistance(0) +<a name="l00133"></a>00133 { +<a name="l00134"></a>00134 } +<a name="l00135"></a>00135 +<a name="l00141"></a><a class="code" href="classPxJointLimitParameters.html#e3d77fff99d5c4ed862a078957edee9c">00141</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isValid()<span class="keyword"> const</span> +<a name="l00142"></a>00142 <span class="keyword"> </span>{ +<a name="l00143"></a>00143 <span class="keywordflow">return</span> <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>(restitution) && restitution >= 0 && restitution <= 1 && +<a name="l00144"></a>00144 <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>(stiffness) && stiffness >= 0 && +<a name="l00145"></a>00145 <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>(damping) && damping >= 0 && +<a name="l00146"></a>00146 <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>(bounceThreshold) && bounceThreshold >= 0 && +<a name="l00147"></a>00147 <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>(contactDistance) && contactDistance >= 0; +<a name="l00148"></a>00148 } +<a name="l00149"></a>00149 +<a name="l00150"></a><a class="code" href="classPxJointLimitParameters.html#e5705850231d60e3c0cb7e73bc270d93">00150</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isSoft()<span class="keyword"> const</span> +<a name="l00151"></a>00151 <span class="keyword"> </span>{ +<a name="l00152"></a>00152 <span class="keywordflow">return</span> damping>0 || stiffness>0; +<a name="l00153"></a>00153 } +<a name="l00154"></a>00154 +<a name="l00155"></a>00155 <span class="keyword">protected</span>: +<a name="l00156"></a><a class="code" href="classPxJointLimitParameters.html#f68daaa7495377cabc01d27d3c2e864e">00156</a> <a class="code" href="classPxJointLimitParameters.html#f68daaa7495377cabc01d27d3c2e864e">~PxJointLimitParameters</a>() {} +<a name="l00157"></a>00157 }; +<a name="l00158"></a>00158 +<a name="l00159"></a>00159 +<a name="l00163"></a><a class="code" href="classPxJointLinearLimit.html">00163</a> <span class="keyword">class </span><a class="code" href="classPxJointLinearLimit.html" title="Describes a one-sided linear limit.">PxJointLinearLimit</a> : <span class="keyword">public</span> <a class="code" href="classPxJointLimitParameters.html" title="Describes the parameters for a joint limit.">PxJointLimitParameters</a> +<a name="l00164"></a>00164 { +<a name="l00165"></a>00165 <span class="comment">//= ATTENTION! =====================================================================================</span> +<a name="l00166"></a>00166 <span class="comment">// Changing the data layout of this class breaks the binary serialization format. See comments for </span> +<a name="l00167"></a>00167 <span class="comment">// PX_BINARY_SERIAL_VERSION. If a modification is required, please adjust the getBinaryMetaData </span> +<a name="l00168"></a>00168 <span class="comment">// function. If the modification is made on a custom branch, please change PX_BINARY_SERIAL_VERSION</span> +<a name="l00169"></a>00169 <span class="comment">// accordingly.</span> +<a name="l00170"></a>00170 <span class="comment">//==================================================================================================</span> +<a name="l00171"></a>00171 <span class="keyword">public</span>: +<a name="l00178"></a><a class="code" href="classPxJointLinearLimit.html#a433e50f27f94ca7191b1251e45f7ed6">00178</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> value; +<a name="l00179"></a>00179 +<a name="l00190"></a><a class="code" href="classPxJointLinearLimit.html#d381f82db6aa6022f7e71d99603fb339">00190</a> <a class="code" href="classPxJointLinearLimit.html" title="Describes a one-sided linear limit.">PxJointLinearLimit</a>(<span class="keyword">const</span> <a class="code" href="classPxTolerancesScale.html" title="Class to define the scale at which simulation runs. Most simulation tolerances are...">PxTolerancesScale</a>& scale, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> extent, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> contactDist = -1) +<a name="l00191"></a>00191 : value(extent) +<a name="l00192"></a>00192 { +<a name="l00193"></a>00193 <a class="code" href="classPxJointLimitParameters.html#dc405245761d0b153f490ec1dd65af78" title="the distance inside the limit value at which the limit will be considered to be active...">PxJointLimitParameters::contactDistance</a> = contactDist == -1 ? 0.01f*scale.<a class="code" href="classPxTolerancesScale.html#7d93bf20de0e5b54783eda5bb64effeb">length</a> : contactDist; +<a name="l00194"></a>00194 } +<a name="l00195"></a>00195 +<a name="l00196"></a>00196 +<a name="l00206"></a><a class="code" href="classPxJointLinearLimit.html#9dd93c344c5ae91752ff365fb069728e">00206</a> <a class="code" href="classPxJointLinearLimit.html" title="Describes a one-sided linear limit.">PxJointLinearLimit</a>(<a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> extent, <span class="keyword">const</span> <a class="code" href="classPxSpring.html">PxSpring</a>& spring) +<a name="l00207"></a>00207 : value(extent) +<a name="l00208"></a>00208 { +<a name="l00209"></a>00209 stiffness = spring.<a class="code" href="classPxSpring.html#eb7dbc850461f2bc652ca73c80e523e1" title="the spring strength of the drive: that is, the force proportional to the position...">stiffness</a>; +<a name="l00210"></a>00210 damping = spring.<a class="code" href="classPxSpring.html#0a87d5342df941b96ac1ad97dc3eb306" title="the damping strength of the drive: that is, the force proportional to the velocity...">damping</a>; +<a name="l00211"></a>00211 } +<a name="l00212"></a>00212 +<a name="l00213"></a>00213 +<a name="l00214"></a>00214 +<a name="l00220"></a><a class="code" href="classPxJointLinearLimit.html#ef8d006945cfb4dd1a3c1538115cb98c">00220</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isValid()<span class="keyword"> const</span> +<a name="l00221"></a>00221 <span class="keyword"> </span>{ +<a name="l00222"></a>00222 <span class="keywordflow">return</span> <a class="code" href="classPxJointLimitParameters.html#e3d77fff99d5c4ed862a078957edee9c" title="Returns true if the current settings are valid.">PxJointLimitParameters::isValid</a>() && +<a name="l00223"></a>00223 <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>(value) && +<a name="l00224"></a>00224 value > 0; +<a name="l00225"></a>00225 } +<a name="l00226"></a>00226 }; +<a name="l00227"></a>00227 +<a name="l00228"></a>00228 +<a name="l00233"></a><a class="code" href="classPxJointLinearLimitPair.html">00233</a> <span class="keyword">class </span><a class="code" href="classPxJointLinearLimitPair.html" title="Describes a two-sided limit.">PxJointLinearLimitPair</a> : <span class="keyword">public</span> <a class="code" href="classPxJointLimitParameters.html" title="Describes the parameters for a joint limit.">PxJointLimitParameters</a> +<a name="l00234"></a>00234 { +<a name="l00235"></a>00235 <span class="comment">//= ATTENTION! =====================================================================================</span> +<a name="l00236"></a>00236 <span class="comment">// Changing the data layout of this class breaks the binary serialization format. See comments for </span> +<a name="l00237"></a>00237 <span class="comment">// PX_BINARY_SERIAL_VERSION. If a modification is required, please adjust the getBinaryMetaData </span> +<a name="l00238"></a>00238 <span class="comment">// function. If the modification is made on a custom branch, please change PX_BINARY_SERIAL_VERSION</span> +<a name="l00239"></a>00239 <span class="comment">// accordingly.</span> +<a name="l00240"></a>00240 <span class="comment">//==================================================================================================</span> +<a name="l00241"></a>00241 <span class="keyword">public</span>: +<a name="l00250"></a><a class="code" href="classPxJointLinearLimitPair.html#247c6737628a515ca5fc8fd139678d25">00250</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> upper, lower; +<a name="l00251"></a>00251 +<a name="l00252"></a>00252 +<a name="l00264"></a><a class="code" href="classPxJointLinearLimitPair.html#ebd9d130d0b09c7bc81044a91da6a32d">00264</a> <a class="code" href="classPxJointLinearLimitPair.html" title="Describes a two-sided limit.">PxJointLinearLimitPair</a>(<span class="keyword">const</span> <a class="code" href="classPxTolerancesScale.html" title="Class to define the scale at which simulation runs. Most simulation tolerances are...">PxTolerancesScale</a>& scale, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> lowerLimit, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> upperLimit, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> contactDist = -1) +<a name="l00265"></a>00265 : upper(upperLimit) +<a name="l00266"></a>00266 , lower(lowerLimit) +<a name="l00267"></a>00267 { +<a name="l00268"></a>00268 <a class="code" href="classPxJointLimitParameters.html#dc405245761d0b153f490ec1dd65af78" title="the distance inside the limit value at which the limit will be considered to be active...">PxJointLimitParameters::contactDistance</a> = contactDist == -1 ? <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(scale.<a class="code" href="classPxTolerancesScale.html#7d93bf20de0e5b54783eda5bb64effeb">length</a> * 0.01f, (upperLimit*0.49f-lowerLimit*0.49f)) : contactDist; +<a name="l00269"></a>00269 bounceThreshold = 2*scale.<a class="code" href="classPxTolerancesScale.html#7d93bf20de0e5b54783eda5bb64effeb">length</a>; +<a name="l00270"></a>00270 } +<a name="l00271"></a>00271 +<a name="l00272"></a>00272 +<a name="l00283"></a><a class="code" href="classPxJointLinearLimitPair.html#8a95bf4d353436b030e652ef3cb1343b">00283</a> <a class="code" href="classPxJointLinearLimitPair.html" title="Describes a two-sided limit.">PxJointLinearLimitPair</a>(<a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> lowerLimit, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> upperLimit, <span class="keyword">const</span> <a class="code" href="classPxSpring.html">PxSpring</a>& spring) +<a name="l00284"></a>00284 : upper(upperLimit) +<a name="l00285"></a>00285 , lower(lowerLimit) +<a name="l00286"></a>00286 { +<a name="l00287"></a>00287 stiffness = spring.<a class="code" href="classPxSpring.html#eb7dbc850461f2bc652ca73c80e523e1" title="the spring strength of the drive: that is, the force proportional to the position...">stiffness</a>; +<a name="l00288"></a>00288 damping = spring.<a class="code" href="classPxSpring.html#0a87d5342df941b96ac1ad97dc3eb306" title="the damping strength of the drive: that is, the force proportional to the velocity...">damping</a>; +<a name="l00289"></a>00289 } +<a name="l00290"></a>00290 +<a name="l00291"></a>00291 +<a name="l00297"></a><a class="code" href="classPxJointLinearLimitPair.html#98bb06960d695370677a5e2e4a2e3d21">00297</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isValid()<span class="keyword"> const</span> +<a name="l00298"></a>00298 <span class="keyword"> </span>{ +<a name="l00299"></a>00299 <span class="keywordflow">return</span> <a class="code" href="classPxJointLimitParameters.html#e3d77fff99d5c4ed862a078957edee9c" title="Returns true if the current settings are valid.">PxJointLimitParameters::isValid</a>() && +<a name="l00300"></a>00300 <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>(upper) && <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>(lower) && upper >= lower && +<a name="l00301"></a>00301 <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>(upper - lower) && +<a name="l00302"></a>00302 <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>(contactDistance) && contactDistance <= upper - lower; +<a name="l00303"></a>00303 } +<a name="l00304"></a>00304 }; +<a name="l00305"></a>00305 +<a name="l00306"></a>00306 +<a name="l00307"></a><a class="code" href="classPxJointAngularLimitPair.html">00307</a> <span class="keyword">class </span><a class="code" href="classPxJointAngularLimitPair.html">PxJointAngularLimitPair</a> : <span class="keyword">public</span> <a class="code" href="classPxJointLimitParameters.html" title="Describes the parameters for a joint limit.">PxJointLimitParameters</a> +<a name="l00308"></a>00308 { +<a name="l00309"></a>00309 <span class="comment">//= ATTENTION! =====================================================================================</span> +<a name="l00310"></a>00310 <span class="comment">// Changing the data layout of this class breaks the binary serialization format. See comments for </span> +<a name="l00311"></a>00311 <span class="comment">// PX_BINARY_SERIAL_VERSION. If a modification is required, please adjust the getBinaryMetaData </span> +<a name="l00312"></a>00312 <span class="comment">// function. If the modification is made on a custom branch, please change PX_BINARY_SERIAL_VERSION</span> +<a name="l00313"></a>00313 <span class="comment">// accordingly.</span> +<a name="l00314"></a>00314 <span class="comment">//==================================================================================================</span> +<a name="l00315"></a>00315 <span class="keyword">public</span>: +<a name="l00323"></a><a class="code" href="classPxJointAngularLimitPair.html#e346ef11f736245ef7ca8994e6d1492e">00323</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> upper, lower; +<a name="l00324"></a>00324 +<a name="l00325"></a>00325 +<a name="l00338"></a><a class="code" href="classPxJointAngularLimitPair.html#dc790f4203b0608a63ef886a49e8e2c1">00338</a> <a class="code" href="classPxJointAngularLimitPair.html">PxJointAngularLimitPair</a>(<a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> lowerLimit, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> upperLimit, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> contactDist = -1) +<a name="l00339"></a>00339 : upper(upperLimit) +<a name="l00340"></a>00340 , lower(lowerLimit) +<a name="l00341"></a>00341 { +<a name="l00342"></a>00342 <a class="code" href="classPxJointLimitParameters.html#dc405245761d0b153f490ec1dd65af78" title="the distance inside the limit value at which the limit will be considered to be active...">PxJointLimitParameters::contactDistance</a> = contactDist ==-1 ? <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(0.1f, 0.49f*(upperLimit-lowerLimit)) : contactDist; +<a name="l00343"></a>00343 bounceThreshold = 0.5f; +<a name="l00344"></a>00344 } +<a name="l00345"></a>00345 +<a name="l00346"></a>00346 +<a name="l00359"></a><a class="code" href="classPxJointAngularLimitPair.html#02ae4ad9d22a8d163cfd197669c3c83e">00359</a> <a class="code" href="classPxJointAngularLimitPair.html">PxJointAngularLimitPair</a>(<a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> lowerLimit, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> upperLimit, <span class="keyword">const</span> <a class="code" href="classPxSpring.html">PxSpring</a>& spring) +<a name="l00360"></a>00360 : upper(upperLimit) +<a name="l00361"></a>00361 , lower(lowerLimit) +<a name="l00362"></a>00362 { +<a name="l00363"></a>00363 stiffness = spring.<a class="code" href="classPxSpring.html#eb7dbc850461f2bc652ca73c80e523e1" title="the spring strength of the drive: that is, the force proportional to the position...">stiffness</a>; +<a name="l00364"></a>00364 damping = spring.<a class="code" href="classPxSpring.html#0a87d5342df941b96ac1ad97dc3eb306" title="the damping strength of the drive: that is, the force proportional to the velocity...">damping</a>; +<a name="l00365"></a>00365 } +<a name="l00366"></a>00366 +<a name="l00367"></a>00367 +<a name="l00373"></a><a class="code" href="classPxJointAngularLimitPair.html#6aac14184f38e356217aff386ed4148b">00373</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isValid()<span class="keyword"> const</span> +<a name="l00374"></a>00374 <span class="keyword"> </span>{ +<a name="l00375"></a>00375 <span class="keywordflow">return</span> <a class="code" href="classPxJointLimitParameters.html#e3d77fff99d5c4ed862a078957edee9c" title="Returns true if the current settings are valid.">PxJointLimitParameters::isValid</a>() && +<a name="l00376"></a>00376 <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>(upper) && <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>(lower) && upper >= lower && +<a name="l00377"></a>00377 <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>(contactDistance) && contactDistance <= upper - lower; +<a name="l00378"></a>00378 } +<a name="l00379"></a>00379 }; +<a name="l00380"></a>00380 +<a name="l00381"></a>00381 +<a name="l00382"></a>00382 +<a name="l00390"></a><a class="code" href="classPxJointLimitCone.html">00390</a> <span class="keyword">class </span><a class="code" href="classPxJointLimitCone.html" title="Describes an elliptical conical joint limit. Note that very small or highly elliptical...">PxJointLimitCone</a> : <span class="keyword">public</span> <a class="code" href="classPxJointLimitParameters.html" title="Describes the parameters for a joint limit.">PxJointLimitParameters</a> +<a name="l00391"></a>00391 { +<a name="l00392"></a>00392 <span class="comment">//= ATTENTION! =====================================================================================</span> +<a name="l00393"></a>00393 <span class="comment">// Changing the data layout of this class breaks the binary serialization format. See comments for </span> +<a name="l00394"></a>00394 <span class="comment">// PX_BINARY_SERIAL_VERSION. If a modification is required, please adjust the getBinaryMetaData </span> +<a name="l00395"></a>00395 <span class="comment">// function. If the modification is made on a custom branch, please change PX_BINARY_SERIAL_VERSION</span> +<a name="l00396"></a>00396 <span class="comment">// accordingly.</span> +<a name="l00397"></a>00397 <span class="comment">//==================================================================================================</span> +<a name="l00398"></a>00398 <span class="keyword">public</span>: +<a name="l00406"></a><a class="code" href="classPxJointLimitCone.html#eac6d3168fe1a6ccca4642a9f19e50a7">00406</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> yAngle; +<a name="l00407"></a>00407 +<a name="l00408"></a>00408 +<a name="l00416"></a><a class="code" href="classPxJointLimitCone.html#f14e3c875ee7f9cf772bafc535af7631">00416</a> <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> zAngle; +<a name="l00417"></a>00417 +<a name="l00428"></a><a class="code" href="classPxJointLimitCone.html#6b3ff7c47d158bb4ef637c69ce349706">00428</a> <a class="code" href="classPxJointLimitCone.html" title="Describes an elliptical conical joint limit. Note that very small or highly elliptical...">PxJointLimitCone</a>(<a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> yLimitAngle, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> zLimitAngle, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> contactDist = -1): +<a name="l00429"></a>00429 yAngle(yLimitAngle), +<a name="l00430"></a>00430 zAngle(zLimitAngle) +<a name="l00431"></a>00431 { +<a name="l00432"></a>00432 <a class="code" href="classPxJointLimitParameters.html#dc405245761d0b153f490ec1dd65af78" title="the distance inside the limit value at which the limit will be considered to be active...">PxJointLimitParameters::contactDistance</a> = contactDist == -1 ? <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(0.1f, <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(yLimitAngle, zLimitAngle)*0.49f) : contactDist; +<a name="l00433"></a>00433 bounceThreshold = 0.5f; +<a name="l00434"></a>00434 } +<a name="l00435"></a>00435 +<a name="l00436"></a>00436 +<a name="l00437"></a>00437 +<a name="l00448"></a><a class="code" href="classPxJointLimitCone.html#0bb99b52fb177d263b926938b239aa9c">00448</a> <a class="code" href="classPxJointLimitCone.html" title="Describes an elliptical conical joint limit. Note that very small or highly elliptical...">PxJointLimitCone</a>(<a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> yLimitAngle, <a class="code" href="namespacephysx.html#727d2d8426e2a21ebbc522fa65c3f97a">PxReal</a> zLimitAngle, <span class="keyword">const</span> <a class="code" href="classPxSpring.html">PxSpring</a>& spring): +<a name="l00449"></a>00449 yAngle(yLimitAngle), +<a name="l00450"></a>00450 zAngle(zLimitAngle) +<a name="l00451"></a>00451 { +<a name="l00452"></a>00452 stiffness = spring.<a class="code" href="classPxSpring.html#eb7dbc850461f2bc652ca73c80e523e1" title="the spring strength of the drive: that is, the force proportional to the position...">stiffness</a>; +<a name="l00453"></a>00453 damping = spring.<a class="code" href="classPxSpring.html#0a87d5342df941b96ac1ad97dc3eb306" title="the damping strength of the drive: that is, the force proportional to the velocity...">damping</a>; +<a name="l00454"></a>00454 } +<a name="l00455"></a>00455 +<a name="l00456"></a>00456 +<a name="l00462"></a><a class="code" href="classPxJointLimitCone.html#6811418b2779a67918aa9b1ef17cc574">00462</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isValid()<span class="keyword"> const</span> +<a name="l00463"></a>00463 <span class="keyword"> </span>{ +<a name="l00464"></a>00464 <span class="keywordflow">return</span> <a class="code" href="classPxJointLimitParameters.html#e3d77fff99d5c4ed862a078957edee9c" title="Returns true if the current settings are valid.">PxJointLimitParameters::isValid</a>() && +<a name="l00465"></a>00465 <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>(yAngle) && yAngle>0 && yAngle<<a class="code" href="group__foundation.html#gbcd49a429b8119de54375b3538ae8a8d">PxPi</a> && +<a name="l00466"></a>00466 <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>(zAngle) && zAngle>0 && zAngle<<a class="code" href="group__foundation.html#gbcd49a429b8119de54375b3538ae8a8d">PxPi</a>; +<a name="l00467"></a>00467 } +<a name="l00468"></a>00468 }; +<a name="l00469"></a>00469 +<a name="l00470"></a>00470 <span class="preprocessor">#if !PX_DOXYGEN</span> +<a name="l00471"></a>00471 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span> +<a name="l00472"></a>00472 <span class="preprocessor">#endif</span> +<a name="l00473"></a>00473 <span class="preprocessor"></span> +<a name="l00475"></a>00475 <span class="preprocessor">#endif</span> +</pre></div></div> + +<hr style="width: 100%; height: 2px;"><br> +Copyright © 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> |