📄 gvector.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sun Jun 23 01:50:04 PDT 2002 --><TITLE>GVector (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="GVector (Java 3D API)";}</SCRIPT><BODY BGCOLOR="white" onload="asd();"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=3 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="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="../../javax/vecmath/GMatrix.html"><B>PREV CLASS</B></A> <A HREF="../../javax/vecmath/Matrix3d.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="GVector.html" TARGET="_top"><B>NO FRAMES</B></A> <SCRIPT> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT><A HREF="../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <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">javax.vecmath</FONT><BR>Class GVector</H2><PRE>java.lang.Object | +--<B>javax.vecmath.GVector</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, java.io.Serializable</DD></DL><HR><DL><DT>public class <B>GVector</B><DT>extends java.lang.Object<DT>implements java.io.Serializable, java.lang.Cloneable</DL><P>A double precision, general, dynamically-resizable, one-dimensional vector class. Index numbering begins with zero.<P><P><DL><DT><B>See Also:</B><DD><A HREF="../../serialized-form.html" TARGET="javax.vecmath.GVector">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== 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="../../javax/vecmath/GVector.html#GVector(double[])">GVector</A></B>(double[] vector)</CODE><BR> Constructs a new GVector from the specified array elements.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(double[], int)">GVector</A></B>(double[] vector, int length)</CODE><BR> Constructs a new GVector of the specified length and initializes it by copying the specified number of elements from the specified array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(javax.vecmath.GVector)">GVector</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> vector)</CODE><BR> Constructs a new GVector from the specified vector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(int)">GVector</A></B>(int length)</CODE><BR> Constructs a new GVector of the specified length with all vector elements initialized to 0.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(javax.vecmath.Tuple2f)">GVector</A></B>(<A HREF="../../javax/vecmath/Tuple2f.html">Tuple2f</A> tuple)</CODE><BR> Constructs a new GVector and copies the initial values from the specified tuple.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(javax.vecmath.Tuple3d)">GVector</A></B>(<A HREF="../../javax/vecmath/Tuple3d.html">Tuple3d</A> tuple)</CODE><BR> Constructs a new GVector and copies the initial values from the specified tuple.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(javax.vecmath.Tuple3f)">GVector</A></B>(<A HREF="../../javax/vecmath/Tuple3f.html">Tuple3f</A> tuple)</CODE><BR> Constructs a new GVector and copies the initial values from the specified tuple.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(javax.vecmath.Tuple4d)">GVector</A></B>(<A HREF="../../javax/vecmath/Tuple4d.html">Tuple4d</A> tuple)</CODE><BR> Constructs a new GVector and copies the initial values from the specified tuple.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#GVector(javax.vecmath.Tuple4f)">GVector</A></B>(<A HREF="../../javax/vecmath/Tuple4f.html">Tuple4f</A> tuple)</CODE><BR> Constructs a new GVector and copies the initial values from the specified tuple.</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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#add(javax.vecmath.GVector)">add</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> vector)</CODE><BR> Sets the value of this vector to sum of itself and the specified vector</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="../../javax/vecmath/GVector.html#add(javax.vecmath.GVector, javax.vecmath.GVector)">add</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> vector1, <A HREF="../../javax/vecmath/GVector.html">GVector</A> vector2)</CODE><BR> Sets the value of this vector to the vector sum of vectors vector1 and vector2.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#angle(javax.vecmath.GVector)">angle</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1)</CODE><BR> Returns the (n-space) angle in radians between this vector and the vector parameter; the return value is constrained to the range [0,PI].</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="../../javax/vecmath/GVector.html#clone()">clone</A></B>()</CODE><BR> Creates a new object of the same class as this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#dot(javax.vecmath.GVector)">dot</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1)</CODE><BR> Returns the dot product of this vector and vector v1.</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="../../javax/vecmath/GVector.html#epsilonEquals(javax.vecmath.GVector, double)">epsilonEquals</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1, double epsilon)</CODE><BR> Returns true if the L-infinite distance between this vector and vector v1 is less than or equal to the epsilon parameter, otherwise returns false.</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="../../javax/vecmath/GVector.html#equals(javax.vecmath.GVector)">equals</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> vector1)</CODE><BR> Returns true if all of the data members of GVector vector1 are equal to the corresponding data members in this GVector.</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="../../javax/vecmath/GVector.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object o1)</CODE><BR> Returns true if the Object o1 is of type GMatrix and all of the data members of o1 are equal to the corresponding data members in this GMatrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#getElement(int)">getElement</A></B>(int index)</CODE><BR> Retrieves the value at the specified index value of this vector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#getSize()">getSize</A></B>()</CODE><BR> Returns the number of elements in this vector.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../javax/vecmath/GVector.html#hashCode()">hashCode</A></B>()</CODE><BR> Returns a hash code value based on the data values in this object.</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="../../javax/vecmath/GVector.html#interpolate(javax.vecmath.GVector, double)">interpolate</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1, double alpha)</CODE><BR> Linearly interpolates between this vector and vector v1 and places the result into this tuple: this = (1-alpha)*this + alpha*v1.</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="../../javax/vecmath/GVector.html#interpolate(javax.vecmath.GVector, float)">interpolate</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1, float alpha)</CODE><BR> <B>Deprecated.</B> <I>Use interpolate(GVector, double) instead</I></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="../../javax/vecmath/GVector.html#interpolate(javax.vecmath.GVector, javax.vecmath.GVector, double)">interpolate</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1, <A HREF="../../javax/vecmath/GVector.html">GVector</A> v2, double alpha)</CODE><BR> Linearly interpolates between vectors v1 and v2 and places the result into this tuple: this = (1-alpha)*v1 + alpha*v2.</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="../../javax/vecmath/GVector.html#interpolate(javax.vecmath.GVector, javax.vecmath.GVector, float)">interpolate</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1, <A HREF="../../javax/vecmath/GVector.html">GVector</A> v2, float alpha)</CODE><BR> <B>Deprecated.</B> <I>Use interpolate(GVector, GVector, double) instead</I></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="../../javax/vecmath/GVector.html#LUDBackSolve(javax.vecmath.GMatrix, javax.vecmath.GVector, javax.vecmath.GVector)">LUDBackSolve</A></B>(<A HREF="../../javax/vecmath/GMatrix.html">GMatrix</A> LU, <A HREF="../../javax/vecmath/GVector.html">GVector</A> b, <A HREF="../../javax/vecmath/GVector.html">GVector</A> permutation)</CODE><BR> LU Decomposition Back Solve; this method takes the LU matrix and the permutation vector produced by the GMatrix method LUD and solves the equation (LU)*x = b by placing the solution vector x into this vector.</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="../../javax/vecmath/GVector.html#mul(javax.vecmath.GMatrix, javax.vecmath.GVector)">mul</A></B>(<A HREF="../../javax/vecmath/GMatrix.html">GMatrix</A> m1, <A HREF="../../javax/vecmath/GVector.html">GVector</A> v1)</CODE><BR> Multiplies matrix m1 times Vector v1 and places the result into this vector (this = m1*v1).</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="../../javax/vecmath/GVector.html#mul(javax.vecmath.GVector, javax.vecmath.GMatrix)">mul</A></B>(<A HREF="../../javax/vecmath/GVector.html">GVector</A> v1, <A HREF="../../javax/vecmath/GMatrix.html">GMatrix</A> m1)</CODE><BR> Multiplies the transpose of vector v1 (ie, v1 becomes a row vector with respect to the multiplication) times matrix m1 and places the result into this vector (this = transpose(v1)*m1).</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="../../javax/vecmath/GVector.html#negate()">negate</A></B>()</CODE><BR> Negates the value of this vector: this = -this.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -