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/FMVector2.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 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 Pages</span></a></li> |
---|
16 | </ul></div> |
---|
17 | <div class="tabs"> |
---|
18 | <ul> |
---|
19 | <li><a href="files.html"><span>File List</span></a></li> |
---|
20 | <li><a href="globals.html"><span>File Members</span></a></li> |
---|
21 | </ul></div> |
---|
22 | <h1>FMath/FMVector2.h</h1><a href="_f_m_vector2_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="l00012"></a>00012 <span class="preprocessor">#ifndef _FM_VECTOR2_H_</span> |
---|
28 | <a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor">#define _FM_VECTOR2_H_</span> |
---|
29 | <a name="l00014"></a>00014 <span class="preprocessor"></span> |
---|
30 | <a name="l00021"></a><a class="code" href="class_f_m_vector2.html">00021</a> <span class="keyword">class </span>FCOLLADA_EXPORT <a class="code" href="class_f_m_vector2.html">FMVector2</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_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">00024</a> <span class="keywordtype">float</span> u; |
---|
34 | <a name="l00025"></a><a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">00025</a> <span class="keywordtype">float</span> v; |
---|
35 | <a name="l00027"></a>00027 <span class="keyword">public</span>: |
---|
36 | <a name="l00031"></a>00031 <span class="preprocessor"> #ifndef _DEBUG</span> |
---|
37 | <a name="l00032"></a><a class="code" href="class_f_m_vector2.html#a96a0629fd333f71e455fcc2069b3193">00032</a> <span class="preprocessor"></span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>() {} |
---|
38 | <a name="l00033"></a>00033 <span class="preprocessor"> #else</span> |
---|
39 | <a name="l00034"></a>00034 <span class="preprocessor"></span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>() { u = 123456789.0f; v = 123456789.0f; } |
---|
40 | <a name="l00035"></a>00035 <span class="preprocessor"> #endif </span> |
---|
41 | <a name="l00036"></a>00036 <span class="preprocessor"></span> |
---|
42 | <a name="l00043"></a><a class="code" href="class_f_m_vector2.html#29aeec6ea2cf4feb0375af535f8e7490">00043</a> <a class="code" href="class_f_m_vector2.html">FMVector2</a>(<span class="keywordtype">float</span> _u, <span class="keywordtype">float</span> _v) { u = _u; v = _v; } |
---|
43 | <a name="l00044"></a>00044 |
---|
44 | <a name="l00050"></a><a class="code" href="class_f_m_vector2.html#c7b603a55230c6f7d50a5706f5266c91">00050</a> <span class="keyword">inline</span> operator float*() { <span class="keywordflow">return</span> &u; } |
---|
45 | <a name="l00051"></a>00051 |
---|
46 | <a name="l00061"></a><a class="code" href="class_f_m_vector2.html#10996ad35ebbe593238dd505232cbad9">00061</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& <a class="code" href="_f_m_vector3_8h.html#e1f49c3b19d4b5a7f592d1f11747d20f">operator +=</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& a) { u += a.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a>; v += a.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
47 | <a name="l00062"></a>00062 |
---|
48 | <a name="l00072"></a><a class="code" href="class_f_m_vector2.html#bdfa0a7c8b6ae45995d14a3f133e88a0">00072</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& <a class="code" href="_f_m_vector3_8h.html#06a811f0b531280df0aaa821edd2c904">operator *=</a>(<span class="keywordtype">float</span> a) { u *= a; v *= a; <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
49 | <a name="l00073"></a>00073 |
---|
50 | <a name="l00084"></a><a class="code" href="class_f_m_vector2.html#a4138ab608dde492d0f7fa5cb61b225c">00084</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& operator =(<span class="keyword">const</span> <span class="keywordtype">float</span>* f) { u = *f; v = *(f + 1); <span class="keywordflow">return</span> *<span class="keyword">this</span>; } |
---|
51 | <a name="l00085"></a>00085 }; |
---|
52 | <a name="l00086"></a>00086 |
---|
53 | <a name="l00094"></a><a class="code" href="_f_m_vector2_8h.html#27199a28e5bb94856ebc59f994365bc6">00094</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</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_vector2.html">FMVector2</a>& a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>(a.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a> + b.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a>, a.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a> + b.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a>); } |
---|
54 | <a name="l00095"></a>00095 |
---|
55 | <a name="l00103"></a><a class="code" href="_f_m_vector2_8h.html#41c213203696d0450c6e36b9419f833d">00103</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</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_vector2.html">FMVector2</a>& a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>(a.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a> - b.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a>, a.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a> - b.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a>); } |
---|
56 | <a name="l00104"></a>00104 |
---|
57 | <a name="l00112"></a><a class="code" href="_f_m_vector2_8h.html#2c31e674822d5b0aa161102eb8ec8205">00112</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_vector2.html">FMVector2</a>& a, <span class="keyword">const</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>& b) { <span class="keywordflow">return</span> a.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a> * b.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a> + a.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a> * b.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a>; } |
---|
58 | <a name="l00113"></a>00113 |
---|
59 | <a name="l00121"></a><a class="code" href="_f_m_vector2_8h.html#2b9c441b1d3d54318a3fbf48e975db32">00121</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</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_vector2.html">FMVector2</a>& a, <span class="keywordtype">float</span> b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>(a.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a> * b, a.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a> * b); } |
---|
60 | <a name="l00122"></a>00122 |
---|
61 | <a name="l00130"></a><a class="code" href="_f_m_vector2_8h.html#2c8c7996d4fad058a0a7343d51e6cd1b">00130</a> <span class="keyword">inline</span> <a class="code" href="class_f_m_vector2.html">FMVector2</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_vector2.html">FMVector2</a>& b) { <span class="keywordflow">return</span> <a class="code" href="class_f_m_vector2.html">FMVector2</a>(a * b.<a class="code" href="class_f_m_vector2.html#e9271c21509c9a23fdeaacb30e3ec49f">u</a>, a * b.<a class="code" href="class_f_m_vector2.html#d336a3412e6070c3419df8a82ccdfeac">v</a>); } |
---|
62 | <a name="l00131"></a>00131 |
---|
63 | <a name="l00132"></a>00132 <span class="preprocessor">#endif // _FM_VECTOR2_H_</span> |
---|
64 | </pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:39 2006 for FCollada by |
---|
65 | <a href="http://www.doxygen.org/index.html"> |
---|
66 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address> |
---|
67 | </body> |
---|
68 | </html> |
---|