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 |
---|---|---|
TimeIndex | timeIndex | Time index for which the corresponding interval start time index should be calculated. |
Returns
Type | Description |
---|---|
TimeIndex |
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 |
---|---|---|
SamplingTime | samplingTime | Sampling time for which the corresponding interval start time index should be calculated. |
Returns
Type | Description |
---|---|
TimeIndex |
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));
}
}