407 lines
26 KiB
HTML
407 lines
26 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="Quat.html#DOC.2.162.1">value_type</A> <B><A HREF="#DOC.2.162.2">_v</A></B>[4]
|
|
</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.162.3">Quat</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.162.4">Quat</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.23">z</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.24">w</A> )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <B><A HREF="#DOC.2.162.5">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.162.6">Quat</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.7">Quat</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle1, const <!1><A HREF="Vec3.html">Vec3</A>& axis1, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.8">operator == </A></B>(const <!1><A HREF="Quat.html">Quat</A>& v) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.162.9">operator != </A></B>(const <!1><A HREF="Quat.html">Quat</A>& v) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline bool <B><A HREF="#DOC.2.162.10">operator < </A></B>(const <!1><A HREF="Quat.html">Quat</A>& v) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec4.html">Vec4</A> <B><A HREF="#DOC.2.162.11">asVec4</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Vec3.html">Vec3</A> <B><A HREF="#DOC.2.162.12">asVec3</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.162.13">set</A></B>(<!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.23">z</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.24">w</A>)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline void <B><A HREF="#DOC.2.162.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.162.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.162.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.162.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.162.18">get</A></B>(<!1><A HREF="Matrixd.html">Matrixd</A>& matrix) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& <B><A HREF="#DOC.2.162.19">operator [] </A></B>(int i)
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <B><A HREF="#DOC.2.162.20">operator [] </A></B>(int i) const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& <B><A HREF="#DOC.2.162.21">x</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& <B><A HREF="#DOC.2.162.22">y</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& <B><A HREF="#DOC.2.162.23">z</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& <B><A HREF="#DOC.2.162.24">w</A></B>()
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.162.25">x</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.162.26">y</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.162.27">z</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>inline float <B><A HREF="#DOC.2.162.28">w</A></B>() const
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>bool <B><A HREF="#DOC.2.162.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.162.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.162.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.162.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.162.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 <!1><A HREF="Quat.html">Quat</A> <B><A HREF="#DOC.2.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.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><!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <B><A HREF="#DOC.2.162.43">length</A></B>() const
|
|
<DD><I>Length of the quaternion = sqrt( vec .</I>
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif><!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <B><A HREF="#DOC.2.162.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.162.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.162.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.162.47">makeRotate</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.23">z</A> )
|
|
<DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>void <B><A HREF="#DOC.2.162.48">makeRotate</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.49">makeRotate</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle1, const <!1><A HREF="Vec3.html">Vec3</A>& axis1, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.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.162.51">getRotate</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & angle, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & <!1><A HREF="Quat.html#DOC.2.162.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.162.52">getRotate</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & 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.162.53">slerp</A></B>( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!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>
|
|
|
|
<P><DL>
|
|
<DT><H3>Public Members</H3><DD><DT>
|
|
<IMG ALT="[more]" BORDER=0 SRC=icon1.gif>typedef double <B><A HREF="#DOC.2.162.1">value_type</A></B>
|
|
</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="value_type"></A>
|
|
<A NAME="DOC.2.162.1"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>typedef double value_type</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="_v"></A>
|
|
<A NAME="DOC.2.162.2"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> _v[4]</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="Quat"></A>
|
|
<A NAME="DOC.2.162.3"></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.162.4"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.23">z</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.24">w</A> )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="Quat"></A>
|
|
<A NAME="DOC.2.162.5"></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.162.6"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.7"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline Quat( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle1, const <!1><A HREF="Vec3.html">Vec3</A>& axis1, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.8"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator == (const <!1><A HREF="Quat.html">Quat</A>& v) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator != "></A>
|
|
<A NAME="DOC.2.162.9"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator != (const <!1><A HREF="Quat.html">Quat</A>& v) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator < "></A>
|
|
<A NAME="DOC.2.162.10"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline bool operator < (const <!1><A HREF="Quat.html">Quat</A>& v) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="asVec4"></A>
|
|
<A NAME="DOC.2.162.11"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec4.html">Vec4</A> asVec4() const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="asVec3"></A>
|
|
<A NAME="DOC.2.162.12"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Vec3.html">Vec3</A> asVec3() const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="set"></A>
|
|
<A NAME="DOC.2.162.13"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline void set(<!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.23">z</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.24">w</A>)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="set"></A>
|
|
<A NAME="DOC.2.162.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.162.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.162.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.162.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.162.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.162.19"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& operator [] (int i)</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="operator [] "></A>
|
|
<A NAME="DOC.2.162.20"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> operator [] (int i) const </B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="x"></A>
|
|
<A NAME="DOC.2.162.21"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& x()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="y"></A>
|
|
<A NAME="DOC.2.162.22"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& y()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="z"></A>
|
|
<A NAME="DOC.2.162.23"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& z()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="w"></A>
|
|
<A NAME="DOC.2.162.24"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A>& w()</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="x"></A>
|
|
<A NAME="DOC.2.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.34"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>inline <!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.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.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.162.43"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.44"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B><!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> length2() const </B></TT>
|
|
<DD>Length of the quaternion = vec . vec
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="conj"></A>
|
|
<A NAME="DOC.2.162.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.162.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.162.47"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!1><A HREF="Quat.html#DOC.2.162.23">z</A> )</B></TT>
|
|
<DL><DT><DD></DL><P>
|
|
<A NAME="makeRotate"></A>
|
|
<A NAME="DOC.2.162.48"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.49"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void makeRotate( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle1, const <!1><A HREF="Vec3.html">Vec3</A>& axis1, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> angle2, const <!1><A HREF="Vec3.html">Vec3</A>& axis2, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> 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.162.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.162.51"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & angle, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & <!1><A HREF="Quat.html#DOC.2.162.21">x</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & <!1><A HREF="Quat.html#DOC.2.162.22">y</A>, <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & <!1><A HREF="Quat.html#DOC.2.162.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.162.52"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void getRotate( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> & 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.162.53"></A>
|
|
<DT><IMG ALT="o" BORDER=0 SRC=icon2.gif><TT><B>void slerp( <!1><A HREF="Quat.html#DOC.2.162.1">value_type</A> <!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>
|