Package gaia.cu9.ari.gaiaorbit.util.time
Interface ITimeFrameProvider
-
- All Known Implementing Classes:
GlobalClock,RealTimeClock
public interface ITimeFrameProviderBasic interface for entities that provide an time frame in the scene
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetDt()Gets the difference from the last time frame in hoursfloatgetFixedRate()Returns the fixed frame rate if the mode is fixed frame rate.java.time.InstantgetTime()Gets the current timedoublegetWarpFactor()Gets the current warp factorbooleanisFixedRateMode()Returns whether the frame rate is set to fixed or notbooleanisTimeOn()Is the time on?voidupdate(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
-
-