📄 transform3d.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:07 PST 2006 --><TITLE>Transform3D (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.Transform3D class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Transform3D (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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/media/j3d/TextureUnitState.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/TransformGroup.html" title="class in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/media/j3d/Transform3D.html" target="_top"><B>FRAMES</B></A> <A HREF="Transform3D.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <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><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class Transform3D</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.media.j3d.Transform3D</B></PRE><HR><DL><DT><PRE>public class <B>Transform3D</B><DT>extends java.lang.Object</DL></PRE><P>A generalized transform object represented internally as a 4x4 double-precision floating point matrix. The mathematical representation is row major, as in traditional matrix mathematics. A Transform3D is used to perform translations, rotations, and scaling and shear effects.<P> A transform has an associated type, and all type classification is left to the Transform3D object. A transform will typically have multiple types, unless it is a general, unclassifiable matrix, in which case it won't be assigned a type. <P> The Transform3D type is internally computed when the transform object is constructed and updated any time it is modified. A matrix will typically have multiple types. For example, the type associated with an identity matrix is the result of ORing all of the types, except for ZERO and NEGATIVE_DETERMINANT, together. There are public methods available to get the ORed type of the transformation, the sign of the determinant, and the least general matrix type. The matrix type flags are defined as follows:<P> <UL> <LI>ZERO - zero matrix. All of the elements in the matrix have the value 0.</LI><P> <LI>IDENTITY - identity matrix. A matrix with ones on its main diagonal and zeros every where else.</LI><P> <LI>SCALE - the matrix is a uniform scale matrix - there are no rotational or translation components.</LI><P> <LI>ORTHOGONAL - the four row vectors that make up an orthogonal matrix form a basis, meaning that they are mutually orthogonal. The scale is unity and there are no translation components.</LI><P> <LI>RIGID - the upper 3 X 3 of the matrix is orthogonal, and there is a translation component-the scale is unity.</LI><P> <LI>CONGRUENT - this is an angle- and length-preserving matrix, meaning that it can translate, rotate, and reflect about an axis, and scale by an amount that is uniform in all directions. These operations preserve the distance between any two points, and the angle between any two intersecting lines.</LI><P> <LI>AFFINE - an affine matrix can translate, rotate, reflect, scale anisotropically, and shear. Lines remain straight, and parallel lines remain parallel, but the angle between intersecting lines can change.</LI><P> </UL> A matrix is also classified by the sign of its determinant:<P> <UL> NEGATIVE_DETERMINANT - this matrix has a negative determinant. An orthogonal matrix with a positive determinant is a rotation matrix. An orthogonal matrix with a negative determinant is a reflection and rotation matrix.<P></UL> The Java 3D model for 4 X 4 transformations is:<P> <UL><pre> [ m00 m01 m02 m03 ] [ x ] [ x' ] [ m10 m11 m12 m13 ] . [ y ] = [ y' ] [ m20 m21 m22 m23 ] [ z ] [ z' ] [ m30 m31 m32 m33 ] [ w ] [ w' ] x' = m00 . x+m01 . y+m02 . z+m03 . w y' = m10 . x+m11 . y+m12 . z+m13 . w z' = m20 . x+m21 . y+m22 . z+m23 . w w' = m30 . x+m31 . y+m32 . z+m33 . w </pre></ul><P> Note: When transforming a Point3f or a Point3d, the input w is set to 1. When transforming a Vector3f or Vector3d, the input w is set to 0.<P><P><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></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="../../../javax/media/j3d/Transform3D.html#AFFINE">AFFINE</A></B></CODE><BR> An affine matrix can translate, rotate, reflect, scale anisotropically, and shear.</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="../../../javax/media/j3d/Transform3D.html#CONGRUENT">CONGRUENT</A></B></CODE><BR> This is an angle and length preserving matrix, meaning that it can translate, rotate, and reflect about an axis, and scale by an amount that is uniform in all directions.</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="../../../javax/media/j3d/Transform3D.html#IDENTITY">IDENTITY</A></B></CODE><BR> An identity matrix.</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="../../../javax/media/j3d/Transform3D.html#NEGATIVE_DETERMINANT">NEGATIVE_DETERMINANT</A></B></CODE><BR> This matrix has a negative determinant; an orthogonal matrix with a positive determinant is a rotation matrix; an orthogonal matrix with a negative determinant is a reflection and rotation matrix.</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="../../../javax/media/j3d/Transform3D.html#ORTHOGONAL">ORTHOGONAL</A></B></CODE><BR> The four row vectors that make up an orthogonal matrix form a basis, meaning that they are mutually orthogonal; an orthogonal matrix with positive determinant is a pure rotation matrix; a negative determinant indicates a rotation and a reflection.</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="../../../javax/media/j3d/Transform3D.html#RIGID">RIGID</A></B></CODE><BR> This matrix is a rotation and a translation with unity scale; The upper 3x3 of the matrix is orthogonal, and there is a translation component.</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="../../../javax/media/j3d/Transform3D.html#SCALE">SCALE</A></B></CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -