⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orbitbehavior.html

📁 这是一个JAVA的代码
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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 Fri Apr 18 11:16:53 PDT 2003 --><TITLE>OrbitBehavior (Java 3D API)</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"></HEAD><SCRIPT>function asd(){parent.document.title="OrbitBehavior (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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.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>  &nbsp;&nbsp;<A HREF="OrbitBehavior.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF 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  |  +--<A HREF="../../../../../../javax/media/j3d/SceneGraphObject.html">javax.media.j3d.SceneGraphObject</A>        |        +--<A HREF="../../../../../../javax/media/j3d/Node.html">javax.media.j3d.Node</A>              |              +--<A HREF="../../../../../../javax/media/j3d/Leaf.html">javax.media.j3d.Leaf</A>                    |                    +--<A HREF="../../../../../../javax/media/j3d/Behavior.html">javax.media.j3d.Behavior</A>                          |                          +--<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html">com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior</A>                                |                                +--<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html">com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior</A>                                      |                                      +--<B>com.sun.j3d.utils.behaviors.vp.OrbitBehavior</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.util.EventListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener</DD></DL><HR><DL><DT>public class <B>OrbitBehavior</B><DT>extends <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html">ViewPlatformAWTBehavior</A></DL><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. <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><DD>Java 3D 1.2.1</DD></DD></DL><HR><P><!-- ======== NESTED 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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor flag to disable rotate</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor flag to disable translate</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor flag to disable zoom</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor flag to reverse the zoom behavior</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/OrbitBehavior.html#STOP_ZOOM">STOP_ZOOM</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor flag that indicates zoom should stop when it reaches the minimum orbit radius set by setMinRadius().</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_com.sun.j3d.utils.behaviors.vp.ViewPlatformAWTBehavior"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class com.sun.j3d.utils.behaviors.vp.<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html">ViewPlatformAWTBehavior</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#canvases">canvases</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#frameWakeup">frameWakeup</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#KEY_LISTENER">KEY_LISTENER</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#motion">motion</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#MOUSE_LISTENER">MOUSE_LISTENER</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#MOUSE_MOTION_LISTENER">MOUSE_MOTION_LISTENER</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#POST_ID">POST_ID</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#postWakeup">postWakeup</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformAWTBehavior.html#targetTransform">targetTransform</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_com.sun.j3d.utils.behaviors.vp.ViewPlatformBehavior"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class com.sun.j3d.utils.behaviors.vp.<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html">ViewPlatformBehavior</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html#homeTransform">homeTransform</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html#targetTG">targetTG</A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html#vp">vp</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_javax.media.j3d.Node"><!-- --></A>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -