📄 behavior.html
字号:
<DD><DL><DT><B>Parameters:</B><DD><CODE>region</CODE> - the bounding leaf node used to specify the Behavior node's new scheduling region</DL></DD></DL><HR><A NAME="getSchedulingBoundingLeaf()"><!-- --></A><H3>getSchedulingBoundingLeaf</H3><PRE>public <A HREF="../../../javax/media/j3d/BoundingLeaf.html" title="class in javax.media.j3d">BoundingLeaf</A> <B>getSchedulingBoundingLeaf</B>()</PRE><DL><DD>Retrieves the Behavior node's scheduling bounding leaf.<P><DD><DL><DT><B>Returns:</B><DD>this Behavior's scheduling bounding leaf information</DL></DD></DL><HR><A NAME="wakeupOn(javax.media.j3d.WakeupCondition)"><!-- --></A><H3>wakeupOn</H3><PRE>protected void <B>wakeupOn</B>(<A HREF="../../../javax/media/j3d/WakeupCondition.html" title="class in javax.media.j3d">WakeupCondition</A> criteria)</PRE><DL><DD>Defines this behavior's wakeup criteria. This method may only be called from a Behavior object's initialize or processStimulus methods to (re)arm the next wakeup. It should be the last thing done by those methods.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>criteria</CODE> - the wakeup criteria for this behavior<DT><B>Throws:</B><DD><CODE>java.lang.IllegalStateException</CODE> - if this method is called by a method <i>other than</i> initialize or processStimulus</DL></DD></DL><HR><A NAME="getWakeupCondition()"><!-- --></A><H3>getWakeupCondition</H3><PRE>protected <A HREF="../../../javax/media/j3d/WakeupCondition.html" title="class in javax.media.j3d">WakeupCondition</A> <B>getWakeupCondition</B>()</PRE><DL><DD>Retrieves this behavior's current wakeup condition as set by the wakeupOn method. If no wakeup condition is currently active, null will be returned. In particular, this means that null will be returned if Java 3D is executing this behavior's processStimulus routine and wakeupOn has not yet been called to re-arm the wakeup condition for next time.<P><DD><DL><DT><B>Returns:</B><DD>the current wakeup condition for this behavior<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="postId(int)"><!-- --></A><H3>postId</H3><PRE>public void <B>postId</B>(int postId)</PRE><DL><DD>Posts the specified postId to the Behavior Scheduler. All behaviors that have registered WakeupOnBehaviorPost with this postId, or a postId of 0, and with this behavior, or a null behavior, will have that wakeup condition met. <p> This feature allows applications to send arbitrary events into the behavior scheduler stream. It can be used as a notification scheme for communicating events to behaviors in the system. </p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>postId</CODE> - the Id being posted<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/WakeupOnBehaviorPost.html" title="class in javax.media.j3d"><CODE>WakeupOnBehaviorPost</CODE></A></DL></DD></DL><HR><A NAME="setEnable(boolean)"><!-- --></A><H3>setEnable</H3><PRE>public void <B>setEnable</B>(boolean state)</PRE><DL><DD>Enables or disables this Behavior. The default state is enabled.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>state</CODE> - true or false to enable or disable this Behavior</DL></DD></DL><HR><A NAME="getEnable()"><!-- --></A><H3>getEnable</H3><PRE>public boolean <B>getEnable</B>()</PRE><DL><DD>Retrieves the state of the Behavior enable flag.<P><DD><DL><DT><B>Returns:</B><DD>the Behavior enable state</DL></DD></DL><HR><A NAME="getNumSchedulingIntervals()"><!-- --></A><H3>getNumSchedulingIntervals</H3><PRE>public static int <B>getNumSchedulingIntervals</B>()</PRE><DL><DD>Returns the number of scheduling intervals supported by this implementation of Java 3D. The minimum number of supported intervals must be at least 10. The default scheduling interval for each behavior instance is set to <code>numSchedulingIntervals / 2</code>.<P><DD><DL><DT><B>Returns:</B><DD>the number of supported scheduling intervals<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="setSchedulingInterval(int)"><!-- --></A><H3>setSchedulingInterval</H3><PRE>public void <B>setSchedulingInterval</B>(int schedulingInterval)</PRE><DL><DD>Sets the scheduling interval of this Behavior node to the specified value. The scheduling interval defines a partial order of execution for behaviors that wake up in response to the same wakeup condition (that is, those behaviors that are processed at the same "time"). Given a set of behaviors whose wakeup conditions are satisfied at the same time, the behavior scheduler will execute all behaviors in a lower scheduling interval before executing any behavior in a higher scheduling interval. Within a scheduling interval, behaviors can be executed in any order, or in parallel. Note that this partial ordering is only guaranteed for those behaviors that wake up at the same time in response to the same wakeup condition, for example, the set of behaviors that wake up every frame in response to a WakeupOnElapsedFrames(0) wakeup condition. The default value is <code>numSchedulingIntervals / 2</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>schedulingInterval</CODE> - the new scheduling interval<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>schedulingInterval</code> < 0 or <code>schedulingInterval</code> >= <code>numSchedulingIntervals</code><DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="getSchedulingInterval()"><!-- --></A><H3>getSchedulingInterval</H3><PRE>public int <B>getSchedulingInterval</B>()</PRE><DL><DD>Retrieves the current scheduling interval of this Behavior node.<P><DD><DL><DT><B>Returns:</B><DD>the current scheduling interval<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="getView()"><!-- --></A><H3>getView</H3><PRE>protected <A HREF="../../../javax/media/j3d/View.html" title="class in javax.media.j3d">View</A> <B>getView</B>()</PRE><DL><DD>Returns the primary view associated with this behavior. This method is useful with certain types of behaviors (e.g., Billboard, LOD) that rely on per-View information and with behaviors in general in regards to scheduling (the distance from the view platform determines the active behaviors). The "primary" view is defined to be the first View attached to a live ViewPlatform, if there is more than one active View. So, for instance, Billboard behaviors would be oriented toward this primary view, in the case of multiple active views into the same scene graph.<P><DD><DL></DL></DD></DL><HR><A NAME="updateNodeReferences(javax.media.j3d.NodeReferenceTable)"><!-- --></A><H3>updateNodeReferences</H3><PRE>public void <B>updateNodeReferences</B>(<A HREF="../../../javax/media/j3d/NodeReferenceTable.html" title="class in javax.media.j3d">NodeReferenceTable</A> referenceTable)</PRE><DL><DD>Callback used to allow a node to check if any scene graph objects referenced by that node have been duplicated via a call to <code>cloneTree</code>. This method is called by <code>cloneTree</code> after all nodes in the sub-graph have been duplicated. The cloned Leaf node's method will be called and the Leaf node can then look up any object references by using the <code>getNewObjectReference</code> method found in the <code>NodeReferenceTable</code> object. If a match is found, a reference to the corresponding object in the newly cloned sub-graph is returned. If no corresponding reference is found, either a DanglingReferenceException is thrown or a reference to the original object is returned depending on the value of the <code>allowDanglingReferences</code> parameter passed in the <code>cloneTree</code> call. <p> NOTE: Applications should <i>not</i> call this method directly. It should only be called by the cloneTree method.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../javax/media/j3d/SceneGraphObject.html#updateNodeReferences(javax.media.j3d.NodeReferenceTable)">updateNodeReferences</A></CODE> in class <CODE><A HREF="../../../javax/media/j3d/SceneGraphObject.html" title="class in javax.media.j3d">SceneGraphObject</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>referenceTable</CODE> - a NodeReferenceTableObject that contains the <code>getNewObjectReference</code> method needed to search for new object instances.<DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/NodeReferenceTable.html" title="class in javax.media.j3d"><CODE>NodeReferenceTable</CODE></A>, <A HREF="../../../javax/media/j3d/Node.html#cloneTree()"><CODE>Node.cloneTree()</CODE></A>, <A HREF="../../../javax/media/j3d/DanglingReferenceException.html" title="class in javax.media.j3d"><CODE>DanglingReferenceException</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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/BadTransformException.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/Billboard.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/Behavior.html" target="_top"><B>FRAMES</B></A> <A HREF="Behavior.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="#fields_inherited_from_class_javax.media.j3d.Node">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: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1">Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../LICENSE-SPEC.html">license terms</a>.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -