📄 alpha.html
字号:
accepts the following values, INCREASING_ENABLE or DECREASING_ENABLE, which may be ORed together to specify that both are active. The increasing alpha parameters are increasingAlphaDuration, increasingAlphaRampDuration, and alphaAtOneDuration. The decreasing alpha parameters are decreasingAlphaDuration, decreasingAlphaRampDuration, and alphaAtZeroDuration.<DD><CODE>triggerTime</CODE> - time in milliseconds since the start time that this object first triggers<DD><CODE>phaseDelayDuration</CODE> - number of milliseconds to wait after triggerTime before actually starting this alpha<DD><CODE>increasingAlphaDuration</CODE> - period of time during which alpha goes from zero to one<DD><CODE>increasingAlphaRampDuration</CODE> - period of time during which the alpha step size increases at the beginning of the increasingAlphaDuration and, correspondingly, decreases at the end of the increasingAlphaDuration. This value is clamped to half of increasingAlphaDuration. NOTE: a value of zero means that the alpha step size remains constant during the entire increasingAlphaDuration.<DD><CODE>alphaAtOneDuration</CODE> - period of time that alpha stays at one<DD><CODE>decreasingAlphaDuration</CODE> - period of time during which alpha goes from one to zero<DD><CODE>decreasingAlphaRampDuration</CODE> - period of time during which the alpha step size increases at the beginning of the decreasingAlphaDuration and, correspondingly, decreases at the end of the decreasingAlphaDuration. This value is clamped to half of decreasingAlphaDuration. NOTE: a value of zero means that the alpha step size remains constant during the entire decreasingAlphaDuration.<DD><CODE>alphaAtZeroDuration</CODE> - period of time that alpha stays at zero</DL></DL><HR><A NAME="Alpha(int, long, long, long, long, long)"><!-- --></A><H3>Alpha</H3><PRE>public <B>Alpha</B>(int loopCount, long triggerTime, long phaseDelayDuration, long increasingAlphaDuration, long increasingAlphaRampDuration, long alphaAtOneDuration)</PRE><DL><DD>Constructs a new Alpha object that assumes that the mode is INCREASING_ENABLE.<P><DL><DT><B>Parameters:</B><DD><CODE>loopCount</CODE> - number of times to run this alpha; a value of -1 specifies that the alpha loops indefinitely.<DD><CODE>triggerTime</CODE> - time in milliseconds since the start time that this object first triggers<DD><CODE>phaseDelayDuration</CODE> - number of milliseconds to wait after triggerTime before actually starting this alpha<DD><CODE>increasingAlphaDuration</CODE> - period of time during which alpha goes from zero to one<DD><CODE>increasingAlphaRampDuration</CODE> - period of time during which the alpha step size increases at the beginning of the increasingAlphaDuration and, correspondingly, decreases at the end of the increasingAlphaDuration. This value is clamped to half of increasingAlphaDuration. NOTE: a value of zero means that the alpha step size remains constant during the entire increasingAlphaDuration.<DD><CODE>alphaAtOneDuration</CODE> - period of time that alpha stays at one</DL></DL><HR><A NAME="Alpha(int, long)"><!-- --></A><H3>Alpha</H3><PRE>public <B>Alpha</B>(int loopCount, long increasingAlphaDuration)</PRE><DL><DD>This constructor takes only the loopCount and increasingAlphaDuration as parameters and assigns the default values to all of the other parameters.<P><DL><DT><B>Parameters:</B><DD><CODE>loopCount</CODE> - number of times to run this alpha; a value of -1 specifies that the alpha loops indefinitely<DD><CODE>increasingAlphaDuration</CODE> - period of time during which alpha goes from zero to one</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="pause()"><!-- --></A><H3>pause</H3><PRE>public void <B>pause</B>()</PRE><DL><DD>Pauses this alpha object. The current system time when this method is called will be used in place of the actual current time when calculating subsequent alpha values. This has the effect of freezing the interpolator at the time the method is called.<P><DD><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="pause(long)"><!-- --></A><H3>pause</H3><PRE>public void <B>pause</B>(long time)</PRE><DL><DD>Pauses this alpha object as of the specified time. The specified time will be used in place of the actual current time when calculating subsequent alpha values. This has the effect of freezing the interpolator at the specified time. Note that specifying a time in the future (that is, a time greater than System.currentTimeMillis()) will cause the alpha to immediately advance to that point before pausing. Similarly, specifying a time in the past (that is, a time less than System.currentTimeMillis()) will cause the alpha to immediately revert to that point before pausing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - the time at which to pause the alpha<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if time <= 0<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="resume()"><!-- --></A><H3>resume</H3><PRE>public void <B>resume</B>()</PRE><DL><DD>Resumes this alpha object. If the alpha object was paused, the difference between the current time and the pause time will be used to adjust the startTime of this alpha. The equation is as follows: <ul> <code>startTime += System.currentTimeMillis() - pauseTime</code> </ul> Since the alpha object is no longer paused, this has the effect of resuming the interpolator as of the current time. If the alpha object is not paused when this method is called, then this method does nothing--the start time is not adjusted in this case.<P><DD><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="resume(long)"><!-- --></A><H3>resume</H3><PRE>public void <B>resume</B>(long time)</PRE><DL><DD>Resumes this alpha object as of the specified time. If the alpha object was paused, the difference between the specified time and the pause time will be used to adjust the startTime of this alpha. The equation is as follows: <ul><code>startTime += time - pauseTime</code></ul> Since the alpha object is no longer paused, this has the effect of resuming the interpolator as of the specified time. If the alpha object is not paused when this method is called, then this method does nothing--the start time is not adjusted in this case.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - the time at which to resume the alpha<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if time <= 0<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="isPaused()"><!-- --></A><H3>isPaused</H3><PRE>public boolean <B>isPaused</B>()</PRE><DL><DD>Returns true if this alpha object is paused.<P><DD><DL><DT><B>Returns:</B><DD>true if this alpha object is paused, false otherwise<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="getPauseTime()"><!-- --></A><H3>getPauseTime</H3><PRE>public long <B>getPauseTime</B>()</PRE><DL><DD>Returns the time at which this alpha was paused.<P><DD><DL><DT><B>Returns:</B><DD>the pause time; returns 0 if this alpha is not paused<DT><B>Since:</B></DT> <DD>Java 3D 1.3</DD></DL></DD></DL><HR><A NAME="value()"><!-- --></A><H3>value</H3><PRE>public float <B>value</B>()</PRE><DL><DD>This method returns a value between 0.0 and 1.0 inclusive, based on the current time and the time-to-alpha parameters established for this alpha. If this alpha object is paused, the value will be based on the pause time rather than the current time. This method will return the starting alpha value if the alpha has not yet started (that is, if the current time is less than startTime + triggerTime + phaseDelayDuration). This method will return the ending alpha value if the alpha has finished (that is, if the loop count has expired).<P><DD><DL><DT><B>Returns:</B><DD>a value between 0.0 and 1.0 based on the current time</DL></DD></DL><HR><A NAME="value(long)"><!-- --></A><H3>value</H3><PRE>public float <B>value</B>(long atTime)</PRE><DL><DD>This method returns a value between 0.0 and 1.0 inclusive, based on the specified time and the time-to-alpha parameters established for this alpha. This method will return the starting alpha value if the alpha has not yet started (that is, if the specified time is less than startTime + triggerTime + phaseDelayDuration). This method will return the ending alpha value if the alpha has finished (that is, if the loop count has expired).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>atTime</CODE> - The time for which we wish to compute alpha<DT><B>Returns:</B><DD>a value between 0.0 and 1.0 based on the specified time</DL></DD></DL><HR><A NAME="getStartTime()"><!-- --></A><H3>getStartTime</H3><PRE>public long <B>getStartTime</B>()</PRE><DL><DD>Retrieves this alpha's startTime, the base for all relative time specifications; the default value for startTime is the system start time.<P><DD><DL><DT><B>Returns:</B><DD>this alpha's startTime.</DL></DD></DL><HR><A NAME="setStartTime(long)"><!-- --></A><H3>setStartTime</H3><PRE>public void <B>setStartTime</B>(long startTime)</PRE><DL><DD>Sets this alpha's startTime to that specified in the argument; startTime sets the base (or zero) for all relative time computations; the default value for startTime is the system start time.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>startTime</CODE> - the new startTime value</DL></DD></DL><HR><A NAME="getLoopCount()"><!-- --></A><H3>getLoopCount</H3><PRE>public int <B>getLoopCount</B>()</PRE><DL><DD>Retrieves this alpha's loopCount.<P><DD><DL><DT><B>Returns:</B><DD>this alpha's loopCount.</DL></DD></DL><HR><A NAME="setLoopCount(int)"><!-- --></A><H3>setLoopCount</H3><PRE>public void <B>setLoopCount</B>(int loopCount)</PRE><DL><DD>Set this alpha's loopCount to that specified in the argument.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>loopCount</CODE> - the new loopCount value</DL></DD></DL><HR><A NAME="getMode()"><!-- --></A><H3>getMode</H3><PRE>public int <B>getMode</B>()</PRE><DL><DD>Retrieves this alpha's mode.<P><DD><DL><DT><B>Returns:</B><DD>this alpha's mode: any combination of INCREASING_ENABLE and DECREASING_ENABLE</DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -