Пример #1
0
 /**
  * Set a new value for the stop time. If the sensor is active and the stop time is less than the
  * current start time, it is ignored. If the stop time is less that now, it is set to now.
  *
  * @param newStopTime The new stop time
  */
 public void setStopTime(double newStopTime) {
   // Debug.trace();
   if (vfIsActive && (newStopTime < vfStartTime)) {
     // ignore stoptime if active and new time is less than start time.
   } else {
     // superclass will fire the fieldChanged events
     super.setStopTime(newStopTime);
     if (vrmlClock == null) resetTimeListener(0);
     else resetTimeListener(vrmlClock.getTime());
   }
 }
Пример #2
0
  /**
   * Set a new value for the start time. If the sensor is active then it is ignored (as per the
   * spec).
   *
   * @param newStartTime The new start time
   */
  public void setStartTime(double newStartTime) {
    // Debug.trace();
    if (vfIsActive) {
      // ignore starttime while active
    } else {
      // superclass will fire the fieldChanged events
      super.setStartTime(newStartTime);

      if (vrmlClock != null) {
        resetTimeListener(vrmlClock.getTime());
      }
    }
  }
Пример #3
0
 /**
  * Set the vrmlClock that this time dependent node will be running with.
  *
  * @param clk The vrmlClock to use for this node
  */
 public void setVRMLClock(VRMLClock clk) {
   vrmlClock = clk;
   resetTimeListener(vrmlClock.getTime());
 }