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

    Modifier and Type
    Method
    Description
    double
    The frame time difference in seconds.
    float
    Returns the fixed frame rate if the mode is fixed frame rate.
    double
    The simulation time difference in hours.
    Gets the current time
    double
    Gets the current warp factor
    boolean
    Returns whether the frame rate is set to fixed or not
    boolean
    Is the time on?
    void
    update(double dt)
    Updates this time frame with the system time difference
  • Method Details

    • getHdiff

      double getHdiff()
      The simulation time difference in hours.
      Returns:
      The simulation time difference in hours.
    • getDt

      double getDt()
      The frame time difference in seconds.
      Returns:
      The frame time difference in seconds.
    • getTime

      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