1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreQuaternion.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
4 | <link type="text/css" rel="stylesheet" href="style.css"> |
---|
5 | </head> |
---|
6 | |
---|
7 | <body> |
---|
8 | <!-- Generated by Doxygen 1.3.6 --> |
---|
9 | <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreQuaternion.h</h1><a href="OgreQuaternion_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="comment">// NOTE THAT THIS FILE IS BASED ON MATERIAL FROM:</span> |
---|
35 | 00026 |
---|
36 | 00027 <span class="comment">// Magic Software, Inc.</span> |
---|
37 | 00028 <span class="comment">// http://www.geometrictools.com/</span> |
---|
38 | 00029 <span class="comment">// Copyright (c) 2000, All Rights Reserved</span> |
---|
39 | 00030 <span class="comment">//</span> |
---|
40 | 00031 <span class="comment">// Source code from Magic Software is supplied under the terms of a license</span> |
---|
41 | 00032 <span class="comment">// agreement and may not be copied or disclosed except in accordance with the</span> |
---|
42 | 00033 <span class="comment">// terms of that agreement. The various license agreements may be found at</span> |
---|
43 | 00034 <span class="comment">// the Magic Software web site. This file is subject to the license</span> |
---|
44 | 00035 <span class="comment">//</span> |
---|
45 | 00036 <span class="comment">// FREE SOURCE CODE</span> |
---|
46 | 00037 <span class="comment">// http://www.geometrictools.com/License/WildMagic3License.pdf</span> |
---|
47 | 00038 |
---|
48 | 00039 <span class="preprocessor">#ifndef __Quaternion_H__</span> |
---|
49 | 00040 <span class="preprocessor"></span><span class="preprocessor">#define __Quaternion_H__</span> |
---|
50 | 00041 <span class="preprocessor"></span> |
---|
51 | 00042 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
52 | 00043 <span class="preprocessor">#include "<a class="code" href="OgreMath_8h.html">OgreMath.h</a>"</span> |
---|
53 | 00044 |
---|
54 | 00045 <span class="keyword">namespace </span>Ogre { |
---|
55 | 00046 |
---|
56 | <a name="l00049"></a><a class="code" href="classOgre_1_1Quaternion.html">00049</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Quaternion |
---|
57 | 00050 { |
---|
58 | 00051 <span class="keyword">public</span>: |
---|
59 | <a name="l00052"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona0">00052</a> <span class="keyword">inline</span> Quaternion ( |
---|
60 | 00053 <a class="code" href="namespaceOgre.html#a465">Real</a> fW = 1.0, |
---|
61 | 00054 <a class="code" href="namespaceOgre.html#a465">Real</a> fX = 0.0, <a class="code" href="namespaceOgre.html#a465">Real</a> fY = 0.0, <a class="code" href="namespaceOgre.html#a465">Real</a> fZ = 0.0) |
---|
62 | 00055 { |
---|
63 | 00056 w = fW; |
---|
64 | 00057 x = fX; |
---|
65 | 00058 y = fY; |
---|
66 | 00059 z = fZ; |
---|
67 | 00060 } |
---|
68 | <a name="l00061"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona1">00061</a> <span class="keyword">inline</span> Quaternion (<span class="keyword">const</span> Quaternion& rkQ) |
---|
69 | 00062 { |
---|
70 | 00063 w = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono0">w</a>; |
---|
71 | 00064 x = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono1">x</a>; |
---|
72 | 00065 y = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono2">y</a>; |
---|
73 | 00066 z = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono3">z</a>; |
---|
74 | 00067 } |
---|
75 | <a name="l00069"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona2">00069</a> <span class="keyword">inline</span> Quaternion(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Matrix3.html">Matrix3</a>& rot) |
---|
76 | 00070 { |
---|
77 | 00071 this->FromRotationMatrix(rot); |
---|
78 | 00072 } |
---|
79 | <a name="l00074"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona3">00074</a> <span class="keyword">inline</span> Quaternion(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& rfAngle, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkAxis) |
---|
80 | 00075 { |
---|
81 | 00076 this->FromAngleAxis(rfAngle, rkAxis); |
---|
82 | 00077 } |
---|
83 | 00078 <span class="preprocessor">#ifndef OGRE_FORCE_ANGLE_TYPES</span> |
---|
84 | 00079 <span class="preprocessor"></span> <span class="keyword">inline</span> Quaternion(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a>& rfAngle, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkAxis) |
---|
85 | 00080 { |
---|
86 | 00081 this->FromAngleAxis(rfAngle, rkAxis); |
---|
87 | 00082 } |
---|
88 | 00083 <span class="preprocessor">#endif//OGRE_FORCE_ANGLE_TYPES</span> |
---|
89 | 00084 <span class="preprocessor"></span> |
---|
90 | <a name="l00085"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona4">00085</a> <span class="keyword">inline</span> Quaternion(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& xaxis, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& yaxis, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& zaxis) |
---|
91 | 00086 { |
---|
92 | 00087 this->FromAxes(xaxis, yaxis, zaxis); |
---|
93 | 00088 } |
---|
94 | <a name="l00090"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona5">00090</a> <span class="keyword">inline</span> Quaternion(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>* akAxis) |
---|
95 | 00091 { |
---|
96 | 00092 this->FromAxes(akAxis); |
---|
97 | 00093 } |
---|
98 | <a name="l00095"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona6">00095</a> <span class="keyword">inline</span> Quaternion(<a class="code" href="namespaceOgre.html#a465">Real</a>* valptr) |
---|
99 | 00096 { |
---|
100 | 00097 memcpy(val, valptr, <span class="keyword">sizeof</span>(<a class="code" href="namespaceOgre.html#a465">Real</a>)*4); |
---|
101 | 00098 } |
---|
102 | 00099 |
---|
103 | 00100 <span class="keywordtype">void</span> FromRotationMatrix (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Matrix3.html">Matrix3</a>& kRot); |
---|
104 | 00101 <span class="keywordtype">void</span> ToRotationMatrix (<a class="code" href="classOgre_1_1Matrix3.html">Matrix3</a>& kRot) <span class="keyword">const</span>; |
---|
105 | 00102 <span class="keywordtype">void</span> FromAngleAxis (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& rfAngle, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkAxis); |
---|
106 | 00103 <span class="keywordtype">void</span> ToAngleAxis (<a class="code" href="classOgre_1_1Radian.html">Radian</a>& rfAngle, <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkAxis) <span class="keyword">const</span>; |
---|
107 | <a name="l00104"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona11">00104</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> ToAngleAxis (<a class="code" href="classOgre_1_1Degree.html">Degree</a>& dAngle, <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkAxis)<span class="keyword"> const </span>{ |
---|
108 | 00105 <a class="code" href="classOgre_1_1Radian.html">Radian</a> rAngle; |
---|
109 | 00106 ToAngleAxis ( rAngle, rkAxis ); |
---|
110 | 00107 dAngle = rAngle; |
---|
111 | 00108 } |
---|
112 | 00109 <span class="preprocessor">#ifndef OGRE_FORCE_ANGLE_TYPES</span> |
---|
113 | 00110 <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> FromAngleAxis (<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a>& rfAngle, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkAxis) { |
---|
114 | 00111 FromAngleAxis ( <a class="code" href="classOgre_1_1Angle.html">Angle</a>(rfAngle), rkAxis ); |
---|
115 | 00112 } |
---|
116 | 00113 <span class="keyword">inline</span> <span class="keywordtype">void</span> ToAngleAxis (Real& rfAngle, Vector3& rkAxis)<span class="keyword"> const </span>{ |
---|
117 | 00114 Radian r; |
---|
118 | 00115 ToAngleAxis ( r, rkAxis ); |
---|
119 | 00116 rfAngle = r.valueAngleUnits(); |
---|
120 | 00117 } |
---|
121 | 00118 <span class="preprocessor">#endif//OGRE_FORCE_ANGLE_TYPES</span> |
---|
122 | 00119 <span class="preprocessor"></span> <span class="keywordtype">void</span> FromAxes (<span class="keyword">const</span> Vector3* akAxis); |
---|
123 | 00120 <span class="keywordtype">void</span> FromAxes (<span class="keyword">const</span> Vector3& xAxis, <span class="keyword">const</span> Vector3& yAxis, <span class="keyword">const</span> Vector3& zAxis); |
---|
124 | 00121 <span class="keywordtype">void</span> ToAxes (Vector3* akAxis) <span class="keyword">const</span>; |
---|
125 | 00122 <span class="keywordtype">void</span> ToAxes (Vector3& xAxis, Vector3& yAxis, Vector3& zAxis) <span class="keyword">const</span>; |
---|
126 | 00124 Vector3 xAxis(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
127 | 00126 Vector3 yAxis(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
128 | 00128 Vector3 zAxis(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
129 | 00129 |
---|
130 | <a name="l00130"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona19">00130</a> <span class="keyword">inline</span> Quaternion& operator= (<span class="keyword">const</span> Quaternion& rkQ) |
---|
131 | 00131 { |
---|
132 | 00132 w = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono0">w</a>; |
---|
133 | 00133 x = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono1">x</a>; |
---|
134 | 00134 y = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono2">y</a>; |
---|
135 | 00135 z = rkQ.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono3">z</a>; |
---|
136 | 00136 <span class="keywordflow">return</span> *<span class="keyword">this</span>; |
---|
137 | 00137 } |
---|
138 | 00138 Quaternion operator+ (<span class="keyword">const</span> Quaternion& rkQ) <span class="keyword">const</span>; |
---|
139 | 00139 Quaternion operator- (<span class="keyword">const</span> Quaternion& rkQ) <span class="keyword">const</span>; |
---|
140 | 00140 Quaternion <a class="code" href="namespaceOgre.html#a617">operator* </a>(<span class="keyword">const</span> Quaternion& rkQ) <span class="keyword">const</span>; |
---|
141 | 00141 Quaternion <a class="code" href="namespaceOgre.html#a617">operator* </a>(<a class="code" href="namespaceOgre.html#a465">Real</a> fScalar) <span class="keyword">const</span>; |
---|
142 | 00142 <a class="code" href="class__OgreExport.html">_OgreExport</a> <span class="keyword">friend</span> Quaternion <a class="code" href="namespaceOgre.html#a617">operator* </a>(<a class="code" href="namespaceOgre.html#a465">Real</a> fScalar, |
---|
143 | 00143 <span class="keyword">const</span> Quaternion& rkQ); |
---|
144 | 00144 Quaternion operator- () <span class="keyword">const</span>; |
---|
145 | <a name="l00145"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona25">00145</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a623">operator== </a>(<span class="keyword">const</span> Quaternion& rhs)<span class="keyword"> const</span> |
---|
146 | 00146 <span class="keyword"> </span>{ |
---|
147 | 00147 <span class="keywordflow">return</span> (rhs.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono1">x</a> == x) && (rhs.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono2">y</a> == y) && |
---|
148 | 00148 (rhs.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono3">z</a> == z) && (rhs.<a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono0">w</a> == w); |
---|
149 | 00149 } |
---|
150 | <a name="l00150"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniona26">00150</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a624">operator!= </a>(<span class="keyword">const</span> Quaternion& rhs)<span class="keyword"> const</span> |
---|
151 | 00151 <span class="keyword"> </span>{ |
---|
152 | 00152 <span class="keywordflow">return</span> !<a class="code" href="namespaceOgre.html#a623">operator==</a>(rhs); |
---|
153 | 00153 } |
---|
154 | 00154 <span class="comment">// functions of a quaternion</span> |
---|
155 | 00155 <a class="code" href="namespaceOgre.html#a465">Real</a> Dot (<span class="keyword">const</span> Quaternion& rkQ) <span class="keyword">const</span>; <span class="comment">// dot product</span> |
---|
156 | 00156 <a class="code" href="namespaceOgre.html#a465">Real</a> Norm () <span class="keyword">const</span>; <span class="comment">// squared-length</span> |
---|
157 | 00158 <span class="comment"></span> <a class="code" href="namespaceOgre.html#a465">Real</a> normalise(<span class="keywordtype">void</span>); |
---|
158 | 00159 Quaternion Inverse () <span class="keyword">const</span>; <span class="comment">// apply to non-zero quaternion</span> |
---|
159 | 00160 Quaternion UnitInverse () <span class="keyword">const</span>; <span class="comment">// apply to unit-length quaternion</span> |
---|
160 | 00161 Quaternion Exp () <span class="keyword">const</span>; |
---|
161 | 00162 Quaternion <a class="code" href="classOgre_1_1Log.html">Log</a> () <span class="keyword">const</span>; |
---|
162 | 00163 |
---|
163 | 00164 <span class="comment">// rotation of a vector by a quaternion</span> |
---|
164 | 00165 <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> <a class="code" href="namespaceOgre.html#a617">operator* </a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& rkVector) <span class="keyword">const</span>; |
---|
165 | 00166 |
---|
166 | 00168 <a class="code" href="classOgre_1_1Radian.html">Radian</a> getRoll(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
167 | 00170 <a class="code" href="classOgre_1_1Radian.html">Radian</a> getPitch(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
168 | 00172 <a class="code" href="classOgre_1_1Radian.html">Radian</a> getYaw(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
169 | 00174 <span class="keywordtype">bool</span> equals(<span class="keyword">const</span> Quaternion& rhs, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& tolerance) <span class="keyword">const</span>; |
---|
170 | 00175 |
---|
171 | 00176 <span class="comment">// spherical linear interpolation</span> |
---|
172 | 00177 <span class="keyword">static</span> Quaternion Slerp (<a class="code" href="namespaceOgre.html#a465">Real</a> fT, <span class="keyword">const</span> Quaternion& rkP, |
---|
173 | 00178 <span class="keyword">const</span> Quaternion& rkQ, <span class="keywordtype">bool</span> shortestPath = <span class="keyword">false</span>); |
---|
174 | 00179 |
---|
175 | 00180 <span class="keyword">static</span> Quaternion SlerpExtraSpins (<a class="code" href="namespaceOgre.html#a465">Real</a> fT, |
---|
176 | 00181 <span class="keyword">const</span> Quaternion& rkP, <span class="keyword">const</span> Quaternion& rkQ, |
---|
177 | 00182 <span class="keywordtype">int</span> iExtraSpins); |
---|
178 | 00183 |
---|
179 | 00184 <span class="comment">// setup for spherical quadratic interpolation</span> |
---|
180 | 00185 <span class="keyword">static</span> <span class="keywordtype">void</span> Intermediate (<span class="keyword">const</span> Quaternion& rkQ0, |
---|
181 | 00186 <span class="keyword">const</span> Quaternion& rkQ1, <span class="keyword">const</span> Quaternion& rkQ2, |
---|
182 | 00187 Quaternion& rka, Quaternion& rkB); |
---|
183 | 00188 |
---|
184 | 00189 <span class="comment">// spherical quadratic interpolation</span> |
---|
185 | 00190 <span class="keyword">static</span> Quaternion Squad (<a class="code" href="namespaceOgre.html#a465">Real</a> fT, <span class="keyword">const</span> Quaternion& rkP, |
---|
186 | 00191 <span class="keyword">const</span> Quaternion& rkA, <span class="keyword">const</span> Quaternion& rkB, |
---|
187 | 00192 <span class="keyword">const</span> Quaternion& rkQ, <span class="keywordtype">bool</span> shortestPath = <span class="keyword">false</span>); |
---|
188 | 00193 |
---|
189 | 00194 <span class="comment">// normalised linear interpolation - faster but less accurate (non-constant rotation velocity)</span> |
---|
190 | 00195 <span class="keyword">static</span> Quaternion nlerp(<a class="code" href="namespaceOgre.html#a465">Real</a> fT, <span class="keyword">const</span> Quaternion& rkP, |
---|
191 | 00196 <span class="keyword">const</span> Quaternion& rkQ, <span class="keywordtype">bool</span> shortestPath = <span class="keyword">false</span>); |
---|
192 | 00197 |
---|
193 | 00198 <span class="comment">// cutoff for sine near zero</span> |
---|
194 | <a name="l00199"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaternions0">00199</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a465">Real</a> ms_fEpsilon; |
---|
195 | 00200 |
---|
196 | 00201 <span class="comment">// special values</span> |
---|
197 | <a name="l00202"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaternions1">00202</a> <span class="keyword">static</span> <span class="keyword">const</span> Quaternion ZERO; |
---|
198 | <a name="l00203"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaternions2">00203</a> <span class="keyword">static</span> <span class="keyword">const</span> Quaternion IDENTITY; |
---|
199 | 00204 |
---|
200 | 00205 <span class="keyword">union</span> |
---|
201 | 00206 <span class="keyword"> </span>{ |
---|
202 | 00207 <span class="keyword">struct </span>{ |
---|
203 | <a name="l00208"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono3">00208</a> <a class="code" href="namespaceOgre.html#a465">Real</a> w, x, y, z; |
---|
204 | 00209 }; |
---|
205 | <a name="l00210"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaterniono4">00210</a> <a class="code" href="namespaceOgre.html#a465">Real</a> val[4]; |
---|
206 | 00211 }; |
---|
207 | 00212 |
---|
208 | 00216 <span class="keyword">inline</span> <a class="code" href="class__OgreExport.html">_OgreExport</a> <span class="keyword">friend</span> std::ostream& <span class="keyword">operator</span> << |
---|
209 | <a name="l00217"></a><a class="code" href="classOgre_1_1Quaternion.html#Ogre_1_1Quaternionn1">00217</a> ( std::ostream& o, <span class="keyword">const</span> Quaternion& q ) |
---|
210 | 00218 { |
---|
211 | 00219 o << <span class="stringliteral">"Quaternion("</span> << q.w << <span class="stringliteral">", "</span> << q.x << <span class="stringliteral">", "</span> << q.y << <span class="stringliteral">", "</span> << q.z << <span class="stringliteral">")"</span>; |
---|
212 | 00220 <span class="keywordflow">return</span> o; |
---|
213 | 00221 } |
---|
214 | 00222 |
---|
215 | 00223 }; |
---|
216 | 00224 |
---|
217 | 00225 } |
---|
218 | 00226 |
---|
219 | 00227 |
---|
220 | 00228 |
---|
221 | 00229 |
---|
222 | 00230 <span class="preprocessor">#endif </span> |
---|
223 | </pre></div><hr> |
---|
224 | <p> |
---|
225 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
226 | <!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/> |
---|
227 | This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/> |
---|
228 | <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> |
---|
229 | <Work rdf:about=""> |
---|
230 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
231 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
232 | </Work> |
---|
233 | <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> --> |
---|
234 | |
---|
235 | Last modified Sun Mar 12 14:37:47 2006 |
---|
236 | </p> |
---|
237 | </body> |
---|
238 | </html> |
---|