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

Revision 964, 6.1 KB checked in by igarcia, 18 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/FMQuaternion.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/FMQuaternion.h</h1><a href="_f_m_quaternion_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="l00011"></a>00011 <span class="preprocessor">#ifndef _FM_QUATERNION_H_</span>
28<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor">#define _FM_QUATERNION_H_</span>
29<a name="l00013"></a>00013 <span class="preprocessor"></span>
30<a name="l00022"></a><a class="code" href="class_f_m_quaternion.html">00022</a> <span class="keyword">class </span>FCOLLADA_EXPORT <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a>
31<a name="l00023"></a>00023 {
32<a name="l00024"></a>00024 <span class="keyword">public</span>:
33<a name="l00025"></a><a class="code" href="class_f_m_quaternion.html#036c642a43fb84dc5544eb4ce0e0828d">00025</a>     <span class="keywordtype">float</span> x;   
34<a name="l00026"></a><a class="code" href="class_f_m_quaternion.html#996bf6bcb013dbbbe8e255c35e085f81">00026</a>     <span class="keywordtype">float</span> y;   
35<a name="l00027"></a><a class="code" href="class_f_m_quaternion.html#03d06578ec64cf8a4d2032c336153244">00027</a>     <span class="keywordtype">float</span> z;   
36<a name="l00028"></a><a class="code" href="class_f_m_quaternion.html#c60123167417258df35a27db4d3e7646">00028</a>     <span class="keywordtype">float</span> w;   
37<a name="l00030"></a>00030 <span class="preprocessor">    #ifndef _DEBUG</span>
38<a name="l00031"></a>00031 <span class="preprocessor"></span>
39<a name="l00036"></a><a class="code" href="class_f_m_quaternion.html#005eee578d5c2a7ed5f687e24adb4816">00036</a>     <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a>() {}
40<a name="l00037"></a>00037 <span class="preprocessor">    #else</span>
41<a name="l00038"></a>00038 <span class="preprocessor"></span>    <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a>() { x = 123456789.0f; y = 123456789.0f; z = 123456789.0f; w = 123456789.0f; }
42<a name="l00039"></a>00039 <span class="preprocessor">    #endif </span>
43<a name="l00040"></a>00040 <span class="preprocessor"></span>
44<a name="l00049"></a><a class="code" href="class_f_m_quaternion.html#a919c71bc03cd277d9996b50e4ddefda">00049</a>     <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a>(<span class="keywordtype">float</span> _x, <span class="keywordtype">float</span> _y, <span class="keywordtype">float</span> _z, <span class="keywordtype">float</span> _w) { x = _x; y = _y; z = _z; w = _w; }
45<a name="l00050"></a>00050
46<a name="l00057"></a>00057 <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a>(<span class="keyword">const</span> <a class="code" href="class_f_m_vector3.html">FMVector3</a>&amp; axis, <span class="keywordtype">float</span> angle);
47<a name="l00058"></a>00058
48<a name="l00064"></a><a class="code" href="class_f_m_quaternion.html#0e7d1d7d85a8c7f1c70de0d01a44790e">00064</a>     <span class="keyword">inline</span> operator float*() { <span class="keywordflow">return</span> &amp;x; }
49<a name="l00065"></a>00065
50<a name="l00071"></a><a class="code" href="class_f_m_quaternion.html#1bf6463628b0027b3a4da62f0e93ec17">00071</a>     <span class="keyword">inline</span> operator const float*()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> &amp;x; }
51<a name="l00072"></a>00072
52<a name="l00084"></a><a class="code" href="class_f_m_quaternion.html#fac9386b2d79c2d63aee70c4d89184ae">00084</a>     <span class="keyword">inline</span> <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a>&amp; operator =(<span class="keyword">const</span> <span class="keywordtype">float</span>* v) { x = *v; y = *(v + 1); z = *(v + 2); w = *(v + 3); <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
53<a name="l00085"></a>00085
54<a name="l00093"></a>00093 <a class="code" href="class_f_m_quaternion.html">FMQuaternion</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_quaternion.html">FMQuaternion</a>&amp; q) <span class="keyword">const</span>;
55<a name="l00094"></a>00094
56<a name="l00102"></a>00102 <span class="keyword">static</span> <a class="code" href="class_f_m_quaternion.html">FMQuaternion</a> EulerRotationQuaternion(<span class="keywordtype">float</span> _x, <span class="keywordtype">float</span> _y, <span class="keywordtype">float</span> _z);
57<a name="l00103"></a>00103 };
58<a name="l00104"></a>00104
59<a name="l00105"></a>00105 <span class="preprocessor">#endif // _FM_QUATERNION_H_</span>
60</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri May 12 16:44:39 2006 for FCollada by&nbsp;
61<a href="http://www.doxygen.org/index.html">
62<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6-NO </small></address>
63</body>
64</html>
Note: See TracBrowser for help on using the repository browser.