386 lines
21 KiB
HTML
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.136.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.136.2">Quat</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.136.3">Quat</A></B>( float <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.136.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.136.17">w</A> )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.136.4">Quat</A></B>( const <!1><A HREF="Vec4.html">Vec4</A>& v )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.136.5">Quat</A></B>( float angle, const <!1><A HREF="Vec3.html">Vec3</A>& axis)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.136.6">Quat</A></B>( float angle1, const <!1><A HREF="Vec3.html">Vec3</A>& axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>& axis3)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A>& <B><A HREF="#DOC.2.136.7">asVec4</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec4.html">Vec4</A>& <B><A HREF="#DOC.2.136.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.136.9">asVec3</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.136.10">set</A></B>(float <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.136.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.136.17">w</A>)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.136.11">set</A></B>(const <!1><A HREF="Vec4.html">osg::Vec4</A>& v)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.136.12">operator [] </A></B>(int i)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.136.13">operator [] </A></B>(int i) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.136.14">x</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.136.15">y</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.136.16">z</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.136.17">w</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.136.18">x</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.136.19">y</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.136.20">z</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.136.21">w</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.2.136.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.136.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>& <B><A HREF="#DOC.2.136.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.136.25">operator*</A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
|
<DD><I>Binary multiply </I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.136.26">operator*=</A></B>(const <!1><A HREF="Quat.html">Quat</A>& 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.136.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>& <B><A HREF="#DOC.2.136.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.136.29">operator/</A></B>(const <!1><A HREF="Quat.html">Quat</A>& denom) const
|
|
<DD><I>Binary divide </I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.136.30">operator/=</A></B>(const <!1><A HREF="Quat.html">Quat</A>& 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.136.31">operator + </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
|
<DD><I>Binary addition </I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.136.32">operator += </A></B>(const <!1><A HREF="Quat.html">Quat</A>& 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.136.33">operator - </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
|
<DD><I>Binary subtraction </I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.136.34">operator -= </A></B>(const <!1><A HREF="Quat.html">Quat</A>& 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.136.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.136.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.136.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.136.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.136.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.136.40">makeRotate</A></B>( float angle, float <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.136.16">z</A> )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.136.41">makeRotate</A></B>( float angle, const <!1><A HREF="Vec3.html">Vec3</A>& vec )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.136.42">makeRotate</A></B>( float angle1, const <!1><A HREF="Vec3.html">Vec3</A>& axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>& axis3)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.136.43">makeRotate</A></B>( const <!1><A HREF="Vec3.html">Vec3</A>& vec1, const <!1><A HREF="Vec3.html">Vec3</A>& 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.136.44">getRotate</A></B>( float& angle, float& <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float& <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float& <!1><A HREF="Quat.html#DOC.2.136.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.136.45">getRotate</A></B>( float& angle, <!1><A HREF="Vec3.html">Vec3</A>& 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.136.46">slerp</A></B>( float <!1><A HREF="ImpostorSprite.html#DOC.2.77.25">t</A>, const <!1><A HREF="Quat.html">Quat</A>& from, const <!1><A HREF="Quat.html">Quat</A>& to)
|
|
<DD><I>Spherical Linear Interpolation.</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.136.47">set</A></B>( const <!1><A HREF="Matrix.html">Matrix</A>& 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.136.48">get</A></B>( <!1><A HREF="Matrix.html">Matrix</A>& 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.136.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.136.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.136.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.136.3"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( float <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.136.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.136.17">w</A> )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="Quat"></A>
|
|
<A NAME="DOC.2.136.4"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( const <!1><A HREF="Vec4.html">Vec4</A>& v )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="Quat"></A>
|
|
<A NAME="DOC.2.136.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>& axis)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="Quat"></A>
|
|
<A NAME="DOC.2.136.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>& axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>& axis3)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="asVec4"></A>
|
|
<A NAME="DOC.2.136.7"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html">Vec4</A>& asVec4()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="asVec4"></A>
|
|
<A NAME="DOC.2.136.8"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Vec4.html">Vec4</A>& asVec4() const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="asVec3"></A>
|
|
<A NAME="DOC.2.136.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.136.10"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(float <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.136.16">z</A>, float <!1><A HREF="Quat.html#DOC.2.136.17">w</A>)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="set"></A>
|
|
<A NAME="DOC.2.136.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>& v)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator [] "></A>
|
|
<A NAME="DOC.2.136.12"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& operator [] (int i)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator [] "></A>
|
|
<A NAME="DOC.2.136.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.136.14"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& x()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="y"></A>
|
|
<A NAME="DOC.2.136.15"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& y()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="z"></A>
|
|
<A NAME="DOC.2.136.16"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& z()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="w"></A>
|
|
<A NAME="DOC.2.136.17"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline float& w()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="x"></A>
|
|
<A NAME="DOC.2.136.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.136.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.136.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.136.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.136.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.136.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.136.24"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator *= (float rhs)</B></TT>
|
|
<DD>Unary multiply by scalar
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator*"></A>
|
|
<A NAME="DOC.2.136.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>& rhs) const </B></TT>
|
|
<DD>Binary multiply
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator*="></A>
|
|
<A NAME="DOC.2.136.26"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator*=(const <!1><A HREF="Quat.html">Quat</A>& rhs)</B></TT>
|
|
<DD>Unary multiply
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator / "></A>
|
|
<A NAME="DOC.2.136.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.136.28"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator /= (float rhs)</B></TT>
|
|
<DD>Unary divide by scalar
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator/"></A>
|
|
<A NAME="DOC.2.136.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>& denom) const </B></TT>
|
|
<DD>Binary divide
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator/="></A>
|
|
<A NAME="DOC.2.136.30"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator/=(const <!1><A HREF="Quat.html">Quat</A>& denom)</B></TT>
|
|
<DD>Unary divide
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator + "></A>
|
|
<A NAME="DOC.2.136.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>& rhs) const </B></TT>
|
|
<DD>Binary addition
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator += "></A>
|
|
<A NAME="DOC.2.136.32"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator += (const <!1><A HREF="Quat.html">Quat</A>& rhs)</B></TT>
|
|
<DD>Unary addition
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator - "></A>
|
|
<A NAME="DOC.2.136.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>& rhs) const </B></TT>
|
|
<DD>Binary subtraction
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator -= "></A>
|
|
<A NAME="DOC.2.136.34"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator -= (const <!1><A HREF="Quat.html">Quat</A>& rhs)</B></TT>
|
|
<DD>Unary subtraction
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator - "></A>
|
|
<A NAME="DOC.2.136.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.136.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.136.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.136.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.136.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.136.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.136.14">x</A>, float <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float <!1><A HREF="Quat.html#DOC.2.136.16">z</A> )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="makeRotate"></A>
|
|
<A NAME="DOC.2.136.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>& vec )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="makeRotate"></A>
|
|
<A NAME="DOC.2.136.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>& axis1, float angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, float angle3, const <!1><A HREF="Vec3.html">Vec3</A>& axis3)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="makeRotate"></A>
|
|
<A NAME="DOC.2.136.43"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( const <!1><A HREF="Vec3.html">Vec3</A>& vec1, const <!1><A HREF="Vec3.html">Vec3</A>& 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.136.44"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float& angle, float& <!1><A HREF="Quat.html#DOC.2.136.14">x</A>, float& <!1><A HREF="Quat.html#DOC.2.136.15">y</A>, float& <!1><A HREF="Quat.html#DOC.2.136.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.136.45"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float& angle, <!1><A HREF="Vec3.html">Vec3</A>& 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.136.46"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void slerp( float <!1><A HREF="ImpostorSprite.html#DOC.2.77.25">t</A>, const <!1><A HREF="Quat.html">Quat</A>& from, const <!1><A HREF="Quat.html">Quat</A>& 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.136.47"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set( const <!1><A HREF="Matrix.html">Matrix</A>& 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.136.48"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void get( <!1><A HREF="Matrix.html">Matrix</A>& 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.136.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>
|