source: NonGTP/FCollada/Documentation/_f_m_vector3_8h-source.html @ 964

Revision 964, 26.3 KB checked in by igarcia, 19 years ago (diff)
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
3<title>FCollada: FMath/FMVector3.h Source File</title>
4<link href="doxygen.css" rel="stylesheet" type="text/css">
5<link href="tabs.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.4.6-NO -->
8<div class="tabs">
9  <ul>
10    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
11    <li><a href="modules.html"><span>Modules</span></a></li>
12    <li><a href="namespaces.html"><span>Namespaces</span></a></li>
13    <li><a href="classes.html"><span>Classes</span></a></li>
14    <li id="current"><a href="files.html"><span>Files</span></a></li>
15    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
16  </ul></div>
17<div class="tabs">
18  <ul>
19    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
20    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
21  </ul></div>
22<h1>FMath/FMVector3.h</h1><a href="_f_m_vector3_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
23<a name="l00002"></a>00002 <span class="comment">    Copyright (C) 2005-2006 Feeling Software Inc.</span>
24<a name="l00003"></a>00003 <span class="comment">    MIT License: http://www.opensource.org/licenses/mit-license.php</span>
25<a name="l00004"></a>00004 <span class="comment">*/</span>
26<a name="l00005"></a>00005
27<a name="l00010"></a>00010 <span class="preprocessor">#ifndef _FM_VECTOR3_H_</span>
28<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _FM_VECTOR3_H_</span>
29<a name="l00012"></a>00012 <span class="preprocessor"></span>
30<a name="l00021"></a><a class="code" href="class_f_m_vector3.html">00021</a> <span class="keyword">class </span>FCOLLADA_EXPORT <a class="code" href="class_f_m_vector3.html">FMVector3</a>
31<a name="l00022"></a>00022 {
32<a name="l00023"></a>00023 <span class="keyword">public</span>:
33<a name="l00024"></a><a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">00024</a>     <span class="keywordtype">float</span> x;   
34<a name="l00025"></a><a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">00025</a>     <span class="keywordtype">float</span> y;   
35<a name="l00026"></a><a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">00026</a>     <span class="keywordtype">float</span> z;   
36<a name="l00028"></a>00028 <span class="keyword">public</span>:
37<a name="l00032"></a>00032 <span class="preprocessor">    #ifndef _DEBUG</span>
38<a name="l00033"></a><a class="code" href="class_f_m_vector3.html#7cee33ae8a870a7b7e14669fe599461b">00033</a> <span class="preprocessor"></span>    <a class="code" href="class_f_m_vector3.html">FMVector3</a>() {}
39<a name="l00034"></a>00034 <span class="preprocessor">    #else</span>
40<a name="l00035"></a>00035 <span class="preprocessor"></span>    <a class="code" href="class_f_m_vector3.html">FMVector3</a>() { x = 123456789.0f; y = 123456789.0f; z = 123456789.0f; }
41<a name="l00036"></a>00036 <span class="preprocessor">    #endif </span>
42<a name="l00037"></a>00037 <span class="preprocessor"></span>
43<a name="l00045"></a><a class="code" href="class_f_m_vector3.html#c4ebdd15669aea066ea5858b8a7deec5">00045</a>     <a class="code" href="class_f_m_vector3.html">FMVector3</a>(<span class="keywordtype">float</span> _x, <span class="keywordtype">float</span> _y, <span class="keywordtype">float</span> _z) { x = _x; y = _y; z = _z; }
44<a name="l00046"></a>00046
45<a name="l00057"></a>00057 <a class="code" href="class_f_m_vector3.html">FMVector3</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>* source, uint32 startIndex = 0);
46<a name="l00058"></a>00058
47<a name="l00064"></a><a class="code" href="class_f_m_vector3.html#bf0253baa904834ecfc026869f84f634">00064</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span> LengthSquared()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> x * x + y * y + z * z; }
48<a name="l00065"></a>00065
49<a name="l00071"></a><a class="code" href="class_f_m_vector3.html#4afad998497b127652eb14048932dd36">00071</a>     <span class="keyword">inline</span> <span class="keywordtype">float</span> Length()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> sqrtf(x * x + y * y + z * z); }
50<a name="l00072"></a>00072
51<a name="l00076"></a><a class="code" href="class_f_m_vector3.html#1cf1c273e7462d8b7d07d5795e3abaab">00076</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> NormalizeIt() { <span class="keywordtype">float</span> l = Length(); <span class="keywordflow">if</span> (!<a class="code" href="_f_m_array_8h.html#10854668923860f01d22d6f543c34cb2">IsEquivalent</a>(l, 0.0f)) { x /= l; y /= l; z /= l; }}
52<a name="l00077"></a>00077
53<a name="l00083"></a><a class="code" href="class_f_m_vector3.html#3d32f0806d047b4a4d34bac48842451b">00083</a>     <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> Normalize()<span class="keyword"> const </span>{ <span class="keywordtype">float</span> l = Length(); <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(x / l, y / l, z / l); }
54<a name="l00084"></a>00084
55<a name="l00090"></a><a class="code" href="class_f_m_vector3.html#1fe5b378f95449817837dc0ecadf1ccf">00090</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> Project(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; unto) { (*this) = Projected(unto); }
56<a name="l00091"></a>00091
57<a name="l00098"></a>00098 <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> Projected(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; unto);
58<a name="l00099"></a>00099
59<a name="l00105"></a><a class="code" href="class_f_m_vector3.html#767d55b848c49e297cd683ca961fe138">00105</a>     <span class="keyword">inline</span> operator float*() { <span class="keywordflow">return</span> &amp;x; }
60<a name="l00106"></a>00106
61<a name="l00112"></a><a class="code" href="class_f_m_vector3.html#a293da50dcc86b53884296e2ac8ca578">00112</a>     <span class="keyword">inline</span> operator const float*()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> &amp;x; }
62<a name="l00113"></a>00113
63<a name="l00124"></a><a class="code" href="class_f_m_vector3.html#8b02f3c679758d31f1c5208c954cdbb9">00124</a>     <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; operator =(<span class="keyword">const</span> <span class="keywordtype">float</span>* v) { x = *v; y = *(v + 1); z = *(v + 2); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
64<a name="l00125"></a>00125
65<a name="l00134"></a><a class="code" href="class_f_m_vector3.html#7ec4ab34895012f156add04613322c82">00134</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> ComponentMinimum(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>) { <span class="keywordflow">if</span> (x &lt; <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>.x) x = <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>.x; <span class="keywordflow">if</span> (y &lt; <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>.y) y = <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>.y; <span class="keywordflow">if</span> (z &lt; <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>.z) z = <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>.z; }
66<a name="l00135"></a>00135
67<a name="l00144"></a><a class="code" href="class_f_m_vector3.html#8682b0a239be2b72b85c3ff43b30d9e2">00144</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> ComponentMaximum(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>) { <span class="keywordflow">if</span> (x &gt; <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>.x) x = <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>.x; <span class="keywordflow">if</span> (y &gt; <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>.y) y = <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>.y; <span class="keywordflow">if</span> (z &gt; <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>.z) z = <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>.z; }
68<a name="l00145"></a>00145
69<a name="l00157"></a><a class="code" href="class_f_m_vector3.html#0bbd056f588ca19bcaec3b4b92ff8351">00157</a>     <span class="keyword">inline</span> <span class="keywordtype">void</span> ComponentClamp(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>) { ComponentMinimum(<a class="code" href="_f_utils_8h.html#c6afabdc09a49a433ee19d8a9486056d">min</a>); ComponentMaximum(<a class="code" href="_f_utils_8h.html#ffe776513b24d84b39af8ab0930fef7f">max</a>); }
70<a name="l00158"></a>00158
71<a name="l00159"></a>00159 <span class="keyword">public</span>:
72<a name="l00160"></a><a class="code" href="class_f_m_vector3.html#363010f82c60ec1d53a495de6284daf7">00160</a>     <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> XAxis;
73<a name="l00161"></a><a class="code" href="class_f_m_vector3.html#4e67235dec2d974161ecb965b6590555">00161</a>     <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> YAxis;
74<a name="l00162"></a><a class="code" href="class_f_m_vector3.html#3f1666b8e732a6480e3e3ac3416d0a22">00162</a>     <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> ZAxis;
75<a name="l00163"></a><a class="code" href="class_f_m_vector3.html#18fc0513121c660cc2dc3f172d698adb">00163</a>     <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> Zero; 
76<a name="l00164"></a><a class="code" href="class_f_m_vector3.html#886c355491c083e2664286caa7aa9ed8">00164</a>     <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> Origin;
77<a name="l00165"></a>00165 };
78<a name="l00166"></a>00166
79<a name="l00174"></a><a class="code" href="_f_m_vector3_8h.html#5ffc321dc0ae18da5c5e2ba229305eaf">00174</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_vector2_8h.html#27199a28e5bb94856ebc59f994365bc6">operator +</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> + b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>, a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> + b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> + b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>); }
80<a name="l00175"></a>00175
81<a name="l00183"></a><a class="code" href="_f_m_vector3_8h.html#dbb45411d988a2712d646bf0ab705f12">00183</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_vector2_8h.html#41c213203696d0450c6e36b9419f833d">operator -</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> - b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>, a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> - b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> - b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>); }
82<a name="l00184"></a>00184
83<a name="l00193"></a><a class="code" href="_f_m_vector3_8h.html#a2e23c9914c11ffe362c32a007fea139">00193</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_vector2_8h.html#27199a28e5bb94856ebc59f994365bc6">operator +</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(+a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>, +a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, +a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>); }
84<a name="l00194"></a>00194
85<a name="l00203"></a><a class="code" href="_f_m_vector3_8h.html#69da9cd66caf832daadeb68f57ac0c14">00203</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_vector2_8h.html#41c213203696d0450c6e36b9419f833d">operator -</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(-a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>, -a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, -a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>); }
86<a name="l00204"></a>00204
87<a name="l00212"></a><a class="code" href="_f_m_vector3_8h.html#6cfb75dea153516fa7d987f71d0b2e64">00212</a> <span class="keyword">inline</span> <span class="keywordtype">float</span> <a class="code" href="_f_m_color_8h.html#58f3a16b2bf52b6aab8c7143d202a02a">operator *</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b) { <span class="keywordflow">return</span> a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> * b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> + a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> * b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> + a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> * b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>; }
88<a name="l00213"></a>00213
89<a name="l00221"></a><a class="code" href="_f_m_vector3_8h.html#ffefdbd78ebbc59b753e90a7c65794e0">00221</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_color_8h.html#58f3a16b2bf52b6aab8c7143d202a02a">operator *</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> * b, a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> * b, a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> * b); }
90<a name="l00222"></a>00222
91<a name="l00230"></a><a class="code" href="_f_m_vector3_8h.html#51f9180e5c14c26a89dba945b0383052">00230</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_color_8h.html#58f3a16b2bf52b6aab8c7143d202a02a">operator *</a>(<span class="keywordtype">float</span> a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(a * b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>, a * b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, a * b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>); }
92<a name="l00231"></a>00231
93<a name="l00239"></a><a class="code" href="_f_m_vector3_8h.html#f3b0e449c19f4c4b9743f5c234dd9cb4">00239</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="_f_m_vector3_8h.html#f3b0e449c19f4c4b9743f5c234dd9cb4">operator ^</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>(a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> * b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> - a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> * b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> * b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> - a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> * b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>, a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> * b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> - a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> * b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>); }
94<a name="l00240"></a>00240
95<a name="l00248"></a><a class="code" href="_f_m_vector3_8h.html#e1f49c3b19d4b5a7f592d1f11747d20f">00248</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_m_vector3_8h.html#e1f49c3b19d4b5a7f592d1f11747d20f">operator +=</a>(<a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a) { b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> += a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>; b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> += a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>; b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> += a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>; <span class="keywordflow">return</span> b; }
96<a name="l00249"></a>00249
97<a name="l00257"></a><a class="code" href="_f_m_vector3_8h.html#e977fb636b011eab59ead7c010b6c70f">00257</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_m_vector3_8h.html#e977fb636b011eab59ead7c010b6c70f">operator -=</a>(<a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a) { b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> -= a.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>; b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> -= a.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>; b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> -= a.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>; <span class="keywordflow">return</span> b; }
98<a name="l00258"></a>00258
99<a name="l00266"></a><a class="code" href="_f_m_vector3_8h.html#06a811f0b531280df0aaa821edd2c904">00266</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_m_vector3_8h.html#06a811f0b531280df0aaa821edd2c904">operator *=</a>(<a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b, <span class="keywordtype">float</span> a) { b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> *= a; b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> *= a; b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> *= a; <span class="keywordflow">return</span> b; }
100<a name="l00267"></a>00267
101<a name="l00275"></a><a class="code" href="_f_m_vector3_8h.html#cdab4fc070de74c699b7b33c7c47210d">00275</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; <a class="code" href="_f_m_vector3_8h.html#cdab4fc070de74c699b7b33c7c47210d">operator /=</a>(<a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b, <span class="keywordtype">float</span> a) { b.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a> /= a; b.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a> /= a; b.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a> /= a; <span class="keywordflow">return</span> b; }
102<a name="l00276"></a>00276
103<a name="l00283"></a><a class="code" href="_f_m_vector3_8h.html#531db245ecc1122b02ae2de0585ccc14">00283</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="_f_m_array_8h.html#10854668923860f01d22d6f543c34cb2">IsEquivalent</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; p, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; q) { <span class="keywordflow">return</span> <a class="code" href="_f_m_array_8h.html#10854668923860f01d22d6f543c34cb2">IsEquivalent</a>(p.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>, q.<a class="code" href="class_f_m_vector3.html#b31613614892bba88807d31b2c9ee87e">x</a>) &amp;&amp; <a class="code" href="_f_m_array_8h.html#10854668923860f01d22d6f543c34cb2">IsEquivalent</a>(p.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>, q.<a class="code" href="class_f_m_vector3.html#6e8a45596a095d86205557d7231ef973">y</a>) &amp;&amp; <a class="code" href="_f_m_array_8h.html#10854668923860f01d22d6f543c34cb2">IsEquivalent</a>(p.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>, q.<a class="code" href="class_f_m_vector3.html#d912906661058ab718fb887ad67f5ad4">z</a>); }
104<a name="l00284"></a>00284
105<a name="l00291"></a><a class="code" href="_f_m_vector3_8h.html#5a306a2784a1d6a32e5da612b1065f88">00291</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="_f_m_matrix44_8h.html#50948795a56eefc94456157d12214892">operator == </a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; b) { <span class="keywordflow">return</span> <a class="code" href="_f_m_array_8h.html#10854668923860f01d22d6f543c34cb2">IsEquivalent</a>(a, b); }
106<a name="l00292"></a>00292
107<a name="l00293"></a>00293 <span class="comment">// Already documented above.</span>
108<a name="l00294"></a><a class="code" href="class_f_m_vector3.html#1c63bdb6360f380049acff25f61376a4">00294</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a> <a class="code" href="class_f_m_vector3.html#1c63bdb6360f380049acff25f61376a4">FMVector3::Projected</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; unto) { <span class="keywordflow">return</span> ((*<span class="keyword">this</span>) * unto) / unto.<a class="code" href="class_f_m_vector3.html#bf0253baa904834ecfc026869f84f634">LengthSquared</a>() * unto; }
109<a name="l00295"></a>00295
110<a name="l00297"></a><a class="code" href="_f_m_vector3_8h.html#0342f6166f6df40023a5effbe09f4a0f">00297</a> <span class="keyword">typedef</span> <a class="code" href="classvector.html">vector&lt;FMVector3&gt;</a> <a class="code" href="classvector.html">FMVector3List</a>;
111<a name="l00298"></a>00298
112<a name="l00299"></a>00299 <span class="preprocessor">#endif // _FM_VECTOR3_H_</span>
113</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:39 2006 for FCollada by&nbsp;
114<a href="http://www.doxygen.org/index.html">
115<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
116</body>
117</html>
Note: See TracBrowser for help on using the repository browser.