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

📄 wandviewbehavior.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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:12 PST 2006 --><TITLE>WandViewBehavior (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="com.sun.j3d.utils.behaviors.vp.WandViewBehavior class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="WandViewBehavior (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>&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;<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html" title="class in com.sun.j3d.utils.behaviors.vp"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.EchoReadListener6D.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/WandViewBehavior.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="WandViewBehavior.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&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><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 WandViewBehavior</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 "><B>com.sun.j3d.utils.behaviors.vp.WandViewBehavior</B></PRE><HR><DL><DT><PRE>public class <B>WandViewBehavior</B><DT>extends <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/ViewPlatformBehavior.html" title="class in com.sun.j3d.utils.behaviors.vp">ViewPlatformBehavior</A></DL></PRE><P>Manipulates view platform transforms using a motion-tracked wand or mouse equipped with a six degree of freedom (6DOF) sensor.  An optional two axis (2D) valuator sensor is also directly supported.  Default operation is set up to enable both direct manipulation of the view transform and translation back and forth along the direction the 6DOF sensor is pointing; rotation is handled by the 2D valuator if available.  An arbitrary number of sensors and action bindings can be customized by accessing this behavior's <code>SensorEventAgent</code> directly. <p> This behavior can be instantiated from the configuration file read by <code>ConfiguredUniverse</code> and fully configured using the <code>ViewPlatformBehaviorProperties</code> command to set the properties described below, but neither <code>ConfiguredUniverse</code> nor <code>SimpleUniverse</code> are required by this behavior.  Conventional <code>set</code> and <code>get</code> accessors are provided for configuring this behavior directly; these methods have the same names as the properties but are prefixed with <code>get</code> and <code>set</code>. Property values are spelled with mixed case strings while the corresponding constant field names for the conventional accessors are spelled with upper case strings and underscores. <p> <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#Sensor6D(java.lang.Object[])"><CODE>Sensor6D</CODE></A> is the 6DOF sensor to use.  This can also be set directly with the appropriate constructor.  This sensor must generate 6 degree of freedom position and orientation reads relative to the tracker base in physical units.  By default this behavior provides an echo for the 6DOF sensor which indicates its position and orientation in the virtual world; the echo attributes can be set by the <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#EchoType(java.lang.Object[])"><CODE>EchoType</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#EchoSize(java.lang.Object[])"><CODE>EchoSize</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#EchoColor(java.lang.Object[])"><CODE>EchoColor</CODE></A>, and <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#EchoTransparency(java.lang.Object[])"><CODE>EchoTransparency</CODE></A> properties.  See also the <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#NominalSensorRotation(java.lang.Object[])"><CODE>NominalSensorRotation</CODE></A> property, and the <code>setHotSpot</code> method of the <code>Sensor</code> class. <p> <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#Sensor2D(java.lang.Object[])"><CODE>Sensor2D</CODE></A> is an optional 2D valuator to use in conjunction with the 6DOF sensor.  This can be set directly with the appropriate constructor.  The valuator should generate X and Y reads ranging from [-1.0 .. +1.0], with a nominal (deadzone) value of 0.0.  The default configuration expects to find these values along the translation components of the read matrix, at indices 3 and 7, but these indices can be also be specified by the <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#MatrixIndices2D(java.lang.Object[])"><CODE>MatrixIndices2D</CODE></A> property. <p> <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#ButtonAction6D(java.lang.Object[])"><CODE>ButtonAction6D</CODE></A> sets an action for a specific button on a 6DOF sensor.  The actions available are: <ul> <li> <code>GrabView</code> - Directly manipulates the view platform by moving it in inverse response to the sensor's position and orientation, producing the effect of attaching the virtual world to the sensor's movements.  If a button is available then this action is bound to button 0 by default. </li> <li> <code>TranslateForward</code> - Translates the view platform forward along the direction the sensor is pointing; the virtual world appears to move towards the sensor.  The default is button 1 if two buttons are available. Related properties are <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#TranslationSpeed(java.lang.Object[])"><CODE>TranslationSpeed</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#AccelerationTime(java.lang.Object[])"><CODE>AccelerationTime</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#ConstantSpeedTime(java.lang.Object[])"><CODE>ConstantSpeedTime</CODE></A>, and <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#FastSpeedFactor(java.lang.Object[])"><CODE>FastSpeedFactor</CODE></A>. </li> <li> <code>TranslateBackward</code> - Translates the view platform backwards along the direction the sensor is pointing; the virtual world appears to move away from the sensor.  The default is button 2 if three buttons are available.  </li> <li> <code>RotateCCW</code> - Rotates the view platform counter-clockwise about a Y axis; the virtual world appears to rotate clockwise.  This action is not assigned by default.  Related properties are <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#RotationSpeed(java.lang.Object[])"><CODE>RotationSpeed</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#RotationCoords(java.lang.Object[])"><CODE>RotationCoords</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#TransformCenterSource(java.lang.Object[])"><CODE>TransformCenterSource</CODE></A>, <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#TransformCenter(java.lang.Object[])"><CODE>TransformCenter</CODE></A>, and <code>AccelerationTime</code>. </li> <li> <code>RotateCW</code> - Rotates the view platform clockwise about a Y axis; the virtual world appears to rotate counter-clockwise.  This action is not assigned by default. </li> <li> <code>ScaleUp</code> - Scales the view platform larger so that the virtual world appears to grow smaller.  This action is not assigned by default. Related properties are <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#ScaleSpeed(java.lang.Object[])"><CODE>ScaleSpeed</CODE></A>, <code>TransformCenterSource</code>, <code>TransformCenter</code>, and <code>AccelerationTime</code>. </li> <li> <code>ScaleDown</code> - Scales the view platform smaller so that the virtual world appears to grow larger.  This action is not assigned by default. </li> </ul> <p> <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#ReadAction2D(java.lang.Object[])"><CODE>ReadAction2D</CODE></A> sets the action bound to 2D valuator reads; that is, non-zero values generated by the device when no buttons have been pressed.  If the value is (0.0, 0.0) or below the threshold value set by <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#Threshold2D(java.lang.Object[])"><CODE>Threshold2D</CODE></A>, then this behavior does nothing; otherwise, the following actions can be performed: <ul> <li> <code>Rotation</code> - Rotates the view platform.  This is the default 2D valuator action set by this behavior. Related properties are <code>RotationSpeed</code>, <code>RotationCoords</code>, <code>TransformCenterSource</code>, and <code>TransformCenter</code>. </li> <li> <code>Translation</code> - Translates the view platform.  The translation occurs relative to the X and Z basis vectors of either the 6DOF sensor or the view platform if one is not available.  The maximum speed is equal to the product of the <code>TranslationSpeed</code> and <code>FastSpeedFactor</code> property values. </li> <li> <code>Scale</code> - Scales the view platform smaller with positive Y values and larger with negative Y values.  The effect is to increase the apparent size of the virtual world when pushing the valuator forwards and to decrease it when pushing backwards.  Related properties are <code>ScaleSpeed</code>, <code>TransformCenterSource</code>, and <code>TransformCenter</code>. </li> </ul> <p> <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#ButtonAction2D(java.lang.Object[])"><CODE>ButtonAction2D</CODE></A> sets an action for a specific button on the 2D valuator. The available actions are the same as for <code>ReadAction2D</code>.  No actions are bound by default to the 2D valuator buttons. <p> The view transform may be reset to its home transform by pressing a number of buttons simultaneously on the 6DOF sensor.  The minimum number of buttons that must be pressed is set by <A HREF="../../../../../../com/sun/j3d/utils/behaviors/vp/WandViewBehavior.html#ResetViewButtonCount6D(java.lang.Object[])"><CODE>ResetViewButtonCount6D</CODE></A>.  This value must be greater than one; the default

⌨️ 快捷键说明

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