Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-release > by-pkgid > 3d21bba46faba8ab8bc0569a35594b3e > files > 29

ocaml-gg-devel-0.8.0-6.mga6.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Gg.P3.html">
<link rel="next" href="Gg.M2.html">
<link rel="Up" href="Gg.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Gg" rel="Chapter" href="Gg.html"><link title="Constructors, accessors and constants" rel="Section" href="#cons">
<link title="Functions" rel="Section" href="#functions">
<link title="3D space transformations" rel="Section" href="#transformations3d">
<title>Gg.Quat</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Gg.P3.html" title="Gg.P3">Previous</a>
&nbsp;<a class="up" href="Gg.html" title="Gg">Up</a>
&nbsp;<a class="post" href="Gg.M2.html" title="Gg.M2">Next</a>
</div>
<h1>Module <a href="type_Gg.Quat.html">Gg.Quat</a></h1>
<pre><span class="keyword">module</span> Quat: <code class="code"><span class="keyword">sig</span></code> <a href="Gg.Quat.html">..</a> <code class="code"><span class="keyword">end</span></code></pre><hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> = <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a></code> </pre>
<div class="info">
The type for quaternions.<br>
</div>

<br>
<h1 id="cons">Constructors, accessors and constants</h1><br>
<pre><span id="VALv"><span class="keyword">val</span> v</span> : <code class="type">float -> float -> float -> float -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">v x y z w</code> is the quaternion <code class="code">x</code>i+ <code class="code">y</code>j + <code class="code">z</code>k + <code class="code">w</code>.<br>
</div>
<pre><span id="VALzero"><span class="keyword">val</span> zero</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">zero</code> is the zero quaternion.<br>
</div>
<pre><span id="VALid"><span class="keyword">val</span> id</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">id</code> is the identity quaternion <code class="code">1</code>.<br>
</div>
<br>
<h1 id="functions">Functions</h1><br>
<pre><span id="VALmul"><span class="keyword">val</span> mul</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">mul q r</code> is the quaternion multiplication <code class="code">q * r</code>.<br>
</div>
<pre><span id="VALconj"><span class="keyword">val</span> conj</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">conj q</code> is the 
      <a href="http://mathworld.wolfram.com/QuaternionConjugate.html">quaternion 
      conjugate</a> <code class="code">q*</code>.<br>
</div>
<pre><span id="VALunit"><span class="keyword">val</span> unit</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">unit q</code> is the unit vector <code class="code">q/|q<span class="keywordsign">|</span></code> (same as <a href="Gg.V4.html#VALunit"><code class="code"><span class="constructor">Gg</span>.<span class="constructor">V4</span>.unit</code></a>).<br>
</div>
<pre><span id="VALinv"><span class="keyword">val</span> inv</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">inv q</code> is the quaternion inverse <code class="code">q</code><sup class="superscript">-1</sup>.<br>
</div>
<pre><span id="VALslerp"><span class="keyword">val</span> slerp</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a> -> float -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">slerp q r t</code> is the spherical linear interpolation between <code class="code">q</code>
      and <code class="code">r</code> at <code class="code">t</code>. Non commutative, torque minimal and constant
      velocity.<br>
</div>
<pre><span id="VALsquad"><span class="keyword">val</span> squad</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a> -> float -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">squad q cq cr r t</code> is the spherical cubic interpolation
      between <code class="code">q</code> and <code class="code">r</code> at <code class="code">t</code>. <code class="code">cq</code> and <code class="code">cr</code> indicate the tangent
      orientations at <code class="code">q</code> and <code class="code">r</code>.<br>
</div>
<pre><span id="VALnlerp"><span class="keyword">val</span> nlerp</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a> -> float -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">nlerp q r t</code> is the normalized linear interpolation between <code class="code">q</code>
      and <code class="code">r</code> at <code class="code">t</code>.  Commutative, torque minimal and inconstant
      velocity.<br>
</div>
<br>
<h1 id="transformations3d">3D space transformations</h1><br>
<pre><span id="VALof_m3"><span class="keyword">val</span> of_m3</span> : <code class="type"><a href="Gg.html#TYPEm3">Gg.m3</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">of_m3 m</code> is the unit quaternion for the rotation in <code class="code">m</code>.<br>
</div>
<pre><span id="VALof_m4"><span class="keyword">val</span> of_m4</span> : <code class="type"><a href="Gg.html#TYPEm4">Gg.m4</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
<code class="code">of_m4 m</code> is the unit quaternion for the rotation in the 3x3
      top left matrix in <code class="code">m</code>.<br>
</div>
<pre><span id="VALrot_map"><span class="keyword">val</span> rot_map</span> : <code class="type"><a href="Gg.html#TYPEv3">Gg.v3</a> -> <a href="Gg.html#TYPEv3">Gg.v3</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
Unit quaternion for the rotation, see <a href="Gg.M3.html#VALrot_map"><code class="code"><span class="constructor">Gg</span>.<span class="constructor">M3</span>.rot_map</code></a>.<br>
</div>
<pre><span id="VALrot_axis"><span class="keyword">val</span> rot_axis</span> : <code class="type"><a href="Gg.html#TYPEv3">Gg.v3</a> -> float -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
Unit quaternion for the rotation, see <a href="Gg.M3.html#VALrot_axis"><code class="code"><span class="constructor">Gg</span>.<span class="constructor">M3</span>.rot_axis</code></a>.<br>
</div>
<pre><span id="VALrot_zyx"><span class="keyword">val</span> rot_zyx</span> : <code class="type"><a href="Gg.html#TYPEv3">Gg.v3</a> -> <a href="Gg.html#TYPEquat">Gg.quat</a></code></pre><div class="info">
Unit quaternion for the rotation, see <a href="Gg.M3.html#VALrot_zyx"><code class="code"><span class="constructor">Gg</span>.<span class="constructor">M3</span>.rot_zyx</code></a>.<br>
</div>
<pre><span id="VALto_rot_axis"><span class="keyword">val</span> to_rot_axis</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEv3">Gg.v3</a> * float</code></pre><div class="info">
<code class="code">to_rot_axis q</code> is the rotation axis and angle of the <em>unit</em> 
      quaternion <code class="code">q</code>.<br>
</div>
<pre><span id="VALto_rot_zyx"><span class="keyword">val</span> to_rot_zyx</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEv3">Gg.v3</a></code></pre><div class="info">
<code class="code">to_rot_zyx q</code> is the x, y, z axis angles of the <em>unit</em> 
      quaternion <code class="code">q</code>.<br>
</div>
<pre><span id="VALapply3"><span class="keyword">val</span> apply3</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEv3">Gg.v3</a> -> <a href="Gg.html#TYPEv3">Gg.v3</a></code></pre><div class="info">
<code class="code">apply3 q v</code> applies the 3D rotation of the <em>unit</em> quaternion
      <code class="code">q</code> to the vector (or point) <code class="code">v</code>.<br>
</div>
<pre><span id="VALapply4"><span class="keyword">val</span> apply4</span> : <code class="type"><a href="Gg.html#TYPEquat">Gg.quat</a> -> <a href="Gg.html#TYPEv4">Gg.v4</a> -> <a href="Gg.html#TYPEv4">Gg.v4</a></code></pre><div class="info">
<code class="code">apply4 q v</code> apply the 3D rotation of the <em>unit</em> quaternion
      <code class="code">q</code> to the homogenous vector (or point) <code class="code">v</code>.<br>
</div>
</body></html>