2001-09-20 05:19:47 +08:00
|
|
|
<!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.8">
|
|
|
|
</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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec4.html">Vec4</A> <B><A HREF="#DOC.2.82.1">_fv</A></B>
|
2001-09-20 05:19:47 +08:00
|
|
|
</DL></P>
|
|
|
|
|
|
|
|
<P><DL>
|
|
|
|
<DT><H3>Public Methods</H3><DD><DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.82.2">Quat</A></B>()
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.82.3">Quat</A></B>( float <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, float <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, float <!1><A HREF="Vec4.html#DOC.2.110.14">z</A>, float <!1><A HREF="Vec4.html#DOC.2.110.15">w</A> )
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.82.4">Quat</A></B>( const <!1><A HREF="Vec4.html">Vec4</A>& v )
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A>& <B><A HREF="#DOC.2.82.5">asVec4</A></B>()
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec4.html">Vec4</A>& <B><A HREF="#DOC.2.82.6">asVec4</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.82.7">asVec3</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.8">set</A></B>(const float <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.110.14">z</A>, const float <!1><A HREF="Vec4.html#DOC.2.110.15">w</A>)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.82.9">set</A></B>(const <!1><A HREF="Vec4.html">osg::Vec4</A>& v)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.10">operator * </A></B>(const float rhs) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Multiply by scalar </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.82.11">operator *= </A></B>(const float rhs)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Unary multiply by scalar </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.12">operator*</A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Binary multiply </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.82.13">operator*=</A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Unary multiply </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.14">operator / </A></B>(const float& rhs) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Divide by scalar </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.82.15">operator /= </A></B>(const float& rhs)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Unary divide by scalar </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.16">operator/</A></B>(const <!1><A HREF="Quat.html">Quat</A>& denom) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Binary divide </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.82.17">operator/=</A></B>(const <!1><A HREF="Quat.html">Quat</A>& denom)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Unary divide </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.18">operator + </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Binary addition </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.82.19">operator += </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Unary addition</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.20">operator - </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Binary subtraction </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html">Quat</A>& <B><A HREF="#DOC.2.82.21">operator -= </A></B>(const <!1><A HREF="Quat.html">Quat</A>& rhs)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Unary subtraction </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.22">operator - </A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Negation operator - returns the negative of the quaternion.</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const float <B><A HREF="#DOC.2.82.23">length</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Length of the quaternion = sqrt( vec .</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const float <B><A HREF="#DOC.2.82.24">length2</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Length of the quaternion = vec .</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.25">conj</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Conjugate </I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.82.26">inverse</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Multiplicative inverse method: q^(-1) = q^*/(qq^*)</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.27">makeRotate</A></B>( const float angle, const float <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.110.14">z</A> )
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.28">makeRotate</A></B>( const float angle, const <!1><A HREF="Vec3.html">Vec3</A>& vec )
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.29">makeRotate</A></B>( const <!1><A HREF="Vec3.html">Vec3</A>& vec1, const <!1><A HREF="Vec3.html">Vec3</A>& vec2 )
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Make a rotation Quat which will rotate vec1 to vec2.</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.30">makeRotate</A></B>( float heading, float pitch, float roll)
|
2002-04-22 05:53:03 +08:00
|
|
|
<DD><I>make a rotation Quat from euler angles.</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.31">getRotate</A></B>( float& angle, float& <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, float& <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, float& <!1><A HREF="Vec4.html#DOC.2.110.14">z</A> ) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Return the angle and vector components represented by the quaternion</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.32">getRotate</A></B>( float& angle, <!1><A HREF="Vec3.html">Vec3</A>& vec ) const
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Return the angle and vector represented by the quaternion</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.33">slerp</A></B>( const float <!1><A HREF="ImpostorSprite.html#DOC.2.47.24">t</A>, const <!1><A HREF="Quat.html">Quat</A>& from, const <!1><A HREF="Quat.html">Quat</A>& to)
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Spherical Linear Interpolation.</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.34">set</A></B>( const <!1><A HREF="Matrix.html">Matrix</A>& m )
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD><I>Set quaternion to be equivalent to specified matrix</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.82.35">get</A></B>( <!1><A HREF="Matrix.html">Matrix</A>& m ) const
|
2002-04-22 05:53:03 +08:00
|
|
|
<DD><I>Get the equivalent matrix for this quaternion</I>
|
|
|
|
<DT>
|
2002-04-25 04:13:50 +08:00
|
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Matrix.html">Matrix</A> <B><A HREF="#DOC.2.82.36">getMatrix</A></B>() const
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.1"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.2"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Quat()</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="Quat"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.3"></A>
|
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Quat( float <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, float <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, float <!1><A HREF="Vec4.html#DOC.2.110.14">z</A>, float <!1><A HREF="Vec4.html#DOC.2.110.15">w</A> )</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="Quat"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.4"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Quat( const <!1><A HREF="Vec4.html">Vec4</A>& v )</B></TT>
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="asVec4"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.5"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.6"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.7"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.8"></A>
|
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(const float <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.110.14">z</A>, const float <!1><A HREF="Vec4.html#DOC.2.110.15">w</A>)</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="set"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.9"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.10"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator * (const float rhs) const </B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD>Multiply by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator *= "></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.11"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator *= (const float rhs)</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD>Unary multiply by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator*"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.12"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.13"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.14"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> operator / (const float& rhs) const </B></TT>
|
|
|
|
<DD>Divide by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator /= "></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.15"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>& operator /= (const float& rhs)</B></TT>
|
|
|
|
<DD>Unary divide by scalar
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="operator/"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.16"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.17"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.18"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.19"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.20"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.21"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.22"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.23"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const float length() const </B></TT>
|
|
|
|
<DD>Length of the quaternion = sqrt( vec . vec )
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="length2"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.24"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>const float length2() const </B></TT>
|
|
|
|
<DD>Length of the quaternion = vec . vec
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="conj"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.25"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline const <!1><A HREF="Quat.html">Quat</A> conj() const </B></TT>
|
|
|
|
<DD>Conjugate
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="inverse"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.26"></A>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2001-12-25 05:56:22 +08:00
|
|
|
<A NAME="makeRotate"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.27"></A>
|
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( const float angle, const float <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.110.14">z</A> )</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DL><DT><DD></DL><P>
|
2001-12-25 05:56:22 +08:00
|
|
|
<A NAME="makeRotate"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.28"></A>
|
2001-12-25 05:56:22 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( const float angle, const <!1><A HREF="Vec3.html">Vec3</A>& vec )</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DL><DT><DD></DL><P>
|
2001-12-25 05:56:22 +08:00
|
|
|
<A NAME="makeRotate"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.29"></A>
|
2001-12-25 05:56:22 +08:00
|
|
|
<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>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-22 05:53:03 +08:00
|
|
|
<A NAME="makeRotate"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.30"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( float heading, float pitch, float roll)</B></TT>
|
|
|
|
<DD>make a rotation Quat from euler angles.
|
|
|
|
assume Z up, Y north, X east and euler convention
|
|
|
|
as per Open Flight & Performer.
|
|
|
|
Applies a positive rotation about Y axis for roll,
|
|
|
|
then applies a positive roation about X for pitch,
|
|
|
|
and finally a negative rotation about the Z axis.
|
|
|
|
<DL><DT><DD></DL><P>
|
2001-12-25 05:56:22 +08:00
|
|
|
<A NAME="getRotate"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.31"></A>
|
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float& angle, float& <!1><A HREF="Viewport.html#DOC.2.111.7">x</A>, float& <!1><A HREF="Viewport.html#DOC.2.111.8">y</A>, float& <!1><A HREF="Vec4.html#DOC.2.110.14">z</A> ) const </B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD>Return the angle and vector components represented by the quaternion
|
|
|
|
<DL><DT><DD></DL><P>
|
2001-12-25 05:56:22 +08:00
|
|
|
<A NAME="getRotate"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.32"></A>
|
2001-12-25 05:56:22 +08:00
|
|
|
<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>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD>Return the angle and vector represented by the quaternion
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="slerp"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.33"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void slerp( const float <!1><A HREF="ImpostorSprite.html#DOC.2.47.24">t</A>, const <!1><A HREF="Quat.html">Quat</A>& from, const <!1><A HREF="Quat.html">Quat</A>& to)</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.34"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void set( const <!1><A HREF="Matrix.html">Matrix</A>& m )</B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<DD>Set quaternion to be equivalent to specified matrix
|
|
|
|
<DL><DT><DD></DL><P>
|
|
|
|
<A NAME="get"></A>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.35"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<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>
|
2002-04-25 04:13:50 +08:00
|
|
|
<A NAME="DOC.2.82.36"></A>
|
2002-04-22 05:53:03 +08:00
|
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Matrix.html">Matrix</A> getMatrix() const </B></TT>
|
2001-09-20 05:19:47 +08:00
|
|
|
<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>
|
|
|
|
|
2001-12-25 05:56:22 +08:00
|
|
|
<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>
|
2001-09-20 05:19:47 +08:00
|
|
|
<BR>
|
|
|
|
This page was generated with the help of <A HREF="http://docpp.sourceforge.net">DOC++</A>.
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|