OpenSceneGraph/doc/doc++/osg/Quat.html
2003-04-17 16:22:51 +00:00

386 lines
21 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>class SG_EXPORT osg::Quat</TITLE>
<META NAME="GENERATOR" CONTENT="DOC++ 3.4.10">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H2>class SG_EXPORT <A HREF="#DOC.DOCU">osg::Quat</A></H2></H2><BLOCKQUOTE>A quaternion class.</BLOCKQUOTE>
<HR>
<DL>
<P><DL>
<DT><H3>Public Fields</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec4.html">Vec4</A> <B><A HREF="#DOC.2.142.1">_fv</A></B>
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.142.2">Quat</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.142.3">Quat</A></B>( float <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.142.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.142.17">w</A> )
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.142.4">Quat</A></B>( const <!1><A HREF="Vec4.html">Vec4</A>&amp; v )
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.142.5">Quat</A></B>( float angle, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.142.6">Quat</A></B>( float angle1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis3)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A>&amp; <B><A HREF="#DOC.2.142.7">asVec4</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec4.html">Vec4</A>&amp; <B><A HREF="#DOC.2.142.8">asVec4</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.142.9">asVec3</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.142.10">set</A></B>(float <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.142.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.142.17">w</A>)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.142.11">set</A></B>(const <!1><A HREF="Vec4.html">osg::Vec4</A>&amp; v)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.142.12">operator [] </A></B>(int i)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.142.13">operator [] </A></B>(int i) const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.142.14">x</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.142.15">y</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.142.16">z</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float&amp; <B><A HREF="#DOC.2.142.17">w</A></B>()
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.142.18">x</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.142.19">y</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.142.20">z</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.142.21">w</A></B>() const
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.2.142.22">zeroRotation</A></B>() const
<DD><I>return true if the Quat represents a zero rotation, and therefore can be ignored in computations</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.23">operator * </A></B>(float rhs) const
<DD><I>Multiply by scalar </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>&amp; <B><A HREF="#DOC.2.142.24">operator *= </A></B>(float rhs)
<DD><I>Unary multiply by scalar </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.25">operator*</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const
<DD><I>Binary multiply </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>&amp; <B><A HREF="#DOC.2.142.26">operator*=</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)
<DD><I>Unary multiply </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.27">operator / </A></B>(float rhs) const
<DD><I>Divide by scalar </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>&amp; <B><A HREF="#DOC.2.142.28">operator /= </A></B>(float rhs)
<DD><I>Unary divide by scalar </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.29">operator/</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; denom) const
<DD><I>Binary divide </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>&amp; <B><A HREF="#DOC.2.142.30">operator/=</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; denom)
<DD><I>Unary divide </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.31">operator + </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const
<DD><I>Binary addition </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>&amp; <B><A HREF="#DOC.2.142.32">operator += </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)
<DD><I>Unary addition</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.33">operator - </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const
<DD><I>Binary subtraction </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>&amp; <B><A HREF="#DOC.2.142.34">operator -= </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)
<DD><I>Unary subtraction </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.35">operator - </A></B>() const
<DD><I>Negation operator - returns the negative of the quaternion.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>float <B><A HREF="#DOC.2.142.36">length</A></B>() const
<DD><I>Length of the quaternion = sqrt( vec .</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>float <B><A HREF="#DOC.2.142.37">length2</A></B>() const
<DD><I>Length of the quaternion = vec .</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.38">conj</A></B>() const
<DD><I>Conjugate </I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.142.39">inverse</A></B>() const
<DD><I>Multiplicative inverse method: q^(-1) = q^*/(qq^*)</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.40">makeRotate</A></B>( float angle, float <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.142.16">z</A> )
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.41">makeRotate</A></B>( float angle, const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec )
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.42">makeRotate</A></B>( float angle1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis3)
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.43">makeRotate</A></B>( const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec2 )
<DD><I>Make a rotation Quat which will rotate vec1 to vec2.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.44">getRotate</A></B>( float&amp; angle, float&amp; <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float&amp; <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float&amp; <!1><A HREF="Quat.html#DOC.2.142.16">z</A> ) const
<DD><I>Return the angle and vector components represented by the quaternion</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.45">getRotate</A></B>( float&amp; angle, <!1><A HREF="Vec3.html">Vec3</A>&amp; vec ) const
<DD><I>Return the angle and vector represented by the quaternion</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.46">slerp</A></B>( float <!1><A HREF="ImpostorSprite.html#DOC.2.83.25">t</A>, const <!1><A HREF="Quat.html">Quat</A>&amp; from, const <!1><A HREF="Quat.html">Quat</A>&amp; to)
<DD><I>Spherical Linear Interpolation.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.47">set</A></B>( const <!1><A HREF="Matrix.html">Matrix</A>&amp; m )
<DD><I>Set quaternion to be equivalent to specified matrix</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.142.48">get</A></B>( <!1><A HREF="Matrix.html">Matrix</A>&amp; m ) const
<DD><I>Get the equivalent matrix for this quaternion</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Matrix.html">Matrix</A> <B><A HREF="#DOC.2.142.49">getMatrix</A></B>() const
<DD><I>Get the equivalent matrix for this quaternion</I>
</DL></P>
</DL>
<A NAME="DOC.DOCU"></A>
<HR>
<H2>Documentation</H2>
<BLOCKQUOTE>A quaternion class. It can be used to represent an orientation in 3D space.</BLOCKQUOTE>
<DL>
<A NAME="_fv"></A>
<A NAME="DOC.2.142.1"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Vec4.html">Vec4</A> _fv</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Quat"></A>
<A NAME="DOC.2.142.2"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Quat"></A>
<A NAME="DOC.2.142.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( float <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.142.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.142.17">w</A> )</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Quat"></A>
<A NAME="DOC.2.142.4"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( const <!1><A HREF="Vec4.html">Vec4</A>&amp; v )</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Quat"></A>
<A NAME="DOC.2.142.5"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( float angle, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="Quat"></A>
<A NAME="DOC.2.142.6"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( float angle1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis3)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
<A NAME="DOC.2.142.7"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html">Vec4</A>&amp; asVec4()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
<A NAME="DOC.2.142.8"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec4.html">Vec4</A>&amp; asVec4() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec3"></A>
<A NAME="DOC.2.142.9"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec3.html">Vec3</A> asVec3() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.142.10"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(float <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.142.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.142.17">w</A>)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.142.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const <!1><A HREF="Vec4.html">osg::Vec4</A>&amp; v)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] "></A>
<A NAME="DOC.2.142.12"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; operator [] (int i)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator [] "></A>
<A NAME="DOC.2.142.13"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float operator [] (int i) const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="x"></A>
<A NAME="DOC.2.142.14"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; x()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="y"></A>
<A NAME="DOC.2.142.15"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; y()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="z"></A>
<A NAME="DOC.2.142.16"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; z()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="w"></A>
<A NAME="DOC.2.142.17"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float&amp; w()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="x"></A>
<A NAME="DOC.2.142.18"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float x() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="y"></A>
<A NAME="DOC.2.142.19"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float y() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="z"></A>
<A NAME="DOC.2.142.20"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float z() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="w"></A>
<A NAME="DOC.2.142.21"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float w() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="zeroRotation"></A>
<A NAME="DOC.2.142.22"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>bool zeroRotation() const </B></TT>
<DD>return true if the Quat represents a zero rotation, and therefore can be ignored in computations
<DL><DT><DD></DL><P>
<A NAME="operator * "></A>
<A NAME="DOC.2.142.23"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator * (float rhs) const </B></TT>
<DD>Multiply by scalar
<DL><DT><DD></DL><P>
<A NAME="operator *= "></A>
<A NAME="DOC.2.142.24"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; operator *= (float rhs)</B></TT>
<DD>Unary multiply by scalar
<DL><DT><DD></DL><P>
<A NAME="operator*"></A>
<A NAME="DOC.2.142.25"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator*(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const </B></TT>
<DD>Binary multiply
<DL><DT><DD></DL><P>
<A NAME="operator*="></A>
<A NAME="DOC.2.142.26"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; operator*=(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)</B></TT>
<DD>Unary multiply
<DL><DT><DD></DL><P>
<A NAME="operator / "></A>
<A NAME="DOC.2.142.27"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator / (float rhs) const </B></TT>
<DD>Divide by scalar
<DL><DT><DD></DL><P>
<A NAME="operator /= "></A>
<A NAME="DOC.2.142.28"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; operator /= (float rhs)</B></TT>
<DD>Unary divide by scalar
<DL><DT><DD></DL><P>
<A NAME="operator/"></A>
<A NAME="DOC.2.142.29"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator/(const <!1><A HREF="Quat.html">Quat</A>&amp; denom) const </B></TT>
<DD>Binary divide
<DL><DT><DD></DL><P>
<A NAME="operator/="></A>
<A NAME="DOC.2.142.30"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; operator/=(const <!1><A HREF="Quat.html">Quat</A>&amp; denom)</B></TT>
<DD>Unary divide
<DL><DT><DD></DL><P>
<A NAME="operator + "></A>
<A NAME="DOC.2.142.31"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator + (const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const </B></TT>
<DD>Binary addition
<DL><DT><DD></DL><P>
<A NAME="operator += "></A>
<A NAME="DOC.2.142.32"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; operator += (const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)</B></TT>
<DD>Unary addition
<DL><DT><DD></DL><P>
<A NAME="operator - "></A>
<A NAME="DOC.2.142.33"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator - (const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const </B></TT>
<DD>Binary subtraction
<DL><DT><DD></DL><P>
<A NAME="operator -= "></A>
<A NAME="DOC.2.142.34"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; operator -= (const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)</B></TT>
<DD>Unary subtraction
<DL><DT><DD></DL><P>
<A NAME="operator - "></A>
<A NAME="DOC.2.142.35"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator - () const </B></TT>
<DD>Negation operator - returns the negative of the quaternion.
Basically just calls operator - () on the Vec4
<DL><DT><DD></DL><P>
<A NAME="length"></A>
<A NAME="DOC.2.142.36"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float length() const </B></TT>
<DD>Length of the quaternion = sqrt( vec . vec )
<DL><DT><DD></DL><P>
<A NAME="length2"></A>
<A NAME="DOC.2.142.37"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>float length2() const </B></TT>
<DD>Length of the quaternion = vec . vec
<DL><DT><DD></DL><P>
<A NAME="conj"></A>
<A NAME="DOC.2.142.38"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A> conj() const </B></TT>
<DD>Conjugate
<DL><DT><DD></DL><P>
<A NAME="inverse"></A>
<A NAME="DOC.2.142.39"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> inverse() const </B></TT>
<DD>Multiplicative inverse method: q^(-1) = q^*/(qq^*)
<DL><DT><DD></DL><P>
<A NAME="makeRotate"></A>
<A NAME="DOC.2.142.40"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( float angle, float <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.142.16">z</A> )</B></TT>
<DL><DT><DD></DL><P>
<A NAME="makeRotate"></A>
<A NAME="DOC.2.142.41"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( float angle, const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec )</B></TT>
<DL><DT><DD></DL><P>
<A NAME="makeRotate"></A>
<A NAME="DOC.2.142.42"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( float angle1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>&amp; axis3)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="makeRotate"></A>
<A NAME="DOC.2.142.43"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec2 )</B></TT>
<DD>Make a rotation Quat which will rotate vec1 to vec2.
Generally take adot product to get the angle between these
and then use a cross product to get the rotation axis
Watch out for the two special cases of when the vectors
are co-incident or opposite in direction.
<DL><DT><DD></DL><P>
<A NAME="getRotate"></A>
<A NAME="DOC.2.142.44"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float&amp; angle, float&amp; <!1><A HREF="Quat.html#DOC.2.142.14">x</A>, float&amp; <!1><A HREF="Quat.html#DOC.2.142.15">y</A>, float&amp; <!1><A HREF="Quat.html#DOC.2.142.16">z</A> ) const </B></TT>
<DD>Return the angle and vector components represented by the quaternion
<DL><DT><DD></DL><P>
<A NAME="getRotate"></A>
<A NAME="DOC.2.142.45"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float&amp; angle, <!1><A HREF="Vec3.html">Vec3</A>&amp; vec ) const </B></TT>
<DD>Return the angle and vector represented by the quaternion
<DL><DT><DD></DL><P>
<A NAME="slerp"></A>
<A NAME="DOC.2.142.46"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void slerp( float <!1><A HREF="ImpostorSprite.html#DOC.2.83.25">t</A>, const <!1><A HREF="Quat.html">Quat</A>&amp; from, const <!1><A HREF="Quat.html">Quat</A>&amp; to)</B></TT>
<DD>Spherical Linear Interpolation.
As t goes from 0 to 1, the Quat object goes from "from" to "to".
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.142.47"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set( const <!1><A HREF="Matrix.html">Matrix</A>&amp; m )</B></TT>
<DD>Set quaternion to be equivalent to specified matrix
<DL><DT><DD></DL><P>
<A NAME="get"></A>
<A NAME="DOC.2.142.48"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void get( <!1><A HREF="Matrix.html">Matrix</A>&amp; m ) const </B></TT>
<DD>Get the equivalent matrix for this quaternion
<DL><DT><DD></DL><P>
<A NAME="getMatrix"></A>
<A NAME="DOC.2.142.49"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Matrix.html">Matrix</A> getMatrix() const </B></TT>
<DD>Get the equivalent matrix for this quaternion
<DL><DT><DD></DL><P></DL>
<HR><DL><DT><B>This class has no child classes.</B></DL>
<DL><DT><DT><B>Friends:</B><DD> inline std::ostream& operator << (std::ostream& output, const <!1><A HREF="Quat.html">Quat</A>& vec)<BR><DD></DL><P><P><I><A HREF="index.html">Alphabetic index</A></I> <I><A HREF="HIER.html">HTML hierarchy of classes</A> or <A HREF="HIERjava.html">Java</A></I></P><HR>
<BR>
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
</BODY>
</HTML>