404 lines
22 KiB
HTML
404 lines
22 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.161.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.161.2">Quat</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.161.3">Quat</A></B>( float <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float <!1><A HREF="Quat.html#DOC.2.161.23">z</A>, float <!1><A HREF="Quat.html#DOC.2.161.24">w</A> )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.161.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.161.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.161.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 bool <B><A HREF="#DOC.2.161.7">operator == </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.161.8">operator != </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.161.9">operator < </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A>& <B><A HREF="#DOC.2.161.10">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.161.11">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.161.12">asVec3</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.161.13">set</A></B>(float <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float <!1><A HREF="Quat.html#DOC.2.161.23">z</A>, float <!1><A HREF="Quat.html#DOC.2.161.24">w</A>)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.161.14">set</A></B>(const <!1><A HREF="Vec4.html">osg::Vec4</A>& v)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.161.15">set</A></B>(const <!1><A HREF="Matrixf.html">Matrixf</A>& matrix)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.161.16">set</A></B>(const <!1><A HREF="Matrixd.html">Matrixd</A>& matrix)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.161.17">get</A></B>(<!1><A HREF="Matrixf.html">Matrixf</A>& matrix) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.161.18">get</A></B>(<!1><A HREF="Matrixd.html">Matrixd</A>& matrix) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.161.19">operator [] </A></B>(int i)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.161.20">operator [] </A></B>(int i) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.161.21">x</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.161.22">y</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.161.23">z</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float& <B><A HREF="#DOC.2.161.24">w</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.161.25">x</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.161.26">y</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.161.27">z</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.161.28">w</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.2.161.29">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.161.30">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.161.31">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.161.32">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.161.33">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.161.34">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.161.35">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.161.36">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.161.37">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.161.38">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.161.39">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.161.40">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.161.41">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.161.42">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.161.43">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.161.44">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.161.45">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.161.46">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.161.47">makeRotate</A></B>( float angle, float <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float <!1><A HREF="Quat.html#DOC.2.161.23">z</A> )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.161.48">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.161.49">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.161.50">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.161.51">getRotate</A></B>( float& angle, float& <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float& <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float& <!1><A HREF="Quat.html#DOC.2.161.23">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.161.52">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.161.53">slerp</A></B>( float <!1><A HREF="ImpostorSprite.html#DOC.2.92.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>
|
|
</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.161.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.161.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.161.3"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( float <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float <!1><A HREF="Quat.html#DOC.2.161.23">z</A>, float <!1><A HREF="Quat.html#DOC.2.161.24">w</A> )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="Quat"></A>
|
|
<A NAME="DOC.2.161.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.161.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.161.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="operator == "></A>
|
|
<A NAME="DOC.2.161.7"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator == (const <!1><A HREF="Quat.html">Quat</A>& rhs) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator != "></A>
|
|
<A NAME="DOC.2.161.8"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator != (const <!1><A HREF="Quat.html">Quat</A>& rhs) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator < "></A>
|
|
<A NAME="DOC.2.161.9"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator < (const <!1><A HREF="Quat.html">Quat</A>& rhs) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="asVec4"></A>
|
|
<A NAME="DOC.2.161.10"></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.161.11"></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.161.12"></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.161.13"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(float <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float <!1><A HREF="Quat.html#DOC.2.161.23">z</A>, float <!1><A HREF="Quat.html#DOC.2.161.24">w</A>)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="set"></A>
|
|
<A NAME="DOC.2.161.14"></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="set"></A>
|
|
<A NAME="DOC.2.161.15"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set(const <!1><A HREF="Matrixf.html">Matrixf</A>& matrix)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="set"></A>
|
|
<A NAME="DOC.2.161.16"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set(const <!1><A HREF="Matrixd.html">Matrixd</A>& matrix)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="get"></A>
|
|
<A NAME="DOC.2.161.17"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void get(<!1><A HREF="Matrixf.html">Matrixf</A>& matrix) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="get"></A>
|
|
<A NAME="DOC.2.161.18"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void get(<!1><A HREF="Matrixd.html">Matrixd</A>& matrix) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator [] "></A>
|
|
<A NAME="DOC.2.161.19"></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.161.20"></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.161.21"></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.161.22"></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.161.23"></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.161.24"></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.161.25"></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.161.26"></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.161.27"></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.161.28"></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.161.29"></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.161.30"></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.161.31"></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.161.32"></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.161.33"></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.161.34"></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.161.35"></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.161.36"></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.161.37"></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.161.38"></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.161.39"></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.161.40"></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.161.41"></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.161.42"></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.161.43"></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.161.44"></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.161.45"></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.161.46"></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.161.47"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( float angle, float <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float <!1><A HREF="Quat.html#DOC.2.161.23">z</A> )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="makeRotate"></A>
|
|
<A NAME="DOC.2.161.48"></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.161.49"></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.161.50"></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.161.51"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float& angle, float& <!1><A HREF="Quat.html#DOC.2.161.21">x</A>, float& <!1><A HREF="Quat.html#DOC.2.161.22">y</A>, float& <!1><A HREF="Quat.html#DOC.2.161.23">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.161.52"></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.161.53"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void slerp( float <!1><A HREF="ImpostorSprite.html#DOC.2.92.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></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>
|