All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.media.j3d.Alpha

java.lang.Object
   |
   +----java.media.j3d.Alpha

public class Alpha
extends Object
The Alpha class provides the necessary mechanism for converting time values into alpha values (values in the range [0.0, 1.0]).


Variable Index

 o DECREASING_ENABLE
Specifies that the decreasing component of the alpha is used
 o INCREASING_ENABLE
Specifies that the increasing component of the alpha is used.

Constructor Index

 o Alpha(int, int, long, long, long, long, long, long, long, long)
Constructs a new Alpha object using the specified parameters.

Method Index

 o finished()
Query to test if this alpha object is past its activity window--- if it has finished all its looping activity.
 o getAlphaAtOneDuration()
Retrieves this alpha's alphaAtOneDuration.
 o getAlphaAtZeroDuration()
Retrieves this alpha's alphaAtZeroDuration.
 o getDecreasingAlphaDuration()
Retrieves this alpha's decreasingAlphaDuration.
 o getDecreasingAlphaRampDuration()
Retrieves this alpha's decreasingAlphaRampDuration.
 o getIncreasingAlphaDuration()
Retrieves this alpha's increasingAlphaDuration.
 o getIncreasingAlphaRampDuration()
Retrieves this alpha's increasingAlphaRampDuration.
 o getLoopCount()
Retrieves this alpha's loopCount.
 o getMode()
Retrieves this alpha's mode.
 o getPhaseDelayDuration()
Retrieves this alpha's phaseDelayDuration.
 o getStartTime()
Retrieves this alpha's startTime, the base for all relative time specifications.
 o getTriggerTime()
Retrieves this alpha's triggerTime.
 o setAlphAtOneDuration(long)
Set this alpha's alphaAtOneDuration to that specified in the argument.
 o setAlphAtZeroDuration(long)
Set this alpha's alphaAtZeroDuration to that specified in the argument.
 o setDecreasingAlphaDuration(long)
Set this alpha's decreasingAlphaDuration to that specified in the argument.
 o setDecreasingAlphaRampDuration(long)
Set this alpha's decreasingAlphaRampDuration to that specified in the argument.
 o setIncreasingAlphaDuration(long)
Set this alpha's increasingAlphaDuration to that specified in the argument.
 o setIncreasingAlphaRampDuration(long)
Set this alpha's increasingAlphaRampDuration to that specified in the argument.
 o setLoopCount(int)
Set this alpha's loopCount to that specified in the argument.
 o setMode(int)
Set this alpha's mode to that specified in the argument.
 o setPhaseDelayDuration(long)
Set this alpha's phaseDelayDuration to that specified in the argument.
 o setStartTime(long)
Set this alpha's startTime to that specified in the argument.
 o setTriggerTime(long)
Set this alpha's triggerTime to that specified in the argument.
 o value()
This function returns a value between 0.0 and 1.0 inclusive, based on the current time and the time-to-alpha parameters established for this interpolator
 o value(long)
This function returns a value between 0.0 and 1.0 inclusive, based on the specified time and the time-to-alpha parameters established for this interpolator

Variables

 o INCREASING_ENABLE
 public static final int INCREASING_ENABLE
Specifies that the increasing component of the alpha is used.

 o DECREASING_ENABLE
 public static final int DECREASING_ENABLE
Specifies that the decreasing component of the alpha is used

Constructors

 o Alpha
 public Alpha(int loopCount,
              int mode,
              long triggerTime,
              long phaseDelayDuration,
              long increasingAlphaDuration,
              long increasingAlphaRampDuration,
              long alphaAtOneDuration,
              long decreasingAlphaDuration,
              long decreasingAlphaRampDuration,
              long alphaAtZeroDuration)
Constructs a new Alpha object using the specified parameters.

Parameters:
loopCount - number of times to run this alpha; a value of -1 specifies that the alpha loops indefinitely.
mode - indicates whether the increasing alpha parameters or the decreasing alpha parameters or both are active. This parameter 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.
triggerTime - time in milliseconds since the epoch (January 1, 1970 00:00:00 GMT) that this alpha triggers
phaseDelayDuration - number of milliseconds to wait after triggerTime before actually starting this alpha
increasingAlphaDuration - period of time during which alpha goes from zero to one
increasingAlphaRampDuration - 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.
alphaAtOneDuration - period of time that alpha stays at one
decreasingAlphaDuration - period of time during which alpha goes from one to zero
decreasingAlphaRampDuration - 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.
alphaAtZeroDuration - period of time that alpha stays at zero
Returns:
an alpha object or null, if user specified a alpha object that never generates a value (No mode specified).

Methods

 o value
 public float value()
This function returns a value between 0.0 and 1.0 inclusive, based on the current time and the time-to-alpha parameters established for this interpolator

Returns:
a value between 0.0 and 1.0 based on the current time
 o value
 public float value(long atTime)
This function returns a value between 0.0 and 1.0 inclusive, based on the specified time and the time-to-alpha parameters established for this interpolator

