KernelAPI reference
Struct FrameContext
Namespace: MicroEngine.Kernel
Assembly: MicroEngine.Kernel.dll
Guide: Modules and the frame schedule
What a frame system knows about time when it runs (FrameSchedule).
public readonly struct FrameContext : IEquatable<FrameContext>Implements
Constructors
FrameContext(double, double, float, long, long)
What a frame system knows about time when it runs (FrameSchedule).
public FrameContext(double Delta, double FixedDelta, float Blend, long FixedStep, long Frame)Parameters
Delta double
Seconds this frame stands for: in real time, the elapsed time measured by the loop (paced to the display and at most MaxFrameDelta); in deterministic time, exactly FixedDelta.
FixedDelta double
Seconds of one fixed step: 1 / TimeSettings.FixedRate.
Blend float
How far the frame is between the last fixed step and the next one, 0..1: the part of a step of time that has passed
but has not been simulated yet. Drawing at Lerp(previous, current, Blend) makes motion even on displays whose
rate is not a multiple of the fixed rate. Always 1 in deterministic time (the frame shows exactly the last step) and
0 inside the fixed phases (they run on a step boundary).
FixedStep long
The number of fixed steps completed before this moment; inside a fixed phase, the index of the step being run, from 0.
Frame long
The number of the frame, from 1 for the first frame run.
Properties
Blend
How far the frame is between the last fixed step and the next one, 0..1: the part of a step of time that has passed
but has not been simulated yet. Drawing at Lerp(previous, current, Blend) makes motion even on displays whose
rate is not a multiple of the fixed rate. Always 1 in deterministic time (the frame shows exactly the last step) and
0 inside the fixed phases (they run on a step boundary).
public float Blend { get; init; }Property Value
Delta
Seconds this frame stands for: in real time, the elapsed time measured by the loop (paced to the display and at most MaxFrameDelta); in deterministic time, exactly FixedDelta.
public double Delta { get; init; }Property Value
FixedDelta
Seconds of one fixed step: 1 / TimeSettings.FixedRate.
public double FixedDelta { get; init; }Property Value
FixedStep
The number of fixed steps completed before this moment; inside a fixed phase, the index of the step being run, from 0.
public long FixedStep { get; init; }Property Value
Frame
The number of the frame, from 1 for the first frame run.
public long Frame { get; init; }Property Value
Methods
Deconstruct(out double, out double, out float, out long, out long)
public void Deconstruct(out double Delta, out double FixedDelta, out float Blend, out long FixedStep, out long Frame)Parameters
Delta double
FixedDelta double
Blend float
FixedStep long
Frame long
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(FrameContext)
public bool Equals(FrameContext other)Parameters
other FrameContext
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(FrameContext, FrameContext)
public static bool operator ==(FrameContext left, FrameContext right)Parameters
left FrameContext
right FrameContext
Returns
operator !=(FrameContext, FrameContext)
public static bool operator !=(FrameContext left, FrameContext right)Parameters
left FrameContext
right FrameContext