diff options
| author | git perforce import user <a@b> | 2016-10-25 12:29:14 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees> | 2016-10-25 18:56:37 -0500 |
| commit | 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch) | |
| tree | fa6485c169e50d7415a651bf838f5bcd0fd3bfbd /PhysX_3.4/Documentation/PhysXAPI/files/PxVec3_8h-source.html | |
| download | physx-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/PxVec3_8h-source.html')
| -rw-r--r-- | PhysX_3.4/Documentation/PhysXAPI/files/PxVec3_8h-source.html | 290 |
1 files changed, 290 insertions, 0 deletions
diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxVec3_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxVec3_8h-source.html new file mode 100644 index 00000000..b0fba7e1 --- /dev/null +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxVec3_8h-source.html @@ -0,0 +1,290 @@ +<html> + <head> + <title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxVec3.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>PxVec3.h</h1><a href="PxVec3_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 <span class="preprocessor">#ifndef PXFOUNDATION_PXVEC3_H</span> +<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define PXFOUNDATION_PXVEC3_H</span> +<a name="l00032"></a>00032 <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 +<a name="l00039"></a>00039 <span class="preprocessor">#if !PX_DOXYGEN</span> +<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="keyword">namespace </span>physx +<a name="l00041"></a>00041 { +<a name="l00042"></a>00042 <span class="preprocessor">#endif</span> +<a name="l00043"></a>00043 <span class="preprocessor"></span> +<a name="l00049"></a><a class="code" href="classPxVec3.html">00049</a> <span class="keyword">class </span><a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> +<a name="l00050"></a>00050 { +<a name="l00051"></a>00051 <span class="keyword">public</span>: +<a name="l00055"></a><a class="code" href="classPxVec3.html#672e12542fc6f752d21368493578af4e">00055</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>() +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 } +<a name="l00058"></a>00058 +<a name="l00062"></a><a class="code" href="classPxVec3.html#639685f39203ac441edd2158ef1a1549">00062</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<a class="code" href="group__foundation.html#gc10bd69c94c165a52f6de39678ef9d4c">PxZERO</a> r) : x(0.0f), y(0.0f), z(0.0f) +<a name="l00063"></a>00063 { +<a name="l00064"></a>00064 <a class="code" href="group__foundation.html#g3b618390d8743c532c4131cb931df43a">PX_UNUSED</a>(r); +<a name="l00065"></a>00065 } +<a name="l00066"></a>00066 +<a name="l00074"></a><a class="code" href="classPxVec3.html#864f52fe3c9c9f72f5796a7cb64b2628">00074</a> <span class="keyword">explicit</span> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<span class="keywordtype">float</span> a) : x(a), y(a), z(a) +<a name="l00075"></a>00075 { +<a name="l00076"></a>00076 } +<a name="l00077"></a>00077 +<a name="l00085"></a><a class="code" href="classPxVec3.html#bd382848d9b79dbcec4d86ee0e98836b">00085</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<span class="keywordtype">float</span> nx, <span class="keywordtype">float</span> ny, <span class="keywordtype">float</span> nz) : x(nx), y(ny), z(nz) +<a name="l00086"></a>00086 { +<a name="l00087"></a>00087 } +<a name="l00088"></a>00088 +<a name="l00092"></a><a class="code" href="classPxVec3.html#b8853e036ac988fb3c58d1acd9f466d5">00092</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v) : x(v.x), y(v.y), z(v.z) +<a name="l00093"></a>00093 { +<a name="l00094"></a>00094 } +<a name="l00095"></a>00095 +<a name="l00096"></a>00096 <span class="comment">// Operators</span> +<a name="l00097"></a>00097 +<a name="l00101"></a><a class="code" href="classPxVec3.html#86f607c621d110d976c8e71772c25158">00101</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& operator=(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& p) +<a name="l00102"></a>00102 { +<a name="l00103"></a>00103 x = p.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>; +<a name="l00104"></a>00104 y = p.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>; +<a name="l00105"></a>00105 z = p.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>; +<a name="l00106"></a>00106 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00107"></a>00107 } +<a name="l00108"></a>00108 +<a name="l00112"></a><a class="code" href="classPxVec3.html#faae1b939e5c7ae27aba81612dd5fc01">00112</a> <a class="code" href="group__foundation.html#gfd8f8779793627061774cfcfa1b9fbd7">PX_DEPRECATED</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span>& operator[](<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index) +<a name="l00113"></a>00113 { +<a name="l00114"></a>00114 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(index <= 2); +<a name="l00115"></a>00115 +<a name="l00116"></a>00116 <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast<</span><span class="keywordtype">float</span>*<span class="keyword">></span>(<span class="keyword">this</span>)[index]; +<a name="l00117"></a>00117 } +<a name="l00118"></a>00118 +<a name="l00122"></a><a class="code" href="classPxVec3.html#a0224a065fc915ebd610887d6d156343">00122</a> <a class="code" href="group__foundation.html#gfd8f8779793627061774cfcfa1b9fbd7">PX_DEPRECATED</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keyword">const</span> <span class="keywordtype">float</span>& operator[](<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index)<span class="keyword"> const</span> +<a name="l00123"></a>00123 <span class="keyword"> </span>{ +<a name="l00124"></a>00124 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(index <= 2); +<a name="l00125"></a>00125 +<a name="l00126"></a>00126 <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">float</span>*<span class="keyword">></span>(<span class="keyword">this</span>)[index]; +<a name="l00127"></a>00127 } +<a name="l00131"></a><a class="code" href="classPxVec3.html#81950e1461513bdae58fc5e80443455c">00131</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">bool</span> operator==(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00132"></a>00132 <span class="keyword"> </span>{ +<a name="l00133"></a>00133 <span class="keywordflow">return</span> x == v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> && y == v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> && z == v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>; +<a name="l00134"></a>00134 } +<a name="l00135"></a>00135 +<a name="l00139"></a><a class="code" href="classPxVec3.html#34f703b843288209243dd5c6f9f714d6">00139</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">bool</span> operator!=(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00140"></a>00140 <span class="keyword"> </span>{ +<a name="l00141"></a>00141 <span class="keywordflow">return</span> x != v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> || y != v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> || z != v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>; +<a name="l00142"></a>00142 } +<a name="l00143"></a>00143 +<a name="l00147"></a><a class="code" href="classPxVec3.html#744d8602ff3568f0eefb1a2be0295ec1">00147</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">bool</span> isZero()<span class="keyword"> const</span> +<a name="l00148"></a>00148 <span class="keyword"> </span>{ +<a name="l00149"></a>00149 <span class="keywordflow">return</span> x == 0.0f && y == 0.0f && z == 0.0f; +<a name="l00150"></a>00150 } +<a name="l00151"></a>00151 +<a name="l00155"></a><a class="code" href="classPxVec3.html#65b6f42ac7654a7d79590a2f1d00e160">00155</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#gcb03347b642a2a5bdea1f9b305a6fbec">PX_INLINE</a> <span class="keywordtype">bool</span> isFinite()<span class="keyword"> const</span> +<a name="l00156"></a>00156 <span class="keyword"> </span>{ +<a name="l00157"></a>00157 <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>(x) && <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>(y) && <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>(z); +<a name="l00158"></a>00158 } +<a name="l00159"></a>00159 +<a name="l00163"></a><a class="code" href="classPxVec3.html#2921910607fd21a4aaf24114a705daf7">00163</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">bool</span> isNormalized()<span class="keyword"> const</span> +<a name="l00164"></a>00164 <span class="keyword"> </span>{ +<a name="l00165"></a>00165 <span class="keyword">const</span> <span class="keywordtype">float</span> unitTolerance = 1e-4f; +<a name="l00166"></a>00166 <span class="keywordflow">return</span> isFinite() && <a class="code" href="group__foundation.html#gf72e1dce9e874da7b92cbc0ea5e4e30d" title="abs returns the absolute value of its argument.">PxAbs</a>(magnitude() - 1) < unitTolerance; +<a name="l00167"></a>00167 } +<a name="l00168"></a>00168 +<a name="l00174"></a><a class="code" href="classPxVec3.html#257aac3cfb20ef11768209f61b4fc9eb">00174</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> magnitudeSquared()<span class="keyword"> const</span> +<a name="l00175"></a>00175 <span class="keyword"> </span>{ +<a name="l00176"></a>00176 <span class="keywordflow">return</span> x * x + y * y + z * z; +<a name="l00177"></a>00177 } +<a name="l00178"></a>00178 +<a name="l00182"></a><a class="code" href="classPxVec3.html#484f52dfb6f012cd492f8321bc1b4d42">00182</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> magnitude()<span class="keyword"> const</span> +<a name="l00183"></a>00183 <span class="keyword"> </span>{ +<a name="l00184"></a>00184 <span class="keywordflow">return</span> <a class="code" href="group__foundation.html#g11d5e4e77acad728886b380b5f3806f0" title="Square root.">PxSqrt</a>(magnitudeSquared()); +<a name="l00185"></a>00185 } +<a name="l00186"></a>00186 +<a name="l00190"></a><a class="code" href="classPxVec3.html#52f34539398f2f80d9c7d635cee65646">00190</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> operator-()<span class="keyword"> const</span> +<a name="l00191"></a>00191 <span class="keyword"> </span>{ +<a name="l00192"></a>00192 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(-x, -y, -z); +<a name="l00193"></a>00193 } +<a name="l00194"></a>00194 +<a name="l00198"></a><a class="code" href="classPxVec3.html#e1e60e73149c6292d7d440c75978fbd0">00198</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> <a class="code" href="group__foundation.html#g9f9ec0bd1ad1ead5b8d88ff933363cad" title="Addition operator.">operator+</a>(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00199"></a>00199 <span class="keyword"> </span>{ +<a name="l00200"></a>00200 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(x + v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>, y + v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>, z + v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>); +<a name="l00201"></a>00201 } +<a name="l00202"></a>00202 +<a name="l00206"></a><a class="code" href="classPxVec3.html#023d08679d83fc24db4e3a7b4033f720">00206</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> operator-(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00207"></a>00207 <span class="keyword"> </span>{ +<a name="l00208"></a>00208 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(x - v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>, y - v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>, z - v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>); +<a name="l00209"></a>00209 } +<a name="l00210"></a>00210 +<a name="l00214"></a><a class="code" href="classPxVec3.html#4399c60f4d75e2dd12dd62d67f1e4fd6">00214</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> <a class="code" href="group__foundation.html#ga7415102b45174d3eda4d4f2f12127bc">operator*</a>(<span class="keywordtype">float</span> f)<span class="keyword"> const</span> +<a name="l00215"></a>00215 <span class="keyword"> </span>{ +<a name="l00216"></a>00216 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(x * f, y * f, z * f); +<a name="l00217"></a>00217 } +<a name="l00218"></a>00218 +<a name="l00222"></a><a class="code" href="classPxVec3.html#6c4f1d1a455628f6bf4594b9ce62d26c">00222</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> operator/(<span class="keywordtype">float</span> f)<span class="keyword"> const</span> +<a name="l00223"></a>00223 <span class="keyword"> </span>{ +<a name="l00224"></a>00224 f = 1.0f / f; +<a name="l00225"></a>00225 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(x * f, y * f, z * f); +<a name="l00226"></a>00226 } +<a name="l00227"></a>00227 +<a name="l00231"></a><a class="code" href="classPxVec3.html#98bd7279c4e208de0ba2c072e7cde6bb">00231</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& operator+=(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v) +<a name="l00232"></a>00232 { +<a name="l00233"></a>00233 x += v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>; +<a name="l00234"></a>00234 y += v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>; +<a name="l00235"></a>00235 z += v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>; +<a name="l00236"></a>00236 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00237"></a>00237 } +<a name="l00238"></a>00238 +<a name="l00242"></a><a class="code" href="classPxVec3.html#0e2b732fce0676fd6f7133d80dcb9979">00242</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& operator-=(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v) +<a name="l00243"></a>00243 { +<a name="l00244"></a>00244 x -= v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>; +<a name="l00245"></a>00245 y -= v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>; +<a name="l00246"></a>00246 z -= v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>; +<a name="l00247"></a>00247 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00248"></a>00248 } +<a name="l00249"></a>00249 +<a name="l00253"></a><a class="code" href="classPxVec3.html#1b8491d9bd8784f27573b31927b730b2">00253</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& operator*=(<span class="keywordtype">float</span> f) +<a name="l00254"></a>00254 { +<a name="l00255"></a>00255 x *= f; +<a name="l00256"></a>00256 y *= f; +<a name="l00257"></a>00257 z *= f; +<a name="l00258"></a>00258 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00259"></a>00259 } +<a name="l00263"></a><a class="code" href="classPxVec3.html#edae1ad379d93f8713b7f8c09db8b8fa">00263</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& operator/=(<span class="keywordtype">float</span> f) +<a name="l00264"></a>00264 { +<a name="l00265"></a>00265 f = 1.0f / f; +<a name="l00266"></a>00266 x *= f; +<a name="l00267"></a>00267 y *= f; +<a name="l00268"></a>00268 z *= f; +<a name="l00269"></a>00269 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00270"></a>00270 } +<a name="l00271"></a>00271 +<a name="l00275"></a><a class="code" href="classPxVec3.html#f29c27e8aae481d97570e7990388bdf5">00275</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> dot(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00276"></a>00276 <span class="keyword"> </span>{ +<a name="l00277"></a>00277 <span class="keywordflow">return</span> x * v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> + y * v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> + z * v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>; +<a name="l00278"></a>00278 } +<a name="l00279"></a>00279 +<a name="l00283"></a><a class="code" href="classPxVec3.html#f14a984e579fb0fa49b5d30c2d008691">00283</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> cross(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00284"></a>00284 <span class="keyword"> </span>{ +<a name="l00285"></a>00285 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(y * v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a> - z * v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>, z * v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a> - x * v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>, x * v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a> - y * v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>); +<a name="l00286"></a>00286 } +<a name="l00287"></a>00287 +<a name="l00290"></a><a class="code" href="classPxVec3.html#91d643f074916c986cf36081a1f67bca">00290</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> getNormalized()<span class="keyword"> const</span> +<a name="l00291"></a>00291 <span class="keyword"> </span>{ +<a name="l00292"></a>00292 <span class="keyword">const</span> <span class="keywordtype">float</span> m = magnitudeSquared(); +<a name="l00293"></a>00293 <span class="keywordflow">return</span> m > 0.0f ? *<span class="keyword">this</span> * <a class="code" href="group__foundation.html#gcd945627f345ba03e83a30387ab99dea" title="reciprocal square root.">PxRecipSqrt</a>(m) : <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(0, 0, 0); +<a name="l00294"></a>00294 } +<a name="l00295"></a>00295 +<a name="l00299"></a><a class="code" href="classPxVec3.html#b67c4b05db03b0ceeddc74b1f6f77af5">00299</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> normalize() +<a name="l00300"></a>00300 { +<a name="l00301"></a>00301 <span class="keyword">const</span> <span class="keywordtype">float</span> m = magnitude(); +<a name="l00302"></a>00302 <span class="keywordflow">if</span>(m > 0.0f) +<a name="l00303"></a>00303 *<span class="keyword">this</span> /= m; +<a name="l00304"></a>00304 <span class="keywordflow">return</span> m; +<a name="l00305"></a>00305 } +<a name="l00306"></a>00306 +<a name="l00311"></a><a class="code" href="classPxVec3.html#69edea41dcd58f35d35036026bf75dcc">00311</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> normalizeSafe() +<a name="l00312"></a>00312 { +<a name="l00313"></a>00313 <span class="keyword">const</span> <span class="keywordtype">float</span> mag = magnitude(); +<a name="l00314"></a>00314 <span class="keywordflow">if</span>(mag < <a class="code" href="group__foundation.html#g8901e378c5ba8f305e8714d5758cd9dd">PX_NORMALIZATION_EPSILON</a>) +<a name="l00315"></a>00315 <span class="keywordflow">return</span> 0.0f; +<a name="l00316"></a>00316 *<span class="keyword">this</span> *= 1.0f / mag; +<a name="l00317"></a>00317 <span class="keywordflow">return</span> mag; +<a name="l00318"></a>00318 } +<a name="l00319"></a>00319 +<a name="l00324"></a><a class="code" href="classPxVec3.html#be30659678fa294743b2eaabe69a8689">00324</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> normalizeFast() +<a name="l00325"></a>00325 { +<a name="l00326"></a>00326 <span class="keyword">const</span> <span class="keywordtype">float</span> mag = magnitude(); +<a name="l00327"></a>00327 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(mag >= <a class="code" href="group__foundation.html#g8901e378c5ba8f305e8714d5758cd9dd">PX_NORMALIZATION_EPSILON</a>); +<a name="l00328"></a>00328 *<span class="keyword">this</span> *= 1.0f / mag; +<a name="l00329"></a>00329 <span class="keywordflow">return</span> mag; +<a name="l00330"></a>00330 } +<a name="l00331"></a>00331 +<a name="l00335"></a><a class="code" href="classPxVec3.html#9cc40866bdd9940ef8a3cc8d2a75a593">00335</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> multiply(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& a)<span class="keyword"> const</span> +<a name="l00336"></a>00336 <span class="keyword"> </span>{ +<a name="l00337"></a>00337 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(x * a.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>, y * a.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>, z * a.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>); +<a name="l00338"></a>00338 } +<a name="l00339"></a>00339 +<a name="l00343"></a><a class="code" href="classPxVec3.html#0fe31e31784b03510dd5eb94b4322e29">00343</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> minimum(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00344"></a>00344 <span class="keyword"> </span>{ +<a name="l00345"></a>00345 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(x, v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>), <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(y, v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>), <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(z, v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>)); +<a name="l00346"></a>00346 } +<a name="l00347"></a>00347 +<a name="l00351"></a><a class="code" href="classPxVec3.html#cb26d5ad522e925245a3b16f76df4b51">00351</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> minElement()<span class="keyword"> const</span> +<a name="l00352"></a>00352 <span class="keyword"> </span>{ +<a name="l00353"></a>00353 <span class="keywordflow">return</span> <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(x, <a class="code" href="group__foundation.html#g1bf6a07efe8c7593ff6a4b6eeedeae4d" title="The return value is the lesser of the two specified values.">PxMin</a>(y, z)); +<a name="l00354"></a>00354 } +<a name="l00355"></a>00355 +<a name="l00359"></a><a class="code" href="classPxVec3.html#c0788c2bb97bfaa65106fea23cf55a83">00359</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> maximum(<span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v)<span class="keyword"> const</span> +<a name="l00360"></a>00360 <span class="keyword"> </span>{ +<a name="l00361"></a>00361 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<a class="code" href="group__foundation.html#g88c618b0512d00a0571e52a7d2a73516" title="The return value is the greater of the two specified values.">PxMax</a>(x, v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>), <a class="code" href="group__foundation.html#g88c618b0512d00a0571e52a7d2a73516" title="The return value is the greater of the two specified values.">PxMax</a>(y, v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>), <a class="code" href="group__foundation.html#g88c618b0512d00a0571e52a7d2a73516" title="The return value is the greater of the two specified values.">PxMax</a>(z, v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>)); +<a name="l00362"></a>00362 } +<a name="l00363"></a>00363 +<a name="l00367"></a><a class="code" href="classPxVec3.html#6f31dfee4f75a05884c6e4f511e21142">00367</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <span class="keywordtype">float</span> maxElement()<span class="keyword"> const</span> +<a name="l00368"></a>00368 <span class="keyword"> </span>{ +<a name="l00369"></a>00369 <span class="keywordflow">return</span> <a class="code" href="group__foundation.html#g88c618b0512d00a0571e52a7d2a73516" title="The return value is the greater of the two specified values.">PxMax</a>(x, <a class="code" href="group__foundation.html#g88c618b0512d00a0571e52a7d2a73516" title="The return value is the greater of the two specified values.">PxMax</a>(y, z)); +<a name="l00370"></a>00370 } +<a name="l00371"></a>00371 +<a name="l00375"></a><a class="code" href="classPxVec3.html#4454d8535cfbf9d723f771c0b9adeb6d">00375</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> abs()<span class="keyword"> const</span> +<a name="l00376"></a>00376 <span class="keyword"> </span>{ +<a name="l00377"></a>00377 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(<a class="code" href="group__foundation.html#gf72e1dce9e874da7b92cbc0ea5e4e30d" title="abs returns the absolute value of its argument.">PxAbs</a>(x), <a class="code" href="group__foundation.html#gf72e1dce9e874da7b92cbc0ea5e4e30d" title="abs returns the absolute value of its argument.">PxAbs</a>(y), <a class="code" href="group__foundation.html#gf72e1dce9e874da7b92cbc0ea5e4e30d" title="abs returns the absolute value of its argument.">PxAbs</a>(z)); +<a name="l00378"></a>00378 } +<a name="l00379"></a>00379 +<a name="l00380"></a><a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">00380</a> <span class="keywordtype">float</span> x, y, z; +<a name="l00381"></a>00381 }; +<a name="l00382"></a>00382 +<a name="l00383"></a><a class="code" href="group__foundation.html#ge776faf7f6d5b480bfff8c2d21b9c4ad">00383</a> <a class="code" href="group__foundation.html#g6e444d58dbf1459261fadc9b79594f63">PX_CUDA_CALLABLE</a> <span class="keyword">static</span> <a class="code" href="group__foundation.html#g6a774eed3cad34b0f636332a3d28c6bb">PX_FORCE_INLINE</a> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a> <a class="code" href="group__foundation.html#ga7415102b45174d3eda4d4f2f12127bc">operator*</a>(<span class="keywordtype">float</span> f, <span class="keyword">const</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>& v) +<a name="l00384"></a>00384 { +<a name="l00385"></a>00385 <span class="keywordflow">return</span> <a class="code" href="classPxVec3.html" title="3 Element vector class.">PxVec3</a>(f * v.<a class="code" href="classPxVec3.html#391194bca8291161c06254f4ac2b6ada">x</a>, f * v.<a class="code" href="classPxVec3.html#29958700f50da2204edc519b47706a05">y</a>, f * v.<a class="code" href="classPxVec3.html#50d67b162b99b904c3f362ad0415dbca">z</a>); +<a name="l00386"></a>00386 } +<a name="l00387"></a>00387 +<a name="l00388"></a>00388 <span class="preprocessor">#if !PX_DOXYGEN</span> +<a name="l00389"></a>00389 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span> +<a name="l00390"></a>00390 <span class="preprocessor">#endif</span> +<a name="l00391"></a>00391 <span class="preprocessor"></span> +<a name="l00393"></a>00393 <span class="preprocessor">#endif // #ifndef PXFOUNDATION_PXVEC3_H</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> |