65 virtual double Warp(
double originalTime)
const = 0;
71 double Warp(
double originalTime)
const override;
81 : mWarper(
std::move(warper)), mShift(shiftAmount) { }
83 double Warp(
double originalTime)
const override;
93 double tBefore1,
double tAfter1)
94 : mScale((tAfter1 - tAfter0)/(tBefore1 - tBefore0)),
95 mShift(tAfter0 - mScale*tBefore0)
97 double Warp(
double originalTime)
const override;
109 double rStart,
double rEnd);
110 double Warp(
double originalTime)
const override;
124 double rStart,
double rEnd);
125 double Warp(
double originalTime)
const override;
137 double rStart,
double rEnd);
138 double Warp(
double originalTime)
const override;
150 double rStart,
double rEnd);
151 double Warp(
double originalTime)
const override;
163 double rStart,
double rEnd);
164 double Warp(
double originalTime)
const override;
176 double rStart,
double rEnd);
177 double Warp(
double originalTime)
const override;
186 double Warp(
double originalTime)
const override;
200 : mWarper(
std::move(warper)), mTStart(tStart), mTEnd(tEnd),
201 mOffset(mWarper->Warp(mTEnd)-mTEnd)
204 double Warp(
double originalTime)
const override
206 if (originalTime < mTStart)
209 }
else if (originalTime < mTEnd)
211 return mWarper->Warp(originalTime);
214 return mOffset + originalTime;
LinearTimeWarper mTimeWarper
No change to time at all.
TimeScale - rate varies linearly with output.
LinearTimeWarper mTimeWarper
LinearTimeWarper mTimeWarper
Linear scaling, initialised by giving two points on the line.
LinearTimeWarper(double tBefore0, double tAfter0, double tBefore1, double tAfter1)
Unit slope but with either a jump (pasting more) or a flat interval (pasting less)
No change before the specified region; during the region, warp according to the given warper; after t...
double Warp(double originalTime) const override
RegionTimeWarper(double tStart, double tEnd, std::unique_ptr< TimeWarper > &&warper)
virtual ~RegionTimeWarper()
std::unique_ptr< TimeWarper > mWarper
Behaves like another, given TimeWarper, except shifted by a fixed amount.
std::unique_ptr< TimeWarper > mWarper
virtual ~ShiftTimeWarper()
ShiftTimeWarper(std::unique_ptr< TimeWarper > &&warper, double shiftAmount)
Transforms one point in time to another point. For example, a time stretching effect might use one to...
virtual double Warp(double originalTime) const =0