OpenSceneGraph/doc/doc++/osg/Quat.html

313 lines
18 KiB
HTML
Raw Normal View History

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>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Vec4.html">Vec4</A> <B><A HREF="#DOC.2.83.1">_fv</A></B>
2001-09-20 05:19:47 +08:00
</DL></P>
<P><DL>
<DT><H3>Public Methods</H3><DD><DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.83.2">Quat</A></B>()
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.83.3">Quat</A></B>( float <!1><A HREF="Viewport.html#DOC.2.112.7">x</A>, float <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, float <!1><A HREF="Vec4.html#DOC.2.111.14">z</A>, float <!1><A HREF="Vec4.html#DOC.2.111.15">w</A> )
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif> <B><A HREF="#DOC.2.83.4">Quat</A></B>( const <!1><A HREF="Vec4.html">Vec4</A>&amp; v )
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A>&amp; <B><A HREF="#DOC.2.83.5">asVec4</A></B>()
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec4.html">Vec4</A>&amp; <B><A HREF="#DOC.2.83.6">asVec4</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.83.7">asVec3</A></B>() const
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.83.8">set</A></B>(const float <!1><A HREF="Viewport.html#DOC.2.112.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.111.14">z</A>, const float <!1><A HREF="Vec4.html#DOC.2.111.15">w</A>)
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.83.9">set</A></B>(const <!1><A HREF="Vec4.html">osg::Vec4</A>&amp; v)
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.83.10">operator * </A></B>(const float rhs) const
2001-09-20 05:19:47 +08:00
<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.83.11">operator *= </A></B>(const float rhs)
2001-09-20 05:19:47 +08:00
<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.83.12">operator*</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const
2001-09-20 05:19:47 +08:00
<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.83.13">operator*=</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)
2001-09-20 05:19:47 +08:00
<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.83.14">operator / </A></B>(const float&amp; rhs) const
2001-09-20 05:19:47 +08:00
<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.83.15">operator /= </A></B>(const float&amp; rhs)
2001-09-20 05:19:47 +08:00
<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.83.16">operator/</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; denom) const
2001-09-20 05:19:47 +08:00
<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.83.17">operator/=</A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; denom)
2001-09-20 05:19:47 +08:00
<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.83.18">operator + </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const
2001-09-20 05:19:47 +08:00
<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.83.19">operator += </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)
2001-09-20 05:19:47 +08:00
<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.83.20">operator - </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs) const
2001-09-20 05:19:47 +08:00
<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.83.21">operator -= </A></B>(const <!1><A HREF="Quat.html">Quat</A>&amp; rhs)
2001-09-20 05:19:47 +08:00
<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.83.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>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const float <B><A HREF="#DOC.2.83.23">length</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>Length of the quaternion = sqrt( vec .</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>const float <B><A HREF="#DOC.2.83.24">length2</A></B>() const
2001-09-20 05:19:47 +08:00
<DD><I>Length of the quaternion = vec .</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline const <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.83.25">conj</A></B>() const
2001-09-20 05:19:47 +08:00
<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.83.26">inverse</A></B>() const
2001-09-20 05:19:47 +08:00
<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.83.27">makeRotate</A></B>( const float angle, const float <!1><A HREF="Viewport.html#DOC.2.112.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.111.14">z</A> )
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.83.28">makeRotate</A></B>( const float angle, const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec )
2001-09-20 05:19:47 +08:00
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.83.29">makeRotate</A></B>( const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; vec2 )
2001-09-20 05:19:47 +08:00
<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.83.30">makeRotate</A></B>( float heading, float pitch, float roll)
<DD><I>make a rotation Quat from euler angles.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.83.31">getRotate</A></B>( float&amp; angle, float&amp; <!1><A HREF="Viewport.html#DOC.2.112.7">x</A>, float&amp; <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, float&amp; <!1><A HREF="Vec4.html#DOC.2.111.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>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.83.32">getRotate</A></B>( float&amp; angle, <!1><A HREF="Vec3.html">Vec3</A>&amp; vec ) const
2001-09-20 05:19:47 +08:00
<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.83.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>&amp; from, const <!1><A HREF="Quat.html">Quat</A>&amp; to)
2001-09-20 05:19:47 +08:00
<DD><I>Spherical Linear Interpolation.</I>
<DT>
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.83.34">set</A></B>( const <!1><A HREF="Matrix.html">Matrix</A>&amp; m )
2001-09-20 05:19:47 +08:00
<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.83.35">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.83.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>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.3"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B> Quat( float <!1><A HREF="Viewport.html#DOC.2.112.7">x</A>, float <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, float <!1><A HREF="Vec4.html#DOC.2.111.14">z</A>, float <!1><A HREF="Vec4.html#DOC.2.111.15">w</A> )</B></TT>
2001-09-20 05:19:47 +08:00
<DL><DT><DD></DL><P>
<A NAME="Quat"></A>
<A NAME="DOC.2.83.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>&amp; v )</B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
<A NAME="DOC.2.83.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>&amp; asVec4()</B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec4"></A>
<A NAME="DOC.2.83.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>&amp; asVec4() const </B></TT>
<DL><DT><DD></DL><P>
<A NAME="asVec3"></A>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.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.112.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.111.14">z</A>, const float <!1><A HREF="Vec4.html#DOC.2.111.15">w</A>)</B></TT>
2001-09-20 05:19:47 +08:00
<DL><DT><DD></DL><P>
<A NAME="set"></A>
<A NAME="DOC.2.83.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>&amp; v)</B></TT>
<DL><DT><DD></DL><P>
<A NAME="operator * "></A>
<A NAME="DOC.2.83.10"></A>
<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>
<A NAME="DOC.2.83.11"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html">Quat</A>&amp; 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>
<A NAME="DOC.2.83.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>&amp; rhs) const </B></TT>
<DD>Binary multiply
<DL><DT><DD></DL><P>
<A NAME="operator*="></A>
<A NAME="DOC.2.83.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>&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.83.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&amp; rhs) const </B></TT>
<DD>Divide by scalar
<DL><DT><DD></DL><P>
<A NAME="operator /= "></A>
<A NAME="DOC.2.83.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>&amp; operator /= (const float&amp; rhs)</B></TT>
<DD>Unary divide by scalar
<DL><DT><DD></DL><P>
<A NAME="operator/"></A>
<A NAME="DOC.2.83.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>&amp; denom) const </B></TT>
<DD>Binary divide
<DL><DT><DD></DL><P>
<A NAME="operator/="></A>
<A NAME="DOC.2.83.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>&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.83.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>&amp; rhs) const </B></TT>
<DD>Binary addition
<DL><DT><DD></DL><P>
<A NAME="operator += "></A>
<A NAME="DOC.2.83.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>&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.83.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>&amp; rhs) const </B></TT>
<DD>Binary subtraction
<DL><DT><DD></DL><P>
<A NAME="operator -= "></A>
<A NAME="DOC.2.83.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>&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.83.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>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.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>
<A NAME="DOC.2.83.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.112.7">x</A>, const float <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, const float <!1><A HREF="Vec4.html#DOC.2.111.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>
<A NAME="DOC.2.83.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>&amp; 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>
<A NAME="DOC.2.83.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>&amp; vec1, const <!1><A HREF="Vec3.html">Vec3</A>&amp; 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>
<A NAME="makeRotate"></A>
<A NAME="DOC.2.83.30"></A>
<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>
<A NAME="DOC.2.83.31"></A>
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( float&amp; angle, float&amp; <!1><A HREF="Viewport.html#DOC.2.112.7">x</A>, float&amp; <!1><A HREF="Viewport.html#DOC.2.112.8">y</A>, float&amp; <!1><A HREF="Vec4.html#DOC.2.111.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>
<A NAME="DOC.2.83.32"></A>
2001-12-25 05:56:22 +08:00
<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>
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>
<A NAME="DOC.2.83.33"></A>
<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>&amp; from, const <!1><A HREF="Quat.html">Quat</A>&amp; 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>
<A NAME="DOC.2.83.34"></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>
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>
<A NAME="DOC.2.83.35"></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.83.36"></A>
<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>