diff options
Diffstat (limited to '')
-rw-r--r-- | docs/doxygen/nel/a03297.html | 2331 |
1 files changed, 2331 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a03297.html b/docs/doxygen/nel/a03297.html new file mode 100644 index 00000000..d28e727e --- /dev/null +++ b/docs/doxygen/nel/a03297.html @@ -0,0 +1,2331 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> +<title>NeL: TemplateNLMISC::CQuatT< T > class Reference</title> +<link href="doxygen.css" rel="stylesheet" type="text/css"> +</head><body> +<!-- Generated by Doxygen 1.3.6 --> +<div class="qindex"> <form class="search" action="search.php" method="get"> +<a class="qindex" href="main.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">Data Structures</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">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a> | <span class="search"><u>S</u>earch for <input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div> +<h1>NLMISC::CQuatT< T > Class Template Reference</h1><code>#include <<a class="el" href="a06308.html">quat.h</a>></code> +<p> +<hr><a name="_details"></a><h2>Detailed Description</h2> +<h3>template<class T><br> + class NLMISC::CQuatT< T ></h3> + +A Template quaternion. Use <a class="el" href="a03296.html">CQuat</a> and <a class="el" href="a03298.html">CQuatD</a>. <dl compact><dt><b>Author:</b></dt><dd>Antoine Viau. <p> +Nevrax France </dd></dl> +<dl compact><dt><b>Date:</b></dt><dd>2000 </dd></dl> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00074">74</a> of file <a class="el" href="a06308.html">quat.h</a>.<table border=0 cellpadding=0 cellspacing=0> +<tr><td></td></tr> +<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> +<tr><td colspan="2"><div class="groupHeader">Basic Quaternions operations.</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2008_0">conjugate</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the conjugate of this quaternion. <a href="#NLMISC_1_1CQuatTz2008_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2008_1">invert</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Invert this quaternion. If normalized, conjugate is faster and does same thing. <a href="#NLMISC_1_1CQuatTz2008_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2008_2">inverted</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the quaternion inverted. <a href="#NLMISC_1_1CQuatTz2008_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2008_3">operator *</a> (const <a class="el" href="a03297.html">CQuatT</a> &) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Quaternion multiplication/composition. <a href="#NLMISC_1_1CQuatTz2008_3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2008_4">operator *=</a> (const <a class="el" href="a03297.html">CQuatT</a> &)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the conjugate of this quaternion. <a href="#NLMISC_1_1CQuatTz2008_4"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">Object</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2000_0">CQuatT</a> (const <a class="el" href="a02195.html">CAngleAxis</a> &aa)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">ctor of a UNIT quaternion, from an angle axis. <a href="#NLMISC_1_1CQuatTz2000_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2000_1">CQuatT</a> (const <a class="el" href="a03128.html">CVector</a> &axis, float angle)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">ctor of a UNIT quaternion, from an angle axis. <a href="#NLMISC_1_1CQuatTz2000_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2000_2">CQuatT</a> (T X, T Y, T Z, T W)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">ctor of a UNIT quaternion, from an angle axis. <a href="#NLMISC_1_1CQuatTz2000_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">ctor of a UNIT quaternion, from an angle axis. <a href="#NLMISC_1_1CQuatTz2000_3"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">Comparison</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2004_0">equal</a> (const <a class="el" href="a03297.html">CQuatT</a> &a, float epsilon=1E-6f) const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2004_1">identity</a> ()</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2004_2">isIdentity</a> () const </td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>bool </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2004_3">operator==</a> (const <a class="el" href="a03297.html">CQuatT</a> &a) const </td></tr> + +<tr><td colspan="2"><div class="groupHeader">Misc.</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2012_0">exp</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">compute quaternion exponent. <a href="#NLMISC_1_1CQuatTz2012_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2012_1">log</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">compute logn quaternion. <a href="#NLMISC_1_1CQuatTz2012_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2012_2">makeClosest</a> (const <a class="el" href="a03297.html">CQuatT</a> &o)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">ensure that *this and q are on same side of hypersphere, ie dotProduct(*this,q) is >0, modifying this if necessary. <a href="#NLMISC_1_1CQuatTz2012_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2012_3">serial</a> (<a class="el" href="a02270.html">IStream</a> &f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">serial. <a href="#NLMISC_1_1CQuatTz2012_3"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">To/From other orientation.</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>float </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2010_0">getAngle</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the equivalent angle of this quaternion. (in radian). <a href="#NLMISC_1_1CQuatTz2010_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a02195.html">CAngleAxis</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2010_1">getAngleAxis</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the equivalent Unit AngleAxis of this quaternion. <a href="#NLMISC_1_1CQuatTz2010_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03128.html">CVector</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2010_2">getAxis</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the equivalent Unit axis of this quaternion. <a href="#NLMISC_1_1CQuatTz2010_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2010_3">setAngleAxis</a> (const <a class="el" href="a02195.html">CAngleAxis</a> &angAxis)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Build a UNIT quaternion from an AngleAxis. <a href="#NLMISC_1_1CQuatTz2010_3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2010_4">setAngleAxis</a> (const <a class="el" href="a03128.html">CVector</a> &axis, float angle)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Build a UNIT quaternion from an AngleAxis. <a href="#NLMISC_1_1CQuatTz2010_4"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">4D vector operations.</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_0">norm</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_1">normalize</a> ()</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Normalize the quaternion. <a href="#NLMISC_1_1CQuatTz2006_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_2">normed</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the quaternion normalized. <a href="#NLMISC_1_1CQuatTz2006_2"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_3">operator *</a> (T f) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_3"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_4">operator *=</a> (T f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_4"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_5">operator+</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_5"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_6">operator+</a> (const <a class="el" href="a03297.html">CQuatT</a> &o) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_6"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_7">operator+=</a> (const <a class="el" href="a03297.html">CQuatT</a> &o)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_7"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_8">operator-</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_8"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_9">operator-</a> (const <a class="el" href="a03297.html">CQuatT</a> &o) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_9"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_10">operator-=</a> (const <a class="el" href="a03297.html">CQuatT</a> &o)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_10"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_11">operator/</a> (T f) const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_11"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_12">operator/=</a> (T f)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_12"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2006_13">sqrnorm</a> () const </td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">return the square of the norm of the 4D vector. <a href="#NLMISC_1_1CQuatTz2006_13"></a><br><br></td></tr> +<tr><td colspan="2"><div class="groupHeader">Sets.</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2002_0">set</a> (T X, T Y, T Z, T W)</td></tr> + +<tr><td colspan=2><br><h2>Static Public Member Functions</h2></td></tr> +<tr><td colspan="2"><div class="groupHeader">Quaternions static functions.</div></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2014_0">dotProduct</a> (const <a class="el" href="a03297.html">CQuatT</a>< T > &q0, const <a class="el" href="a03297.html">CQuatT</a>< T > &q1)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Return the dotProduct of 2 quaternions. <a href="#NLMISC_1_1CQuatTz2014_0"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2014_1">lnDif</a> (const <a class="el" href="a03297.html">CQuatT</a> &q0, const <a class="el" href="a03297.html">CQuatT</a> &q1)</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">compute lnDiff of q0.inverted()*q1. <a href="#NLMISC_1_1CQuatTz2014_1"></a><br><br></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2014_2">slerp</a> (const <a class="el" href="a03297.html">CQuatT</a>< T > &q0, const <a class="el" href="a03297.html">CQuatT</a>< T > &q1, float <a class="el" href="a04223.html#a627">t</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2014_3">squad</a> (const <a class="el" href="a03297.html">CQuatT</a>< T > &q0, const <a class="el" href="a03297.html">CQuatT</a>< T > &tgtQ0, const <a class="el" href="a03297.html">CQuatT</a>< T > &tgtQ1, const <a class="el" href="a03297.html">CQuatT</a>< T > &q1, float <a class="el" href="a04223.html#a627">t</a>)</td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a03297.html">CQuatT</a> </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTz2014_4">squadrev</a> (const <a class="el" href="a02195.html">CAngleAxis</a> &rot, const <a class="el" href="a03297.html">CQuatT</a>< T > &q0, const <a class="el" href="a03297.html">CQuatT</a>< T > &tgtQ0, const <a class="el" href="a03297.html">CQuatT</a>< T > &tgtQ1, const <a class="el" href="a03297.html">CQuatT</a>< T > &q1, float <a class="el" href="a04223.html#a627">t</a>)</td></tr> + +<tr><td colspan=2><br><h2>Data Fields</h2></td></tr> +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTo0">w</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTo1">x</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTo2">y</a></td></tr> + +<tr><td class="memItemLeft" nowrap align=right valign=top>T </td><td class="memItemRight" valign=bottom><a class="el" href="a03297.html#NLMISC_1_1CQuatTo3">z</a></td></tr> + +</table> +<hr><h2>Constructor & Destructor Documentation</h2> +<a class="anchor" name="NLMISC_1_1CQuatTz2000_3" doxytag="NLMISC::CQuatT::CQuatT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a03297.html">CQuatT</a> </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ctor of a UNIT quaternion, from an angle axis. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00084">84</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00139">NLMISC::CQuatT< float >::conjugate()</a>, <a class="el" href="a06308.html#l00114">NLMISC::CQuatT< float >::operator *()</a>, <a class="el" href="a06308.html#l00112">NLMISC::CQuatT< float >::operator+()</a>, <a class="el" href="a06308.html#l00113">NLMISC::CQuatT< float >::operator-()</a>, and <a class="el" href="a06308.html#l00115">NLMISC::CQuatT< float >::operator/()</a>. +<p> +<div class="fragment"><pre>00084 : <a class="code" href="a03297.html#NLMISC_1_1CQuatTo1">x</a>((T)0.0),<a class="code" href="a03297.html#NLMISC_1_1CQuatTo2">y</a>((T)0.0),<a class="code" href="a03297.html#NLMISC_1_1CQuatTo3">z</a>((T)0.0),<a class="code" href="a03297.html#NLMISC_1_1CQuatTo0">w</a>((T)1.0) {} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2000_2" doxytag="NLMISC::CQuatT::CQuatT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a03297.html">CQuatT</a> </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">T </td> + <td class="mdname" nowrap> <em>X</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>T </td> + <td class="mdname" nowrap> <em>Y</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>T </td> + <td class="mdname" nowrap> <em>Z</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>T </td> + <td class="mdname" nowrap> <em>W</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ctor of a UNIT quaternion, from an angle axis. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00085">85</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00085 : <a class="code" href="a03297.html#NLMISC_1_1CQuatTo1">x</a>(X), <a class="code" href="a03297.html#NLMISC_1_1CQuatTo2">y</a>(Y), <a class="code" href="a03297.html#NLMISC_1_1CQuatTo3">z</a>(Z), <a class="code" href="a03297.html#NLMISC_1_1CQuatTo0">w</a>(W) {} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2000_1" doxytag="NLMISC::CQuatT::CQuatT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a03297.html">CQuatT</a> </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>axis</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>angle</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ctor of a UNIT quaternion, from an angle axis. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00087">87</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00087 {<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2010_4">setAngleAxis</a>(axis, angle);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2000_0" doxytag="NLMISC::CQuatT::CQuatT" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a03297.html">CQuatT</a> </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02195.html">CAngleAxis</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>aa</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ctor of a UNIT quaternion, from an angle axis. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00089">89</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00089 {<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2010_4">setAngleAxis</a>(aa);} +</pre></div> </td> + </tr> +</table> +<hr><h2>Member Function Documentation</h2> +<a class="anchor" name="NLMISC_1_1CQuatTz2008_0" doxytag="NLMISC::CQuatT::conjugate" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::conjugate </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the conjugate of this quaternion. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00139">139</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00265">NLMISC::CQuatT< T >::invert()</a>. +<p> +<div class="fragment"><pre>00139 {<span class="keywordflow">return</span> <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a>(-<a class="code" href="a04223.html#a572">x</a>, -<a class="code" href="a04223.html#a573">y</a>, -<a class="code" href="a04223.html#a574">z</a>, <a class="code" href="a04223.html#a575">w</a>);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2014_0" doxytag="NLMISC::CQuatT::dotProduct" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::dotProduct </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q1</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the dotProduct of 2 quaternions. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00309">309</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::w</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::x</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::y</a>, and <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::z</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00473">NLMISC::CQuatT< T >::makeClosest()</a>. +<p> +<div class="fragment"><pre>00310 { +00311 <span class="keywordflow">return</span> q0.x*q1.x + q0.y*q1.y + q0.z*q1.z + q0.w*q1.w; +00312 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2004_0" doxytag="NLMISC::CQuatT::equal" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::equal </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>a</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>epsilon</em> = 1E-6f</td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00227">227</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::w</a>, <a class="el" href="a05646.html#l00236">w</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::x</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::y</a>, <a class="el" href="a05646.html#l00236">y</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::z</a>, and <a class="el" href="a05646.html#l00236">z</a>. +<p> +<div class="fragment"><pre>00228 { +00229 <span class="keywordflow">if</span> (fabs(<a class="code" href="a04223.html#a572">x</a>-a.x)<epsilon && +00230 fabs(<a class="code" href="a04223.html#a573">y</a>-a.y)<epsilon && +00231 fabs(<a class="code" href="a04223.html#a574">z</a>-a.z)<epsilon && +00232 fabs(<a class="code" href="a04223.html#a575">w</a>-a.w)<epsilon ) +00233 { +00234 <span class="keywordflow">return</span> <span class="keyword">true</span>; +00235 } +00236 <span class="keywordflow">return</span> <span class="keyword">false</span>; +00237 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2012_0" doxytag="NLMISC::CQuatT::exp" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::exp </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +compute quaternion exponent. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00445">445</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a05646.html#l00235">len</a>, <a class="el" href="a06308.html#l00039">NLMISC::QuatEpsilon</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a05646.html#l00236">z</a>. +<p> +<div class="fragment"><pre>00446 { +00447 <span class="keywordtype">double</span> <a class="code" href="a04223.html#a571">len</a>; +00448 <a class="code" href="a04223.html#a571">len</a> = sqrt (<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a572">x</a> + <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a573">y</a> + <a class="code" href="a04223.html#a574">z</a>*<a class="code" href="a04223.html#a574">z</a>); +00449 +00450 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a571">len</a> < <a class="code" href="a05378.html#a227">QuatEpsilon</a>) +00451 <span class="keywordflow">return</span> CQuatT<T>(0.f, 0.f, 0.f, 1.f); +00452 <span class="keywordflow">else</span> +00453 { +00454 <span class="keywordtype">double</span> len1 = sin(len) / <a class="code" href="a04223.html#a571">len</a>; +00455 <span class="keywordflow">return</span> CQuatT<T>( (T)(<a class="code" href="a04223.html#a572">x</a>*len1), (T)(<a class="code" href="a04223.html#a573">y</a>*len1), (T)(<a class="code" href="a04223.html#a574">z</a>*len1), (T)cos(len)); +00456 } +00457 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2010_0" doxytag="NLMISC::CQuatT::getAngle" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> float <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::getAngle </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the equivalent angle of this quaternion. (in radian). +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00148">148</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00150">NLMISC::CQuatT< float >::getAngleAxis()</a>. +<p> +<div class="fragment"><pre>00148 {<span class="keywordflow">return</span> (<span class="keywordtype">float</span>)(2*acos(<a class="code" href="a04223.html#a575">w</a>/<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2006_0">norm</a>()));} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2010_1" doxytag="NLMISC::CQuatT::getAngleAxis" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a02195.html">CAngleAxis</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::getAngleAxis </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the equivalent Unit AngleAxis of this quaternion. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00150">150</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00150 {<span class="keywordflow">return</span> CAngleAxis(<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2010_2">getAxis</a>(), <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2010_0">getAngle</a>());} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2010_2" doxytag="NLMISC::CQuatT::getAxis" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03128.html">CVector</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::getAxis </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">void </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the equivalent Unit axis of this quaternion. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00146">146</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00150">NLMISC::CQuatT< float >::getAngleAxis()</a>. +<p> +<div class="fragment"><pre>00146 {CVector ret((<span class="keywordtype">float</span>)<a class="code" href="a04223.html#a572">x</a>,(<span class="keywordtype">float</span>)<a class="code" href="a04223.html#a573">y</a>,(<span class="keywordtype">float</span>)<a class="code" href="a04223.html#a574">z</a>); <span class="keywordflow">return</span> ret.normed();} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2004_1" doxytag="NLMISC::CQuatT::identity" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::identity </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00102">102</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00280">NLMISC::CQuatT< T >::normalize()</a>. +<p> +<div class="fragment"><pre>00102 {<a class="code" href="a04223.html#a572">x</a> = <a class="code" href="a04223.html#a573">y</a> = <a class="code" href="a04223.html#a574">z</a> = 0.0f ; <a class="code" href="a04223.html#a575">w</a> = 1.0f; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2008_1" doxytag="NLMISC::CQuatT::invert" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::invert </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Invert this quaternion. If normalized, conjugate is faster and does same thing. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00265">265</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00139">NLMISC::CQuatT< T >::conjugate()</a>, and <a class="el" href="a06308.html#l00119">NLMISC::CQuatT< T >::sqrnorm()</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00137">NLMISC::CQuatT< float >::inverted()</a>. +<p> +<div class="fragment"><pre>00266 { +00267 <span class="comment">// Must invert the norm.</span> +00268 T f= <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2006_13">sqrnorm</a>(); +00269 <span class="keywordflow">if</span>(f!=0) +00270 { +00271 *<span class="keyword">this</span>/=f; +00272 } +00273 +00274 *<span class="keyword">this</span>= <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2008_0">conjugate</a>(); +00275 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2008_2" doxytag="NLMISC::CQuatT::inverted" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::inverted </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the quaternion inverted. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00137">137</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00462">NLMISC::CQuatT< T >::lnDif()</a>. +<p> +<div class="fragment"><pre>00137 {<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a> ret= *<span class="keyword">this</span>; ret.invert(); <span class="keywordflow">return</span> ret;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2004_2" doxytag="NLMISC::CQuatT::isIdentity" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::isIdentity </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00103">103</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00103 {<span class="keywordflow">return</span> (<a class="code" href="a04223.html#a572">x</a>==0.0f && <a class="code" href="a04223.html#a573">y</a>==0.0f && <a class="code" href="a04223.html#a574">z</a>==0.0f && <a class="code" href="a04223.html#a575">w</a>==1.0f);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2014_1" doxytag="NLMISC::CQuatT::lnDif" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::lnDif </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q1</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +compute lnDiff of q0.inverted()*q1. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00462">462</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00137">NLMISC::CQuatT< T >::inverted()</a>, <a class="el" href="a06308.html#l00427">NLMISC::CQuatT< T >::log()</a>, and <a class="el" href="a06308.html#l00280">NLMISC::CQuatT< T >::normalize()</a>. +<p> +<div class="fragment"><pre>00463 { +00464 CQuatT<T> dif = q0.inverted()*q1; +00465 dif.normalize(); +00466 +00467 <span class="keywordflow">return</span> dif.log(); +00468 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2012_1" doxytag="NLMISC::CQuatT::log" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::log </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +compute logn quaternion. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00427">427</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a05646.html#l00235">len</a>, <a class="el" href="a06308.html#l00039">NLMISC::QuatEpsilon</a>, <a class="el" href="a05646.html#l00236">w</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a05646.html#l00236">z</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00462">NLMISC::CQuatT< T >::lnDif()</a>. +<p> +<div class="fragment"><pre>00428 { +00429 <span class="keywordtype">double</span> <a class="code" href="a04223.html#a571">len</a>; +00430 <a class="code" href="a04223.html#a571">len</a> = sqrt (<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a572">x</a> + <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a573">y</a> + <a class="code" href="a04223.html#a574">z</a>*<a class="code" href="a04223.html#a574">z</a>); +00431 +00432 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a571">len</a> < <a class="code" href="a05378.html#a227">QuatEpsilon</a>) +00433 <span class="keywordflow">return</span> CQuatT<T>(0.f, 0.f, 0.f, 0.f); +00434 <span class="keywordflow">else</span> +00435 { +00436 <span class="keywordtype">double</span> div = (<span class="keywordtype">float</span>) acos (<a class="code" href="a04223.html#a575">w</a>) / <a class="code" href="a04223.html#a571">len</a>; +00437 <span class="keywordflow">return</span> CQuatT<T>( (T)(<a class="code" href="a04223.html#a572">x</a>*div), (T)(<a class="code" href="a04223.html#a573">y</a>*div), (T)(<a class="code" href="a04223.html#a574">z</a>*div), 0.f); +00438 } +00439 +00440 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2012_2" doxytag="NLMISC::CQuatT::makeClosest" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::makeClosest </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> <em>o</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +ensure that *this and q are on same side of hypersphere, ie dotProduct(*this,q) is >0, modifying this if necessary. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00473">473</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00309">NLMISC::CQuatT< T >::dotProduct()</a>. +<p> +<div class="fragment"><pre>00474 { +00475 <span class="keywordflow">if</span>( <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2014_0">dotProduct</a>(*<span class="keyword">this</span>, o) < 0 ) +00476 *<span class="keyword">this</span>= -(*this); +00477 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_0" doxytag="NLMISC::CQuatT::norm" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::norm </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00121">121</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00148">NLMISC::CQuatT< float >::getAngle()</a>, and <a class="el" href="a06308.html#l00280">NLMISC::CQuatT< T >::normalize()</a>. +<p> +<div class="fragment"><pre>00121 {<span class="keywordflow">return</span> (T)sqrt(<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2006_13">sqrnorm</a>());} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_1" doxytag="NLMISC::CQuatT::normalize" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::normalize </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Normalize the quaternion. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00280">280</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00102">NLMISC::CQuatT< T >::identity()</a>, and <a class="el" href="a06308.html#l00121">NLMISC::CQuatT< T >::norm()</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00462">NLMISC::CQuatT< T >::lnDif()</a>, and <a class="el" href="a06308.html#l00125">NLMISC::CQuatT< float >::normed()</a>. +<p> +<div class="fragment"><pre>00281 { +00282 T f= <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2006_0">norm</a>(); +00283 <span class="keywordflow">if</span>(f==0) +00284 <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2004_1">identity</a>(); +00285 <span class="keywordflow">else</span> +00286 { +00287 *<span class="keyword">this</span>/=f; +00288 } +00289 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_2" doxytag="NLMISC::CQuatT::normed" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::normed </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Return the quaternion normalized. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00125">125</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00125 {<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a> ret= *<span class="keyword">this</span>; ret.normalize(); <span class="keywordflow">return</span> ret;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2008_3" doxytag="NLMISC::CQuatT::operator *" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator * </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Quaternion multiplication/composition. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00242">242</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::w</a>, <a class="el" href="a05646.html#l00236">w</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::x</a>, <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::y</a>, <a class="el" href="a05646.html#l00236">y</a>, <a class="el" href="a05646.html#l00236">z</a>, and <a class="el" href="a06308.html#l00077">NLMISC::CQuatT< T >::z</a>. +<p> +<div class="fragment"><pre>00243 { +00244 <span class="comment">// wres= ww´ - v·v´</span> +00245 <span class="comment">// vres= wv´ + w´v + v^v´ ] </span> +00246 <span class="keywordflow">return</span> CQuatT<T>( +00247 (<a class="code" href="a04223.html#a575">w</a>*o.x) +(<a class="code" href="a04223.html#a572">x</a>*o.w) + (<a class="code" href="a04223.html#a573">y</a>*o.z)-(<a class="code" href="a04223.html#a574">z</a>*o.y), +00248 (<a class="code" href="a04223.html#a575">w</a>*o.y) +(<a class="code" href="a04223.html#a573">y</a>*o.w) + (<a class="code" href="a04223.html#a574">z</a>*o.x)-(<a class="code" href="a04223.html#a572">x</a>*o.z), +00249 (<a class="code" href="a04223.html#a575">w</a>*o.z) +(<a class="code" href="a04223.html#a574">z</a>*o.w) + (<a class="code" href="a04223.html#a572">x</a>*o.y)-(<a class="code" href="a04223.html#a573">y</a>*o.x), +00250 (<a class="code" href="a04223.html#a575">w</a>*o.w)-(<a class="code" href="a04223.html#a572">x</a>*o.x)-(<a class="code" href="a04223.html#a573">y</a>*o.y)-(<a class="code" href="a04223.html#a574">z</a>*o.z) ); +00251 +00252 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_3" doxytag="NLMISC::CQuatT::operator *" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator * </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">T </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00114">114</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00114 {<span class="keywordflow">return</span> <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a>(<a class="code" href="a04223.html#a572">x</a>*f,<a class="code" href="a04223.html#a573">y</a>*f,<a class="code" href="a04223.html#a574">z</a>*f,<a class="code" href="a04223.html#a575">w</a>*f);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2008_4" doxytag="NLMISC::CQuatT::operator *=" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > & <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator *= </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the conjugate of this quaternion. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00256">256</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00257 { +00258 *<span class="keyword">this</span>= *<span class="keyword">this</span> * o; +00259 <span class="keywordflow">return</span> *<span class="keyword">this</span>; +00260 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_4" doxytag="NLMISC::CQuatT::operator *=" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>& <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator *= </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">T </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00110">110</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00110 {<a class="code" href="a04223.html#a572">x</a>*=f;<a class="code" href="a04223.html#a573">y</a>*=f;<a class="code" href="a04223.html#a574">z</a>*=f;<a class="code" href="a04223.html#a575">w</a>*=f; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_5" doxytag="NLMISC::CQuatT::operator+" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator+ </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00117">117</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00117 {<span class="keywordflow">return</span> *<span class="keyword">this</span>; } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_6" doxytag="NLMISC::CQuatT::operator+" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator+ </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> <em>o</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00112">112</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00112 {<span class="keywordflow">return</span> <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a>(<a class="code" href="a04223.html#a572">x</a>+o.x,<a class="code" href="a04223.html#a573">y</a>+o.y,<a class="code" href="a04223.html#a574">z</a>+o.z,<a class="code" href="a04223.html#a575">w</a>+o.w);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_7" doxytag="NLMISC::CQuatT::operator+=" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>& <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator+= </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> <em>o</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00108">108</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00108 {<a class="code" href="a04223.html#a572">x</a>+=o.x; <a class="code" href="a04223.html#a573">y</a>+=o.y; <a class="code" href="a04223.html#a574">z</a>+=o.z; <a class="code" href="a04223.html#a575">w</a>+=o.w; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_8" doxytag="NLMISC::CQuatT::operator-" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator- </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00116">116</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00116 {<span class="keywordflow">return</span>(<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a>(-<a class="code" href="a04223.html#a572">x</a>,-<a class="code" href="a04223.html#a573">y</a>,-<a class="code" href="a04223.html#a574">z</a>,-<a class="code" href="a04223.html#a575">w</a>)); } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_9" doxytag="NLMISC::CQuatT::operator-" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator- </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> <em>o</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00113">113</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00113 {<span class="keywordflow">return</span> <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a>(<a class="code" href="a04223.html#a572">x</a>-o.x,<a class="code" href="a04223.html#a573">y</a>-o.y,<a class="code" href="a04223.html#a574">z</a>-o.z,<a class="code" href="a04223.html#a575">w</a>-o.w);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_10" doxytag="NLMISC::CQuatT::operator-=" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>& <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator-= </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> <em>o</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00109">109</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00109 {<a class="code" href="a04223.html#a572">x</a>-=o.x; <a class="code" href="a04223.html#a573">y</a>-=o.y; <a class="code" href="a04223.html#a574">z</a>-=o.z; <a class="code" href="a04223.html#a575">w</a>-=o.w; <span class="keywordflow">return</span> *<span class="keyword">this</span>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_11" doxytag="NLMISC::CQuatT::operator/" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a> <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator/ </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">T </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00115">115</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00115 {<span class="keywordtype">double</span> oof= 1.0/f; <span class="keywordflow">return</span> <a class="code" href="a03297.html#NLMISC_1_1CQuatTz2000_3">CQuatT</a>(<a class="code" href="a04223.html#a572">x</a>*oof,<a class="code" href="a04223.html#a573">y</a>*oof,<a class="code" href="a04223.html#a574">z</a>*oof,<a class="code" href="a04223.html#a575">w</a>*oof);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_12" doxytag="NLMISC::CQuatT::operator/=" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>& <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator/= </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">T </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00111">111</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00111 {<span class="keywordtype">double</span> oof= 1.0/f; <a class="code" href="a04223.html#a572">x</a>=(T)(<a class="code" href="a04223.html#a572">x</a>*oof); <a class="code" href="a04223.html#a573">y</a>=(T)(<a class="code" href="a04223.html#a573">y</a>*oof); <a class="code" href="a04223.html#a574">z</a>= (T)(<a class="code" href="a04223.html#a574">z</a>*oof); <a class="code" href="a04223.html#a575">w</a>=(T)(<a class="code" href="a04223.html#a575">w</a>*oof); <span class="keywordflow">return</span> *<span class="keyword">this</span>;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2004_3" doxytag="NLMISC::CQuatT::operator==" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> bool <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::operator== </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname1" valign="top" nowrap> <em>a</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00100">100</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00100 {<span class="keywordflow">return</span> (<a class="code" href="a04223.html#a572">x</a>==a.x && <a class="code" href="a04223.html#a573">y</a>==a.y && <a class="code" href="a04223.html#a574">z</a>==a.z && <a class="code" href="a04223.html#a575">w</a>==a.w);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2012_3" doxytag="NLMISC::CQuatT::serial" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::serial </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top"><a class="el" href="a02270.html">IStream</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>f</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +serial. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00168">168</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00169 { +00170 f.serial(<a class="code" href="a04223.html#a572">x</a>,<a class="code" href="a04223.html#a573">y</a>,<a class="code" href="a04223.html#a574">z</a>,<a class="code" href="a04223.html#a575">w</a>); +00171 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2002_0" doxytag="NLMISC::CQuatT::set" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::set </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">T </td> + <td class="mdname" nowrap> <em>X</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>T </td> + <td class="mdname" nowrap> <em>Y</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>T </td> + <td class="mdname" nowrap> <em>Z</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>T </td> + <td class="mdname" nowrap> <em>W</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00095">95</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00366">NLMISC::CQuatT< T >::squadrev()</a>. +<p> +<div class="fragment"><pre>00095 {<a class="code" href="a04223.html#a572">x</a>= X; <a class="code" href="a04223.html#a573">y</a>= Y; <a class="code" href="a04223.html#a574">z</a>= Z; <a class="code" href="a04223.html#a575">w</a>= W;} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2010_3" doxytag="NLMISC::CQuatT::setAngleAxis" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::setAngleAxis </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02195.html">CAngleAxis</a> & </td> + <td class="mdname1" valign="top" nowrap> <em>angAxis</em> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Build a UNIT quaternion from an AngleAxis. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00155">155</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +<div class="fragment"><pre>00155 {<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2010_4">setAngleAxis</a>(angAxis.Axis, angAxis.Angle);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2010_4" doxytag="NLMISC::CQuatT::setAngleAxis" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> void <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::setAngleAxis </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03128.html">CVector</a> & </td> + <td class="mdname" nowrap> <em>axis</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>angle</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Build a UNIT quaternion from an AngleAxis. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00294">294</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a05646.html#l00236">w</a>, <a class="el" href="a05646.html#l00236">x</a>, <a class="el" href="a05646.html#l00236">y</a>, and <a class="el" href="a05646.html#l00236">z</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00087">NLMISC::CQuatT< float >::CQuatT()</a>, and <a class="el" href="a06308.html#l00155">NLMISC::CQuatT< float >::setAngleAxis()</a>. +<p> +<div class="fragment"><pre>00295 { +00296 CVector <a class="code" href="a04223.html#a576">v</a>= axis; +00297 <a class="code" href="a04223.html#a576">v</a>.normalize(); +00298 <span class="keywordtype">double</span> ca= cos(angle/2); +00299 <span class="keywordtype">double</span> sa= sin(angle/2); +00300 <a class="code" href="a04223.html#a572">x</a>= (T)(<a class="code" href="a04223.html#a576">v</a>.x*sa); +00301 <a class="code" href="a04223.html#a573">y</a>= (T)(<a class="code" href="a04223.html#a576">v</a>.y*sa); +00302 <a class="code" href="a04223.html#a574">z</a>= (T)(<a class="code" href="a04223.html#a576">v</a>.z*sa); +00303 <a class="code" href="a04223.html#a575">w</a>= (T)(ca); +00304 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2014_2" doxytag="NLMISC::CQuatT::slerp" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::slerp </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>t</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Quaternion spherical linear interpolation. when t==0, ret==q0, when t==1, ret==q1. No hemisphere correction is made. +<p> +Definition at line <a class="el" href="a06308.html#l00317">317</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a05646.html#l00985">t</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00355">NLMISC::CQuatT< T >::squad()</a>. +<p> +<div class="fragment"><pre>00318 { +00319 <span class="comment">// omega is the 4D angle between q0 and q1.</span> +00320 <span class="keywordtype">double</span> omega, cosom,sinom; +00321 T factq0= 1; +00322 T s0,s1; +00323 +00324 cosom = CQuatT<T>::dotProduct(q0, q1); +00325 +00326 <span class="comment">// Make q0 and q1 on the same hemisphere.</span> +00327 <span class="comment">/*if(cosom<0)</span> +00328 <span class="comment"> {</span> +00329 <span class="comment"> cosom= -cosom;</span> +00330 <span class="comment"> factq0= -1;</span> +00331 <span class="comment"> }*/</span> +00332 <span class="comment">// ????</span> +00333 +00334 <span class="keywordflow">if</span> ( cosom < 1.0 - NLMISC::QuatEpsilon) +00335 { +00336 omega = acos(cosom); +00337 sinom = sin(omega); +00338 s0 = (T) (sin((1.0f - t)*omega) / sinom); +00339 s1 = (T) (sin(t*omega) / sinom); +00340 } +00341 <span class="keywordflow">else</span> +00342 { <span class="comment">// q0 and q1 are nearly the same => sinom nearly 0. We can't slerp.</span> +00343 <span class="comment">// just linear interpolate.</span> +00344 s0 = (T)(1.0 - <a class="code" href="a04223.html#a627">t</a>); +00345 s1 = <a class="code" href="a04223.html#a627">t</a>; +00346 } +00347 +00348 <span class="keywordflow">return</span> q0*(factq0*s0) + q1*s1; +00349 +00350 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2006_13" doxytag="NLMISC::CQuatT::sqrnorm" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::sqrnorm </td> + <td class="md" valign="top">( </td> + <td class="mdname1" valign="top" nowrap> </td> + <td class="md" valign="top"> ) </td> + <td class="md" nowrap> const<code> [inline]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +return the square of the norm of the 4D vector. +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00119">119</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00265">NLMISC::CQuatT< T >::invert()</a>, and <a class="el" href="a06308.html#l00121">NLMISC::CQuatT< float >::norm()</a>. +<p> +<div class="fragment"><pre>00119 {<span class="keywordflow">return</span> (<a class="code" href="a04223.html#a572">x</a>*<a class="code" href="a04223.html#a572">x</a> + <a class="code" href="a04223.html#a573">y</a>*<a class="code" href="a04223.html#a573">y</a> + <a class="code" href="a04223.html#a574">z</a>*<a class="code" href="a04223.html#a574">z</a> + <a class="code" href="a04223.html#a575">w</a>*<a class="code" href="a04223.html#a575">w</a>);} +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2014_3" doxytag="NLMISC::CQuatT::squad" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::squad </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>tgtQ0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>tgtQ1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>t</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Quaternion Quadratic spherical linear interpolation. when t==0, ret==q0, when t==1, ret==q1. No hemisphere correction is made. +<p> +Definition at line <a class="el" href="a06308.html#l00355">355</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00317">NLMISC::CQuatT< T >::slerp()</a>, and <a class="el" href="a05646.html#l00985">t</a>. +<p> +<div class="fragment"><pre>00356 { +00357 <span class="keywordflow">return</span> CQuatT<T>::slerp( +00358 CQuatT<T>::<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2014_2">slerp</a>(q0, q1, t), +00359 CQuatT<T>::<a class="code" href="a03297.html#NLMISC_1_1CQuatTz2014_2">slerp</a>(tgtQ0, tgtQ1, t), +00360 2.f*(1.f-t)*t); +00361 } +</pre></div> </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTz2014_4" doxytag="NLMISC::CQuatT::squadrev" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> <a class="el" href="a03297.html">CQuatT</a>< T > <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::squadrev </td> + <td class="md" valign="top">( </td> + <td class="md" nowrap valign="top">const <a class="el" href="a02195.html">CAngleAxis</a> & </td> + <td class="mdname" nowrap> <em>rot</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>tgtQ0</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>tgtQ1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>const <a class="el" href="a03297.html">CQuatT</a>< T > & </td> + <td class="mdname" nowrap> <em>q1</em>, </td> + </tr> + <tr> + <td class="md" nowrap align="right"></td> + <td></td> + <td class="md" nowrap>float </td> + <td class="mdname" nowrap> <em>t</em></td> + </tr> + <tr> + <td></td> + <td class="md">) </td> + <td class="md" colspan="2"><code> [static]</code></td> + </tr> + + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> +Quaternion Quadratic spherical linear interpolation, with multi revision support. +<p> +Definition at line <a class="el" href="a06308.html#l00366">366</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +References <a class="el" href="a06308.html#l00053">NLMISC::CAngleAxis::Angle</a>, <a class="el" href="a06308.html#l00052">NLMISC::CAngleAxis::Axis</a>, <a class="el" href="a05587.html#l00079">NLMISC::Pi</a>, <a class="el" href="a06308.html#l00039">NLMISC::QuatEpsilon</a>, <a class="el" href="a05646.html#l00977">s</a>, <a class="el" href="a06308.html#l00095">NLMISC::CQuatT< T >::set()</a>, <a class="el" href="a05646.html#l00985">t</a>, <a class="el" href="a05646.html#l00237">v</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::x</a>, <a class="el" href="a06673.html#l00051">NLMISC::CVector::y</a>, and <a class="el" href="a06673.html#l00051">NLMISC::CVector::z</a>. +<p> +<div class="fragment"><pre>00367 { +00368 <span class="keywordtype">float</span> <a class="code" href="a04223.html#a626">s</a>,<a class="code" href="a04223.html#a576">v</a>; +00369 <span class="keywordtype">float</span> omega = rot.Angle* 0.5f; +00370 <span class="keywordtype">float</span> nrevs = 0.0f; +00371 CQuatT<T> ret,qaxis,pp,qq; +00372 +00373 <span class="comment">// just one rev?</span> +00374 <span class="comment">//==============</span> +00375 <span class="keywordflow">if</span> (omega<<a class="code" href="a05378.html#a44">Pi</a>-<a class="code" href="a05378.html#a227">QuatEpsilon</a>) +00376 { +00377 ret = CQuatT<T>::squad(q0,tgtQ0,tgtQ1,q1,t); +00378 <span class="keywordflow">return</span> ret; +00379 } +00380 +00381 +00382 <span class="comment">// multirev.</span> +00383 <span class="comment">//==============</span> +00384 +00385 <span class="comment">// rotation of 180deg around rot.Axis. (=> sin(a/2)==sin(Pi/2)==1, and c(a/2)=0).</span> +00386 qaxis.set(rot.Axis.x, rot.Axis.y, rot.Axis.z, 0); +00387 +00388 <span class="comment">// the number of revisions (float!)</span> +00389 nrevs= (<span class="keywordtype">float</span>)(omega/<a class="code" href="a05378.html#a44">Pi</a>); +00390 <span class="comment">// Angle>2Pi. squad from 0 to Pi, slerp from Pi to Angle-Pi, squad from Angle-Pi to Angle.</span> +00391 <a class="code" href="a04223.html#a626">s</a> = <a class="code" href="a04223.html#a627">t</a>*2*nrevs; +00392 +00393 +00394 <span class="comment">// So for s, squad from 0 to 1, slerp from 1 to 2*nrevs-1, squad from 2*nrevs-1 to 2*nrevs.</span> +00395 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a626">s</a> < 1.0f) +00396 { +00397 <span class="comment">// first part.</span> +00398 pp = q0*qaxis; +00399 ret = CQuatT<T>::squad(q0,tgtQ0,pp,pp,s); +00400 } +00401 <span class="keywordflow">else</span> +00402 { +00403 <a class="code" href="a04223.html#a576">v</a> = <a class="code" href="a04223.html#a626">s</a> - (2.0f*nrevs - 1.0f); +00404 <span class="keywordflow">if</span>( <a class="code" href="a04223.html#a576">v</a> <= 0.0f) +00405 { +00406 <span class="comment">// middle part</span> +00407 <span class="keywordflow">while</span> (<a class="code" href="a04223.html#a626">s</a> >= 2.0f) <a class="code" href="a04223.html#a626">s</a> -= 2.0f; +00408 pp = q0*qaxis; +00409 <span class="comment">// s vary from 1 to 2. This is still correct for slerp().</span> +00410 ret = CQuatT<T>::slerp(q0,pp,s); +00411 } +00412 <span class="keywordflow">else</span> +00413 { +00414 <span class="comment">// Last part.</span> +00415 qq = - q1*qaxis; +00416 ret= CQuatT<T>::squad(qq,qq,tgtQ1,q1,v); +00417 } +00418 } +00419 +00420 <span class="keywordflow">return</span> ret; +00421 } +</pre></div> </td> + </tr> +</table> +<hr><h2>Field Documentation</h2> +<a class="anchor" name="NLMISC_1_1CQuatTo0" doxytag="NLMISC::CQuatT::w" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a04223.html#a575">w</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00077">77</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00309">NLMISC::CQuatT< T >::dotProduct()</a>, <a class="el" href="a06308.html#l00227">NLMISC::CQuatT< T >::equal()</a>, <a class="el" href="a06308.html#l00242">NLMISC::CQuatT< T >::operator *()</a>, <a class="el" href="a06308.html#l00112">NLMISC::CQuatT< float >::operator+()</a>, <a class="el" href="a06308.html#l00108">NLMISC::CQuatT< float >::operator+=()</a>, <a class="el" href="a06308.html#l00113">NLMISC::CQuatT< float >::operator-()</a>, <a class="el" href="a06308.html#l00109">NLMISC::CQuatT< float >::operator-=()</a>, <a class="el" href="a06308.html#l00530">NLMISC::CQuatD::operator=()</a>, <a class="el" href="a06308.html#l00503">NLMISC::CQuat::operator=()</a>, and <a class="el" href="a06308.html#l00100">NLMISC::CQuatT< float >::operator==()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTo1" doxytag="NLMISC::CQuatT::x" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a04223.html#a572">x</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00077">77</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00309">NLMISC::CQuatT< T >::dotProduct()</a>, <a class="el" href="a06308.html#l00227">NLMISC::CQuatT< T >::equal()</a>, <a class="el" href="a06308.html#l00242">NLMISC::CQuatT< T >::operator *()</a>, <a class="el" href="a06308.html#l00112">NLMISC::CQuatT< float >::operator+()</a>, <a class="el" href="a06308.html#l00108">NLMISC::CQuatT< float >::operator+=()</a>, <a class="el" href="a06308.html#l00113">NLMISC::CQuatT< float >::operator-()</a>, <a class="el" href="a06308.html#l00109">NLMISC::CQuatT< float >::operator-=()</a>, <a class="el" href="a06308.html#l00530">NLMISC::CQuatD::operator=()</a>, <a class="el" href="a06308.html#l00503">NLMISC::CQuat::operator=()</a>, and <a class="el" href="a06308.html#l00100">NLMISC::CQuatT< float >::operator==()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTo2" doxytag="NLMISC::CQuatT::y" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a04223.html#a573">y</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00077">77</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00309">NLMISC::CQuatT< T >::dotProduct()</a>, <a class="el" href="a06308.html#l00227">NLMISC::CQuatT< T >::equal()</a>, <a class="el" href="a06308.html#l00242">NLMISC::CQuatT< T >::operator *()</a>, <a class="el" href="a06308.html#l00112">NLMISC::CQuatT< float >::operator+()</a>, <a class="el" href="a06308.html#l00108">NLMISC::CQuatT< float >::operator+=()</a>, <a class="el" href="a06308.html#l00113">NLMISC::CQuatT< float >::operator-()</a>, <a class="el" href="a06308.html#l00109">NLMISC::CQuatT< float >::operator-=()</a>, <a class="el" href="a06308.html#l00530">NLMISC::CQuatD::operator=()</a>, <a class="el" href="a06308.html#l00503">NLMISC::CQuat::operator=()</a>, and <a class="el" href="a06308.html#l00100">NLMISC::CQuatT< float >::operator==()</a>. </td> + </tr> +</table> +<a class="anchor" name="NLMISC_1_1CQuatTo3" doxytag="NLMISC::CQuatT::z" ></a><p> +<table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> + <tr> + <td class="mdRow"> + <table cellpadding="0" cellspacing="0" border="0"> + <tr> + <td class="md" colspan="4"> +template<class T> </td> + </tr> + <tr> + <td class="md" nowrap valign="top"> T <a class="el" href="a03297.html">NLMISC::CQuatT</a>< T >::<a class="el" href="a04223.html#a574">z</a> + </table> + </td> + </tr> +</table> +<table cellspacing=5 cellpadding=0 border=0> + <tr> + <td> + + </td> + <td> + +<p> + +<p> +Definition at line <a class="el" href="a06308.html#l00077">77</a> of file <a class="el" href="a06308.html">quat.h</a>. +<p> +Referenced by <a class="el" href="a06308.html#l00309">NLMISC::CQuatT< T >::dotProduct()</a>, <a class="el" href="a06308.html#l00227">NLMISC::CQuatT< T >::equal()</a>, <a class="el" href="a06308.html#l00242">NLMISC::CQuatT< T >::operator *()</a>, <a class="el" href="a06308.html#l00112">NLMISC::CQuatT< float >::operator+()</a>, <a class="el" href="a06308.html#l00108">NLMISC::CQuatT< float >::operator+=()</a>, <a class="el" href="a06308.html#l00113">NLMISC::CQuatT< float >::operator-()</a>, <a class="el" href="a06308.html#l00109">NLMISC::CQuatT< float >::operator-=()</a>, <a class="el" href="a06308.html#l00530">NLMISC::CQuatD::operator=()</a>, <a class="el" href="a06308.html#l00503">NLMISC::CQuat::operator=()</a>, and <a class="el" href="a06308.html#l00100">NLMISC::CQuatT< float >::operator==()</a>. </td> + </tr> +</table> +<hr>The documentation for this class was generated from the following file:<ul> +<li><a class="el" href="a06308.html">quat.h</a></ul> +<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:30:51 2004 for NeL by +<a href="http://www.doxygen.org/index.html"> +<img src="doxygen.png" alt="doxygen" align="middle" border=0 > +</a>1.3.6 </small></address> +</body> +</html> |