📄 orbitbehavior.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:11 PST 2006 --><TITLE>OrbitBehavior (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.behaviors.vp.OrbitBehavior class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="OrbitBehavior (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"> PREV CLASS <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html" title="class in com.sun.j3d.utils.behaviors.vp"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html" target="_top"><B>FRAMES</B></A> <A HREF="OrbitBehavior.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">com.sun.j3d.utils.behaviors.vp</FONT><BR>Class OrbitBehavior</H2><PRE>java.lang.Object <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../javax/media/j3d/SceneGraphObject.html" title="class in javax.media.j3d">javax.media.j3d.SceneGraphObject</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../javax/media/j3d/Node.html" title="class in javax.media.j3d">javax.media.j3d.Node</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../javax/media/j3d/Leaf.html" title="class in javax.media.j3d">javax.media.j3d.Leaf</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../javax/media/j3d/Behavior.html" title="class in javax.media.j3d">javax.media.j3d.Behavior</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html" title="class in com.sun.j3d.utils.behaviors.vp">com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html" title="class in com.sun.j3d.utils.behaviors.vp">com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior</A> <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.sun.j3d.utils.behaviors.vp.OrbitBehavior</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener</DD></DL><HR><DL><DT><PRE>public class <B>OrbitBehavior</B><DT>extends <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html" title="class in com.sun.j3d.utils.behaviors.vp">ViewPlatformAWTBehavior</A></DL></PRE><P>Moves the View around a point of interest when the mouse is dragged with a mouse button pressed. Includes rotation, zoom, and translation actions. Zooming can also be obtained by using mouse wheel. <p> This behavior must be added to the ViewingPlatform using the <code>ViewingPlatform.setViewPlatformBehavior</code> method. <p> The rotate action rotates the ViewPlatform around the point of interest when the mouse is moved with the main mouse button pressed. The rotation is in the direction of the mouse movement, with a default rotation of 0.01 radians for each pixel of mouse movement. <p> The zoom action moves the ViewPlatform closer to or further from the point of interest when the mouse is moved with the middle mouse button pressed (or Alt-main mouse button on systems without a middle mouse button). The default zoom action is to translate the ViewPlatform 0.01 units for each pixel of mouse movement. Moving the mouse up moves the ViewPlatform closer, moving the mouse down moves the ViewPlatform further away. <p> By default, the zoom action allows the ViewPlatform to move through the center of rotation to orbit at a negative radius. The <code>STOP_ZOOM</code> constructor flag will stop the ViewPlatform at a minimum radius from the center. The default minimum radius is 0.0 and can be set using the <code>setMinRadius</code> method. <p> The <code>PROPORTIONAL_ZOOM</code> constructor flag changes the zoom action to move the ViewPlatform proportional to its distance from the center of rotation. For this mode, the default action is to move the ViewPlatform by 1% of its distance from the center of rotation for each pixel of mouse movement. <p> The translate action translates the ViewPlatform when the mouse is moved with the right mouse button pressed (Shift-main mouse button on systems without a right mouse button). The translation is in the direction of the mouse movement, with a default translation of 0.01 units for each pixel of mouse movement. <p> The sensitivity of the actions can be scaled using the <code>set</code><i>Action</i><code>Factor()</code> methods which scale the default movement by the factor. The rotate and translate actions have separate factors for x and y. <p> The actions can be reversed using the <code>REVERSE_</code><i>ACTION</i> constructor flags. The default action moves the ViewPlatform around the objects in the scene. The <code>REVERSE_</code><i>ACTION</i> flags can make the objects in the scene appear to be moving in the direction of the mouse movement. <p> The actions can be disabled by either using the <code>DISABLE_</code><i>ACTION</i> constructor flags or the <code>set</code><i>Action</i><code>Enable</code> methods. <p> The default center of rotation is (0, 0, 0) and can be set using the <code>setRotationCenter()</code> method.<P><P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2.1</DD></DL><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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#DISABLE_ROTATE">DISABLE_ROTATE</A></B></CODE><BR> Constructor flag to disable rotate</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#DISABLE_TRANSLATE">DISABLE_TRANSLATE</A></B></CODE><BR> Constructor flag to disable translate</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#DISABLE_ZOOM">DISABLE_ZOOM</A></B></CODE><BR> Constructor flag to disable zoom</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#PROPORTIONAL_ZOOM">PROPORTIONAL_ZOOM</A></B></CODE><BR> Constructor flag to use proportional zoom, which determines how much you zoom based on view's distance from the center of rotation.</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#REVERSE_ALL">REVERSE_ALL</A></B></CODE><BR> Constructor flag to reverse all the behaviors</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#REVERSE_ROTATE">REVERSE_ROTATE</A></B></CODE><BR> Constructor flag to reverse the rotate behavior</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#REVERSE_TRANSLATE">REVERSE_TRANSLATE</A></B></CODE><BR> Constructor flag to reverse the translate behavior</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="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#REVERSE_ZOOM">REVERSE_ZOOM</A></B></CODE><BR> Constructor flag to reverse the zoom behavior</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -