Interface ITimeFrameProvider

  • All Known Implementing Classes:
    GlobalClock, RealTimeClock

    public interface ITimeFrameProvider
    Basic interface for entities that provide an time frame in the scene
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double getDt()
      Gets the difference from the last time frame in hours
      float getFixedRate()
      Returns the fixed frame rate if the mode is fixed frame rate.
      java.time.Instant getTime()
      Gets the current time
      double getWarpFactor()
      Gets the current warp factor
      boolean isFixedRateMode()
      Returns whether the frame rate is set to fixed or not
      boolean isTimeOn()
      Is the time on?
      void update​(double dt)
      Updates this time frame with the system time difference
    • Method Detail

      • getDt

        double getDt()
        Gets the difference from the last time frame in hours
        Returns:
        The time difference
      • getTime

        java.time.Instant getTime()
        Gets the current time
        Returns:
        The time as an instant
      • update

        void update​(double dt)
        Updates this time frame with the system time difference
        Parameters:
        dt - System time difference in seconds
      • getWarpFactor

        double getWarpFactor()
        Gets the current warp factor
        Returns:
        The warp factor
      • isTimeOn

        boolean isTimeOn()
        Is the time on?
        Returns:
        True if time is on
      • isFixedRateMode

        boolean isFixedRateMode()
        Returns whether the frame rate is set to fixed or not
        Returns:
        Whether fix rate mode is on
      • getFixedRate

        float getFixedRate()
        Returns the fixed frame rate if the mode is fixed frame rate. Returns -1 otherwise
        Returns:
        The fixed rate