📄 quaternion.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Mon Jul 15 11:50:49 PDT 2002 --><TITLE>: Class Quaternion</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Quaternion.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../quicktime/qd3d/math/Point3D.html"><B>PREV CLASS</B></A> <A HREF="../../../quicktime/qd3d/math/Vector2D.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Quaternion.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.qd3d.math</FONT><BR>Class Quaternion</H2><PRE>java.lang.Object | +--<A HREF="../../../quicktime/util/QTByteObject.html">quicktime.util.QTByteObject</A> | +--<B>quicktime.qd3d.math.Quaternion</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, <A HREF="../../../quicktime/jdirect/InterfaceLib.html">InterfaceLib</A>, <A HREF="../../../quicktime/jdirect/PrimitivesLib.html">PrimitivesLib</A>, <A HREF="../../../quicktime/jdirect/QuickDraw3DLib.html">QuickDraw3DLib</A>, <A HREF="../../../quicktime/jdirect/QuickTimeLib.html">QuickTimeLib</A>, java.io.Serializable, <A HREF="../../../quicktime/jdirect/SharedLibrary.html">SharedLibrary</A>, com.apple.jdirect.SharedLibrary</DD></DL><HR><DL><DT>public final class <B>Quaternion</B><DT>extends <A HREF="../../../quicktime/util/QTByteObject.html">QTByteObject</A><DT>implements <A HREF="../../../quicktime/jdirect/QuickTimeLib.html">QuickTimeLib</A>, <A HREF="../../../quicktime/jdirect/QuickDraw3DLib.html">QuickDraw3DLib</A>, java.lang.Cloneable</DL><P>Quaternion A quadruple of floating-point numbers that obeys the laws of quaternion arithmetic. A Quaternion transform will rotate and twist an object according to the mathematical properties of quaternions. Refer to TQ3Quaternion in QuickDraw3d<P><DL><DT><B>See Also: </B><DD><A HREF="../../../serialized-form.html#quicktime.qd3d.math.Quaternion">Serialized Form</A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#kNativeSize">kNativeSize</A></B></CODE><BR> This is the size (the number of bytes) that are required for this class</TD></TR></TABLE> <A NAME="fields_inherited_from_class_quicktime.jdirect.QuickTimeLib"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface quicktime.jdirect.<A HREF="../../../quicktime/jdirect/QuickTimeLib.html">QuickTimeLib</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/jdirect/QuickTimeLib.html#JDirect_MacOSX">JDirect_MacOSX</A>, <A HREF="../../../quicktime/jdirect/QuickTimeLib.html#libraryInstance">libraryInstance</A>, <A HREF="../../../quicktime/jdirect/QuickTimeLib.html#name">name</A></CODE></TD></TR></TABLE> <A NAME="fields_inherited_from_class_quicktime.jdirect.QuickDraw3DLib"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface quicktime.jdirect.<A HREF="../../../quicktime/jdirect/QuickDraw3DLib.html">QuickDraw3DLib</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../quicktime/jdirect/QuickDraw3DLib.html#libraryInstance">libraryInstance</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#Quaternion()">Quaternion</A></B>()</CODE><BR> Creates a Quaternion object set to the identity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#Quaternion(float, float, float, float)">Quaternion</A></B>(float w, float x, float y, float z)</CODE><BR> Creates a Quaternion object containing given data.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#clone()">clone</A></B>()</CODE><BR> Returns a copy of this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#copy()">copy</A></B>()</CODE><BR> Returns a copy of the quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#dot(quicktime.qd3d.math.Quaternion)">dot</A></B>(<A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A> q2)</CODE><BR> Returns the dot product of two quaternions, this and q2.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../../../quicktime/util/EndianDescriptor.html">EndianDescriptor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#getEndianDescriptor()">getEndianDescriptor</A></B>()</CODE><BR> Returns the EndianDescriptor for this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#getW()">getW</A></B>()</CODE><BR> returns the w value</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#getX()">getX</A></B>()</CODE><BR> returns the position in the x direction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#getY()">getY</A></B>()</CODE><BR> returns the position in the y direction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> float</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#getZ()">getZ</A></B>()</CODE><BR> returns the position in the z direction</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#interpolateFast(quicktime.qd3d.math.Quaternion, float)">interpolateFast</A></B>(<A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A> q2, float t)</CODE><BR> Return a a quaternion that is a fast interpolation between the this and the specified quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#interpolateLinear(quicktime.qd3d.math.Quaternion, float)">interpolateLinear</A></B>(<A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A> q2, float t)</CODE><BR> Return a a quaternion that is a linear interpolation between the this and the specified quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#invert()">invert</A></B>()</CODE><BR> Returns the inverse of the quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#isIdentity()">isIdentity</A></B>()</CODE><BR> Returns rue if the quaternion is an identity quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#matchReflection(quicktime.qd3d.math.Quaternion)">matchReflection</A></B>(<A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A> q2)</CODE><BR> Returns a quaternion that is either identical to the quaternion specified by the q1 parameter or is the negative of q1, depending on whether q1 or its negative matches the orientation of the quaternion specified by the q2 parameter.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#multiply(quicktime.qd3d.math.Quaternion)">multiply</A></B>(<A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A> q2)</CODE><BR> Returns the product of the two quaternions, this and q2.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../quicktime/qd3d/math/Quaternion.html">Quaternion</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#normalize()">normalize</A></B>()</CODE><BR> Returns a normalized the quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#setIdentity()">setIdentity</A></B>()</CODE><BR> Sets the Quaternion to the identity quaternion.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../quicktime/qd3d/math/Quaternion.html#setMatrix(quicktime.qd3d.math.Matrix4x4)">setMatrix</A></B>(<A HREF="../../../quicktime/qd3d/math/Matrix4x4.html">Matrix4x4</A> matrix)</CODE><BR> Sets a quaternion that has the same transformational properties as the matrix specified by the matrix parameter.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -