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/PxVec2_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/PxVec2_8h-source.html')
| -rw-r--r-- | PhysX_3.4/Documentation/PhysXAPI/files/PxVec2_8h-source.html | 259 |
1 files changed, 259 insertions, 0 deletions
diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxVec2_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxVec2_8h-source.html new file mode 100644 index 00000000..e6346390 --- /dev/null +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxVec2_8h-source.html @@ -0,0 +1,259 @@ +<html> + <head> + <title>NVIDIA(R) PhysX(R) SDK 3.4 API Reference: PxVec2.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>PxVec2.h</h1><a href="PxVec2_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_PXVEC2_H</span> +<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#define PXFOUNDATION_PXVEC2_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="classPxVec2.html">00049</a> <span class="keyword">class </span><a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a> +<a name="l00050"></a>00050 { +<a name="l00051"></a>00051 <span class="keyword">public</span>: +<a name="l00055"></a><a class="code" href="classPxVec2.html#96f72810f06447c2ad7a99889d718298">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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>() +<a name="l00056"></a>00056 { +<a name="l00057"></a>00057 } +<a name="l00058"></a>00058 +<a name="l00062"></a><a class="code" href="classPxVec2.html#4b60f4c08b8019e8c28967ed33d436ce">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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(<a class="code" href="group__foundation.html#gc10bd69c94c165a52f6de39678ef9d4c">PxZERO</a> r) : x(0.0f), y(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="classPxVec2.html#07b74e15ed0f46a4a33db981b601fa7e">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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(<span class="keywordtype">float</span> a) : x(a), y(a) +<a name="l00075"></a>00075 { +<a name="l00076"></a>00076 } +<a name="l00077"></a>00077 +<a name="l00084"></a><a class="code" href="classPxVec2.html#71fc8ee1b46e0b0539cb507a3b290330">00084</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(<span class="keywordtype">float</span> nx, <span class="keywordtype">float</span> ny) : x(nx), y(ny) +<a name="l00085"></a>00085 { +<a name="l00086"></a>00086 } +<a name="l00087"></a>00087 +<a name="l00091"></a><a class="code" href="classPxVec2.html#a8ffec06e3a3ca712448e1e11232cb08">00091</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v) : x(v.x), y(v.y) +<a name="l00092"></a>00092 { +<a name="l00093"></a>00093 } +<a name="l00094"></a>00094 +<a name="l00095"></a>00095 <span class="comment">// Operators</span> +<a name="l00096"></a>00096 +<a name="l00100"></a><a class="code" href="classPxVec2.html#905d707942a9aa11f7184228e85df054">00100</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& operator=(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& p) +<a name="l00101"></a>00101 { +<a name="l00102"></a>00102 x = p.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>; +<a name="l00103"></a>00103 y = p.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>; +<a name="l00104"></a>00104 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00105"></a>00105 } +<a name="l00106"></a>00106 +<a name="l00110"></a><a class="code" href="classPxVec2.html#7df8ee1f8f487ef060436f273d2276bc">00110</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">int</span> index) +<a name="l00111"></a>00111 { +<a name="l00112"></a>00112 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(index >= 0 && index <= 1); +<a name="l00113"></a>00113 +<a name="l00114"></a>00114 <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="l00115"></a>00115 } +<a name="l00116"></a>00116 +<a name="l00120"></a><a class="code" href="classPxVec2.html#12510dbff9f774ca28bda1f50cae76e8">00120</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">int</span> index)<span class="keyword"> const</span> +<a name="l00121"></a>00121 <span class="keyword"> </span>{ +<a name="l00122"></a>00122 <a class="code" href="group__foundation.html#g4a83a657390b324a460f14684e5accee">PX_ASSERT</a>(index >= 0 && index <= 1); +<a name="l00123"></a>00123 +<a name="l00124"></a>00124 <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="l00125"></a>00125 } +<a name="l00126"></a>00126 +<a name="l00130"></a><a class="code" href="classPxVec2.html#a3966148966ec2a6d780f08d114c92f3">00130</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00131"></a>00131 <span class="keyword"> </span>{ +<a name="l00132"></a>00132 <span class="keywordflow">return</span> x == v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a> && y == v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>; +<a name="l00133"></a>00133 } +<a name="l00134"></a>00134 +<a name="l00138"></a><a class="code" href="classPxVec2.html#a0873daa791d1045df617f4884ff7614">00138</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00139"></a>00139 <span class="keyword"> </span>{ +<a name="l00140"></a>00140 <span class="keywordflow">return</span> x != v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a> || y != v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>; +<a name="l00141"></a>00141 } +<a name="l00142"></a>00142 +<a name="l00146"></a><a class="code" href="classPxVec2.html#d5f6129c777f1e17b0da19d55fb1ca73">00146</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="l00147"></a>00147 <span class="keyword"> </span>{ +<a name="l00148"></a>00148 <span class="keywordflow">return</span> x == 0.0f && y == 0.0f; +<a name="l00149"></a>00149 } +<a name="l00150"></a>00150 +<a name="l00154"></a><a class="code" href="classPxVec2.html#19c4ba16a216122f5e86d913cb6ee136">00154</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="l00155"></a>00155 <span class="keyword"> </span>{ +<a name="l00156"></a>00156 <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 name="l00157"></a>00157 } +<a name="l00158"></a>00158 +<a name="l00162"></a><a class="code" href="classPxVec2.html#ca004a54ecfb145262a99a66850ca8b4">00162</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="l00163"></a>00163 <span class="keyword"> </span>{ +<a name="l00164"></a>00164 <span class="keyword">const</span> <span class="keywordtype">float</span> unitTolerance = 1e-4f; +<a name="l00165"></a>00165 <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="l00166"></a>00166 } +<a name="l00167"></a>00167 +<a name="l00173"></a><a class="code" href="classPxVec2.html#5442df4d8f0502a54999fcf4fd803e8a">00173</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="l00174"></a>00174 <span class="keyword"> </span>{ +<a name="l00175"></a>00175 <span class="keywordflow">return</span> x * x + y * y; +<a name="l00176"></a>00176 } +<a name="l00177"></a>00177 +<a name="l00181"></a><a class="code" href="classPxVec2.html#941421e3c11f4cbb6d17e4cc5267b39e">00181</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="l00182"></a>00182 <span class="keyword"> </span>{ +<a name="l00183"></a>00183 <span class="keywordflow">return</span> <a class="code" href="group__foundation.html#g11d5e4e77acad728886b380b5f3806f0" title="Square root.">PxSqrt</a>(magnitudeSquared()); +<a name="l00184"></a>00184 } +<a name="l00185"></a>00185 +<a name="l00189"></a><a class="code" href="classPxVec2.html#9f8d55c49cb26bc28186998663371db1">00189</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> operator-()<span class="keyword"> const</span> +<a name="l00190"></a>00190 <span class="keyword"> </span>{ +<a name="l00191"></a>00191 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(-x, -y); +<a name="l00192"></a>00192 } +<a name="l00193"></a>00193 +<a name="l00197"></a><a class="code" href="classPxVec2.html#fc9a8ddab13a31cccd3dad8e98138912">00197</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> <a class="code" href="group__foundation.html#g9f9ec0bd1ad1ead5b8d88ff933363cad" title="Addition operator.">operator+</a>(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00198"></a>00198 <span class="keyword"> </span>{ +<a name="l00199"></a>00199 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(x + v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>, y + v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>); +<a name="l00200"></a>00200 } +<a name="l00201"></a>00201 +<a name="l00205"></a><a class="code" href="classPxVec2.html#36ca28438e4d0aa4e6b8957dd96da7d7">00205</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> operator-(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00206"></a>00206 <span class="keyword"> </span>{ +<a name="l00207"></a>00207 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(x - v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>, y - v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>); +<a name="l00208"></a>00208 } +<a name="l00209"></a>00209 +<a name="l00213"></a><a class="code" href="classPxVec2.html#8f5fdc6f945da4bca96e2bf126ba9bd6">00213</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> <a class="code" href="group__foundation.html#ga7415102b45174d3eda4d4f2f12127bc">operator*</a>(<span class="keywordtype">float</span> f)<span class="keyword"> const</span> +<a name="l00214"></a>00214 <span class="keyword"> </span>{ +<a name="l00215"></a>00215 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(x * f, y * f); +<a name="l00216"></a>00216 } +<a name="l00217"></a>00217 +<a name="l00221"></a><a class="code" href="classPxVec2.html#ceeb65f8880a3a37a2a90e6913be47f9">00221</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> operator/(<span class="keywordtype">float</span> f)<span class="keyword"> const</span> +<a name="l00222"></a>00222 <span class="keyword"> </span>{ +<a name="l00223"></a>00223 f = 1.0f / f; <span class="comment">// PT: inconsistent notation with operator /=</span> +<a name="l00224"></a>00224 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(x * f, y * f); +<a name="l00225"></a>00225 } +<a name="l00226"></a>00226 +<a name="l00230"></a><a class="code" href="classPxVec2.html#c9caeb5f1c968260c9f463171152937f">00230</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& operator+=(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v) +<a name="l00231"></a>00231 { +<a name="l00232"></a>00232 x += v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>; +<a name="l00233"></a>00233 y += v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>; +<a name="l00234"></a>00234 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00235"></a>00235 } +<a name="l00236"></a>00236 +<a name="l00240"></a><a class="code" href="classPxVec2.html#ea0a1b70187c8d6e2fb4f02a0fc069d3">00240</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& operator-=(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v) +<a name="l00241"></a>00241 { +<a name="l00242"></a>00242 x -= v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>; +<a name="l00243"></a>00243 y -= v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>; +<a name="l00244"></a>00244 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00245"></a>00245 } +<a name="l00246"></a>00246 +<a name="l00250"></a><a class="code" href="classPxVec2.html#c65a226e1aac50af85eee2322af6cb58">00250</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& operator*=(<span class="keywordtype">float</span> f) +<a name="l00251"></a>00251 { +<a name="l00252"></a>00252 x *= f; +<a name="l00253"></a>00253 y *= f; +<a name="l00254"></a>00254 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00255"></a>00255 } +<a name="l00259"></a><a class="code" href="classPxVec2.html#0b9073b93708bca03bc0f4b61fb6547b">00259</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& operator/=(<span class="keywordtype">float</span> f) +<a name="l00260"></a>00260 { +<a name="l00261"></a>00261 f = 1.0f / f; <span class="comment">// PT: inconsistent notation with operator /</span> +<a name="l00262"></a>00262 x *= f; +<a name="l00263"></a>00263 y *= f; +<a name="l00264"></a>00264 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +<a name="l00265"></a>00265 } +<a name="l00266"></a>00266 +<a name="l00270"></a><a class="code" href="classPxVec2.html#df189688aa95d9b60da424f8728eae28">00270</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00271"></a>00271 <span class="keyword"> </span>{ +<a name="l00272"></a>00272 <span class="keywordflow">return</span> x * v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a> + y * v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>; +<a name="l00273"></a>00273 } +<a name="l00274"></a>00274 +<a name="l00277"></a><a class="code" href="classPxVec2.html#fd175adb02d6c68dbda2f9402fbf90d9">00277</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> getNormalized()<span class="keyword"> const</span> +<a name="l00278"></a>00278 <span class="keyword"> </span>{ +<a name="l00279"></a>00279 <span class="keyword">const</span> <span class="keywordtype">float</span> m = magnitudeSquared(); +<a name="l00280"></a>00280 <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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(0, 0); +<a name="l00281"></a>00281 } +<a name="l00282"></a>00282 +<a name="l00286"></a><a class="code" href="classPxVec2.html#4c115c5ab9863553c558518f8b1b4d33">00286</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="l00287"></a>00287 { +<a name="l00288"></a>00288 <span class="keyword">const</span> <span class="keywordtype">float</span> m = magnitude(); +<a name="l00289"></a>00289 <span class="keywordflow">if</span>(m > 0.0f) +<a name="l00290"></a>00290 *<span class="keyword">this</span> /= m; +<a name="l00291"></a>00291 <span class="keywordflow">return</span> m; +<a name="l00292"></a>00292 } +<a name="l00293"></a>00293 +<a name="l00297"></a><a class="code" href="classPxVec2.html#b540416289ba8ff39807f30fc41b0bf9">00297</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> multiply(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& a)<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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(x * a.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>, y * a.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>); +<a name="l00300"></a>00300 } +<a name="l00301"></a>00301 +<a name="l00305"></a><a class="code" href="classPxVec2.html#5b98f887b41c32eb76d7ae002e0f9c5b">00305</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> minimum(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00306"></a>00306 <span class="keyword"> </span>{ +<a name="l00307"></a>00307 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</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="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">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="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>)); +<a name="l00308"></a>00308 } +<a name="l00309"></a>00309 +<a name="l00313"></a><a class="code" href="classPxVec2.html#1ea57acbfb76ce0e5ee0722462413c78">00313</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="l00314"></a>00314 <span class="keyword"> </span>{ +<a name="l00315"></a>00315 <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, y); +<a name="l00316"></a>00316 } +<a name="l00317"></a>00317 +<a name="l00321"></a><a class="code" href="classPxVec2.html#16d194a4e370d35f3ca9918b7bb2fb16">00321</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a> maximum(<span class="keyword">const</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v)<span class="keyword"> const</span> +<a name="l00322"></a>00322 <span class="keyword"> </span>{ +<a name="l00323"></a>00323 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</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="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">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="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>)); +<a name="l00324"></a>00324 } +<a name="l00325"></a>00325 +<a name="l00329"></a><a class="code" href="classPxVec2.html#ee0ea896ec92dd625e989cbe3470ac0d">00329</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="l00330"></a>00330 <span class="keyword"> </span>{ +<a name="l00331"></a>00331 <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, y); +<a name="l00332"></a>00332 } +<a name="l00333"></a>00333 +<a name="l00334"></a><a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">00334</a> <span class="keywordtype">float</span> x, y; +<a name="l00335"></a>00335 }; +<a name="l00336"></a>00336 +<a name="l00337"></a><a class="code" href="group__foundation.html#ga7415102b45174d3eda4d4f2f12127bc">00337</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="classPxVec2.html" title="2 Element vector class.">PxVec2</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="classPxVec2.html" title="2 Element vector class.">PxVec2</a>& v) +<a name="l00338"></a>00338 { +<a name="l00339"></a>00339 <span class="keywordflow">return</span> <a class="code" href="classPxVec2.html" title="2 Element vector class.">PxVec2</a>(f * v.<a class="code" href="classPxVec2.html#8a1607dbd9d4e63bf4d5af9ef4cd5a2e">x</a>, f * v.<a class="code" href="classPxVec2.html#bf3769707f9e56d04c4f37ebdb8e23a9">y</a>); +<a name="l00340"></a>00340 } +<a name="l00341"></a>00341 +<a name="l00342"></a>00342 <span class="preprocessor">#if !PX_DOXYGEN</span> +<a name="l00343"></a>00343 <span class="preprocessor"></span>} <span class="comment">// namespace physx</span> +<a name="l00344"></a>00344 <span class="preprocessor">#endif</span> +<a name="l00345"></a>00345 <span class="preprocessor"></span> +<a name="l00347"></a>00347 <span class="preprocessor">#endif // #ifndef PXFOUNDATION_PXVEC2_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> |