Method Rewind
Rewind(TimeIndex)
Retrieves the time index at the beginning of the interval that the time index passed as argument belongs to.
Declaration
public TimeIndex Rewind(TimeIndex timeIndex)
Parameters
Type | Name | Description |
---|---|---|
Time |
timeIndex | Time index for which the corresponding interval start time index should be calculated. |
Returns
Type | Description |
---|---|
Time |
Remarks
This method can be used to "loop" time indices.
[Trait, BurstCompile]
public struct Loop : Trait
{
public void Execute(ref MotionSynthesizer synthesizer)
{
synthesizer.Push(synthesizer.Rewind(synthesizer.Time));
}
}
Rewind(SamplingTime)
Retrieves the time index at the beginning of the interval that the sampling time passed as argument belongs to.
Declaration
public TimeIndex Rewind(SamplingTime samplingTime)
Parameters
Type | Name | Description |
---|---|---|
Sampling |
samplingTime | Sampling time for which the corresponding interval start time index should be calculated. |
Returns
Type | Description |
---|---|
Time |
Remarks
This method can be used to "loop" time indices.
[Trait, BurstCompile]
public struct Loop : Trait
{
public void Execute(ref MotionSynthesizer synthesizer)
{
synthesizer.Push(synthesizer.Rewind(synthesizer.Time));
}
}