Kelvin,
This doesn't make sense.  The JavaDoc for "Alpha" says:

mode -- This can be set to INCREASING_ENABLE, DECREASING_ENABLE, or the
Or'ed value of the two. INCREASING_ENABLE activates the increasing Alpha
parameters listed below; DECREASING_ENABLE activates the decreasing
Alpha parameters listed below.

This DEFINITELY makes it sound that if I use "DECREASING_ENABLE", that
the 'increasing Alpha parameters' will be inactive.  I think the
computation of "stopTime" is wrong.

This also doesn't make sense because I was able to make the Alpha
transition from 1 to 0 several times during a single loop.  I am sure
that this is not the intended behavior of Alpha.

Are the any developers in "Java3D land" that expect this type of
behavior, and would be affected adversely if it was changed?

-Lee

> -----Original Message-----
> From: Kelvin Chung [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 06, 2001 4:51 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] Alpha: Setting mode does not disable use of
> increasingAlphaDurati on
>
>
> Hi Joel,
>
>    The stopTime of Alpha is equal to:
>
>   stopTime = triggerTime + phaseDelayDuration +
>              loopCount*  (increasingAlphaDuration+
>                           alphaAtOneDuration+
>                           decreasingAlphaDuration+
>                           alphaAtZeroDuration);
>
> When alpha is initialize as
>   Alpha a = new Alpha(1, 2000);
> the increasingAlphaDuration is set to 2 sec
> the decreasingAlphaDuration is set to 0 sec
> stop time is therefore 2 sec.
>
> After
>   a.setDecreasingAlphaDuration(1500);
>   a.setMode(Alpha.DECREASING_ENABLE);
>   a.setStartTime(System.currentTimeMillis());
>
> the decreasingAlphaDuration is 1.5 sec
> the above functions did not change increasingAlphaDuration
> which remains 2 sec. (The spec. did not mention
> that this will reset increasingAlphaDuration to 0)
> Thus stop time according to the formula is 3.5 sec
> which is correct behavior.
>
> That's why if we later set
> a.setIncreasingAlphaDuration(0);
> the stop time becomes 1.5 sec.
>
> Thanks.
>
> - Kelvin
> -----------
> Java 3D Team
> Sun Microsystems Inc.
>
>
> >MIME-Version: 1.0
> >Date: Tue, 6 Feb 2001 14:37:13 -0500
> >From: "J. Lee Dixon" <[EMAIL PROTECTED]>
> >Subject: [JAVA3D] Alpha: Setting mode does not disable use of
> increasingAlphaDurati on
> >Comments: To: "Java3DBugReporting (E-mail)" <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >
> >JDK 1.3, Java3D v1.2.1Beta1
> >
> >In my code, I use the same Alpha for doing a simple 2 second
> up-ramp (0
> >to 1)...
> >        Alpha a = new Alpha(1, 2000);
> >This works fine.
> >
> >... then later use the same object to do a simple 1.5sec
> down ramp (1 to
> >0)
> >        a.setDecreasingAlphaDuration(1500);
> >        a.setMode(Alpha.DECREASING_ENABLE);
> >        a.setStartTime(System.currentTimeMillis());
> >
> >This should disable the "increasing" parameters, but it doesn't.  The
> >alpha lasts for 3.5 seconds, going from 1 to 0 every 1.5 seconds and
> >jumping to 0 after 3.5 seconds.  I've included a snapshot of a graph
> >showing the trend, and the code used to generate the bug data.
> >
> >    WORKAROUND:
> >        a.setIncreasingAlphaDuration(0);
> >
> > <<graph.jpg>>  <<AlphaTest.java>>
> >
> >J. Lee Dixon
> >SAIC - Celebration, FL
> >407-566-1438
> >[EMAIL PROTECTED]    AOL: LeeOrlando
> >
>
> ==============================================================
> =============
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body
> of the message "signoff JAVA3D-INTEREST".  For general help,
> send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to