Parameters:
atTime - The time for which we wish to compute alpha
Returns:
a value between 0.0 and 1.0 based on the current time
 o getStartTime
 public long getStartTime()
Retrieves this alpha's startTime, the base for all relative time specifications.

Returns:
this alpha's startTime.
 o setStartTime
 public void setStartTime(long startTime)
Set this alpha's startTime to that specified in the argument. This sets the base (or zero) for all relative time computations

Parameters:
startTime - the new startTime value.
 o getLoopCount
 public int getLoopCount()
Retrieves this alpha's loopCount.

Returns:
this alpha's loopCount.
 o setLoopCount
 public void setLoopCount(int loopCount)
Set this alpha's loopCount to that specified in the argument.

Parameters:
loopCount - the new loopCount value.
 o getMode
 public int getMode()
Retrieves this alpha's mode.

Returns:
this alpha's mode: any combination of INCREASING_ENABLE and DECREASING_ENABLE
 o setMode
 public void setMode(int mode)
Set this alpha's mode to that specified in the argument.

Parameters:
mode - indicates whether the increasing alpha parameters or the decreasing alpha parameters or both are active. This parameter 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.
 o getTriggerTime
 public long getTriggerTime()
Retrieves this alpha's triggerTime.

Returns:
this alpha's triggerTime.
 o setTriggerTime
 public void setTriggerTime(long triggerTime)
Set this alpha's triggerTime to that specified in the argument.

Parameters:
triggerTime - the new triggerTime
 o getPhaseDelayDuration
 public long getPhaseDelayDuration()
Retrieves this alpha's phaseDelayDuration.

Returns:
this alpha's phaseDelayDuration.
 o setPhaseDelayDuration
 public void setPhaseDelayDuration(long phaseDelayDuration)
Set this alpha's phaseDelayDuration to that specified in the argument.

Parameters:
phaseDelayDuration - the new phaseDelayDuration
 o getIncreasingAlphaDuration
 public long getIncreasingAlphaDuration()
Retrieves this alpha's increasingAlphaDuration.

Returns:
this alpha's increasingAlphaDuration.
 o setIncreasingAlphaDuration
 public void setIncreasingAlphaDuration(long increasingAlphaDuration)
Set this alpha's increasingAlphaDuration to that specified in the argument.

Parameters:
increasingAlphaDuration - the new increasingAlphaDuration
 o getIncreasingAlphaRampDuration
 public long getIncreasingAlphaRampDuration()
Retrieves this alpha's increasingAlphaRampDuration.

Returns:
this alpha's increasingAlphaRampDuration.
 o setIncreasingAlphaRampDuration
 public void setIncreasingAlphaRampDuration(long increasingAlphaRampDuration)
Set this alpha's increasingAlphaRampDuration to that specified in the argument.

Parameters:
increasingAlphaRampDuration - the new increasingAlphaRampDuration
 o getAlphaAtOneDuration
 public long getAlphaAtOneDuration()
Retrieves this alpha's alphaAtOneDuration.

Returns:
this alpha's alphaAtOneDuration.
 o setAlphAtOneDuration
 public void setAlphAtOneDuration(long alphaAtOneDuration)
Set this alpha's alphaAtOneDuration to that specified in the argument.

Parameters:
alphaAtOneDuration - the new alphaAtOneDuration
 o getDecreasingAlphaDuration
 public long getDecreasingAlphaDuration()
Retrieves this alpha's decreasingAlphaDuration.

Returns:
this alpha's decreasingAlphaDuration.
 o setDecreasingAlphaDuration
 public void setDecreasingAlphaDuration(long decreasingAlphaDuration)
Set this alpha's decreasingAlphaDuration to that specified in the argument.

Parameters:
decreasingAlphaDuration - the new decreasingAlphaDuration
 o getDecreasingAlphaRampDuration
 public long getDecreasingAlphaRampDuration()
Retrieves this alpha's decreasingAlphaRampDuration.

Returns:
this alpha's decreasingAlphaRampDuration.
 o setDecreasingAlphaRampDuration
 public void setDecreasingAlphaRampDuration(long decreasingAlphaRampDuration)
Set this alpha's decreasingAlphaRampDuration to that specified in the argument.

Parameters:
decreasingAlphaRampDuration - the new decreasingAlphaRampDuration
 o getAlphaAtZeroDuration
 public long getAlphaAtZeroDuration()
Retrieves this alpha's alphaAtZeroDuration.

Returns:
this alpha's alphaAtZeroDuration.
 o setAlphAtZeroDuration
 public void setAlphAtZeroDuration(long alphaAtZeroDuration)
Set this alpha's alphaAtZeroDuration to that specified in the argument.

Parameters:
alphaAtZeroDuration - the new alphaAtZeroDuration
 o finished
 public boolean finished()
Query to test if this alpha object is past its activity window--- if it has finished all its looping activity.

Returns:
true if no longer looping, false otherwise

All Packages  Class Hierarchy  This Package  Previous  Next  Index