public static int addValues(ArrayList<? extends Alpha> arr, Gamma gam) { int sum = 0; for (Alpha alpha : arr) { try { sum += alpha.value(gam); } catch (ValueException e) { } } return sum; }
public static int addValues(ArrayList<? extends Alpha> arr, Gamma gam) { int sum = 0; for (Alpha alpha : arr) { try { sum += alpha.value(gam); } catch (Exception e) { } } return sum; }
/** * @deprecated As of Java 3D version 1.3, replaced by * <code>computePathInterpolation(float)</code> */ protected void computePathInterpolation() { float value = this.alpha.value(); computePathInterpolation(value); }
/** * 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). * * @return a value between 0.0 and 1.0 based on the current time */ public float value() { long currentTime = paused ? pauseTime : J3dClock.currentTimeMillis(); return this.value(currentTime); }
float alphaValue = (this.getAlpha()).value();
/** * @deprecated As of Java 3D version 1.3, replaced by * <code>computePathInterpolation(float)</code> */ protected void computePathInterpolation() { computePathInterpolation(this.getAlpha().value()); }
/** * @deprecated As of Java 3D version 1.3, replaced by * <code>computePathInterpolation(float)</code> */ protected void computePathInterpolation() { float value = (this.getAlpha()).value(); computePathInterpolation(value); }
/** * This method is invoked by the behavior scheduler every frame. It * maps the alpha value that corresponds to the current time into a * transparency value and updates the specified TransparencyAttributes * object with this new transparency value. * @param criteria an enumeration of the criteria that caused the * stimulus */ @Override public void processStimulus(Enumeration criteria) { // Handle stimulus WakeupCriterion criterion = passiveWakeupCriterion; if (alpha != null) { float value = alpha.value(); if (value != prevAlphaValue) { float val = (float)((1.0-value)*minimumTransparency + value*maximumTransparency); target.setTransparency(val); prevAlphaValue = value; } if (!alpha.finished() && !alpha.isPaused()) { criterion = defaultWakeupCriterion; } } wakeupOn(criterion); }
float value = alpha.value();
/** * This method is invoked by the behavior scheduler every frame. * First it gets the alpha value that corresponds to the current time. * Then it calls computeTransform() method to computes the transform based on this * alpha vaule, and updates the specified TransformGroup node with this new transform. * @param criteria an enumeration of the criteria that caused the * stimulus */ @Override public void processStimulus(Enumeration criteria) { // Handle stimulus WakeupCriterion criterion = passiveWakeupCriterion; if (alpha != null) { float value = alpha.value(); if (value != prevAlphaValue) { computeTransform(value, currentTransform); target.setTransform(currentTransform); prevAlphaValue = value; } if (!alpha.finished() && !alpha.isPaused()) { criterion = defaultWakeupCriterion; } } wakeupOn(criterion); }
float value = alpha.value();