<ahref="a01375.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> </div><divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="preprocessor">#pragma once</span></div><divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> </div><divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment">// Dependency:</span></div><divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="preprocessor">#include "../glm.hpp"</span></div><divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="preprocessor">#include "../gtc/constants.hpp"</span></div><divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="preprocessor">#include "../gtc/quaternion.hpp"</span></div><divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="preprocessor">#include "../ext/quaternion_exponential.hpp"</span></div><divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="preprocessor">#include "../gtx/norm.hpp"</span></div><divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> </div><divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> <spanclass="preprocessor">#ifndef GLM_ENABLE_EXPERIMENTAL</span></div><divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="preprocessor"># error "GLM: GLM_GTX_quaternion is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."</span></div><divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="preprocessor">#endif</span></div><divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> </div><divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="preprocessor">#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)</span></div><divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="preprocessor"># pragma message("GLM: GLM_GTX_quaternion extension included")</span></div><divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="preprocessor">#endif</span></div><divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> </div><divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="keyword">namespace </span><aclass="code"href="a00794.html">glm</a></div><divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> {</div><divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> </div><divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="keyword">template</span><<spanclass="keyword">typename</span> T, qualifier Q></div><divclass="line"><aname="l00040"></a><spanclass="lineno"> 40</span>  GLM_FUNC_DECL qua<T, Q><aclass="code"href="a00771.html#ga5ee8332600b2aca3a77622a28d857b55">quat_identity</a>();</div><divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span> </div><divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="keyword">template</span><<spanclass="keyword">typename</span> T, qualifier Q></div><divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span>  GLM_FUNC_DECL vec<3, T, Q><aclass="code"href="a00771.html#ga9f5f77255756e5668dfee7f0d07ed021">cross</a>(</div><divclass="line"><aname="l00047"></a><spanclass="lineno"> 47</span>  qua<T, Q><spanclass="keyword">const</span>& q,</div><divclass="line"><aname="l00048"></a><spanclass="lineno"> 48</span>
<divclass="ttc"id="a00771_html_ga5eb36f51e1638e710451eba194dbc011"><divclass="ttname"><ahref="a00771.html#ga5eb36f51e1638e710451eba194dbc011">glm::toQuat</a></div><divclass="ttdeci">GLM_FUNC_DECL qua< T, Q > toQuat(mat< 4, 4, T, Q > const &x)</div><divclass="ttdoc">Converts a 4 * 4 matrix to a quaternion. </div><divclass="ttdef"><b>Definition:</b><ahref="a01375_source.html#l00134">gtx/quaternion.hpp:134</a></div></div>
<divclass="ttc"id="a00666_html_ga333ab70047fbe4132406100c292dbc89"><divclass="ttname"><ahref="a00666.html#ga333ab70047fbe4132406100c292dbc89">glm::mat3_cast</a></div><divclass="ttdeci">GLM_FUNC_DECL mat< 3, 3, T, Q > mat3_cast(qua< T, Q > const &x)</div><divclass="ttdoc">Converts a quaternion to a 3 * 3 matrix. </div></div>
<divclass="ttc"id="a00771_html_gadfa2c77094e8cc9adad321d938855ffb"><divclass="ttname"><ahref="a00771.html#gadfa2c77094e8cc9adad321d938855ffb">glm::toMat4</a></div><divclass="ttdeci">GLM_FUNC_DECL mat< 4, 4, T, Q > toMat4(qua< T, Q > const &x)</div><divclass="ttdoc">Converts a quaternion to a 4 * 4 matrix. </div><divclass="ttdef"><b>Definition:</b><ahref="a01375_source.html#l00120">gtx/quaternion.hpp:120</a></div></div>
<divclass="ttc"id="a00771_html_gaab0afabb894b28a983fb8ec610409d56"><divclass="ttname"><ahref="a00771.html#gaab0afabb894b28a983fb8ec610409d56">glm::toMat3</a></div><divclass="ttdeci">GLM_FUNC_DECL mat< 3, 3, T, Q > toMat3(qua< T, Q > const &x)</div><divclass="ttdoc">Converts a quaternion to a 3 * 3 matrix. </div><divclass="ttdef"><b>Definition:</b><ahref="a01375_source.html#l00113">gtx/quaternion.hpp:113</a></div></div>
<divclass="ttc"id="a00771_html_ga03e61282831cc3f52cc76f72f52ad2c5"><divclass="ttname"><ahref="a00771.html#ga03e61282831cc3f52cc76f72f52ad2c5">glm::rotation</a></div><divclass="ttdeci">GLM_FUNC_DECL qua< T, Q > rotation(vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dest)</div><divclass="ttdoc">Compute the rotation between two vectors. </div></div>
<divclass="ttc"id="a00666_html_ga1113212d9bdefc2e31ad40e5bbb506f3"><divclass="ttname"><ahref="a00666.html#ga1113212d9bdefc2e31ad40e5bbb506f3">glm::mat4_cast</a></div><divclass="ttdeci">GLM_FUNC_DECL mat< 4, 4, T, Q > mat4_cast(qua< T, Q > const &x)</div><divclass="ttdoc">Converts a quaternion to a 4 * 4 matrix. </div></div>
<divclass="ttc"id="a00771_html_ga321953c1b2e7befe6f5dcfddbfc6b76b"><divclass="ttname"><ahref="a00771.html#ga321953c1b2e7befe6f5dcfddbfc6b76b">glm::extractRealComponent</a></div><divclass="ttdeci">GLM_FUNC_DECL T extractRealComponent(qua< T, Q > const &q)</div><divclass="ttdoc">Extract the real component of a quaternion. </div></div>
<divclass="ttc"id="a00666_html_ga1108a4ab88ca87bac321454eea7702f8"><divclass="ttname"><ahref="a00666.html#ga1108a4ab88ca87bac321454eea7702f8">glm::quat_cast</a></div><divclass="ttdeci">GLM_FUNC_DECL qua< T, Q > quat_cast(mat< 3, 3, T, Q > const &x)</div><divclass="ttdoc">Converts a pure rotation 3 * 3 matrix to a quaternion. </div></div>
<divclass="ttc"id="a00771_html_ga0b9bf3459e132ad8a18fe970669e3e35"><divclass="ttname"><ahref="a00771.html#ga0b9bf3459e132ad8a18fe970669e3e35">glm::squad</a></div><divclass="ttdeci">GLM_FUNC_DECL qua< T, Q > squad(qua< T, Q > const &q1, qua< T, Q > const &q2, qua< T, Q > const &s1, qua< T, Q > const &s2, T const &h)</div><divclass="ttdoc">Compute a point on a path according squad equation. </div></div>
<divclass="ttc"id="a00771_html_ga9f5f77255756e5668dfee7f0d07ed021"><divclass="ttname"><ahref="a00771.html#ga9f5f77255756e5668dfee7f0d07ed021">glm::cross</a></div><divclass="ttdeci">GLM_FUNC_DECL vec< 3, T, Q > cross(vec< 3, T, Q > const &v, qua< T, Q > const &q)</div><divclass="ttdoc">Compute a cross product between a vector and a quaternion. </div></div>
<divclass="ttc"id="a00771_html_ga5ee8332600b2aca3a77622a28d857b55"><divclass="ttname"><ahref="a00771.html#ga5ee8332600b2aca3a77622a28d857b55">glm::quat_identity</a></div><divclass="ttdeci">GLM_FUNC_DECL qua< T, Q > quat_identity()</div><divclass="ttdoc">Create an identity quaternion. </div></div>
<divclass="ttc"id="a00771_html_ga58a609b1b8ab965f5df2702e8ca4e75b"><divclass="ttname"><ahref="a00771.html#ga58a609b1b8ab965f5df2702e8ca4e75b">glm::length2</a></div><divclass="ttdeci">GLM_FUNC_DECL T length2(qua< T, Q > const &q)</div><divclass="ttdoc">Returns the squared length of x. </div></div>
<divclass="ttc"id="a00771_html_gafcb78dfff45fbf19a7fcb2bd03fbf196"><divclass="ttname"><ahref="a00771.html#gafcb78dfff45fbf19a7fcb2bd03fbf196">glm::rotate</a></div><divclass="ttdeci">GLM_FUNC_DECL vec< 4, T, Q > rotate(qua< T, Q > const &q, vec< 4, T, Q > const &v)</div><divclass="ttdoc">Rotates a 4 components vector by a quaternion. </div></div>
<divclass="ttc"id="a00771_html_gadc576cc957adc2a568cdcbc3799175bc"><divclass="ttname"><ahref="a00771.html#gadc576cc957adc2a568cdcbc3799175bc">glm::shortMix</a></div><divclass="ttdeci">GLM_FUNC_DECL qua< T, Q > shortMix(qua< T, Q > const &x, qua< T, Q > const &y, T const &a)</div><divclass="ttdoc">Quaternion interpolation using the rotation short path. </div></div>