|
shun-iwasawa |
ec85ad |
|
|
shun-iwasawa |
ec85ad |
#ifndef NDEBUG
|
|
 |
7e9eb1 |
#pragma once
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
#ifndef MODIFIERTEST_INCLUDED
|
|
 |
7e9eb1 |
#define MODIFIERTEST_INCLUDED
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
#include <tools inputmanager.h=""></tools>
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
#undef DVAPI
|
|
 |
7e9eb1 |
#undef DVVAR
|
|
 |
7e9eb1 |
#ifdef TNZTOOLS_EXPORTS
|
|
 |
7e9eb1 |
#define DVAPI DV_EXPORT_API
|
|
 |
7e9eb1 |
#define DVVAR DV_EXPORT_VAR
|
|
 |
7e9eb1 |
#else
|
|
 |
7e9eb1 |
#define DVAPI DV_IMPORT_API
|
|
 |
7e9eb1 |
#define DVVAR DV_IMPORT_VAR
|
|
 |
7e9eb1 |
#endif
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
//*****************************************************************************************
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
//*****************************************************************************************
|
|
 |
7e9eb1 |
|
|
shun-iwasawa |
ec85ad |
class DVAPI TModifierTest : public TInputModifier {
|
|
 |
7e9eb1 |
public:
|
|
 |
bdb1e2 |
class DVAPI Handler : public TMultiTrackHandler {
|
|
 |
7e9eb1 |
public:
|
|
 |
bdb1e2 |
const double radius;
|
|
 |
7e9eb1 |
std::vector<double> angles;</double>
|
|
 |
bdb1e2 |
inline explicit Handler(double radius):
|
|
 |
bdb1e2 |
radius(std::max(TConsts::epsilon, radius)) { }
|
|
 |
7e9eb1 |
};
|
|
 |
7e9eb1 |
|
|
 |
bdb1e2 |
class DVAPI Interpolator : public TTrackInterpolator {
|
|
 |
7e9eb1 |
public:
|
|
 |
bdb1e2 |
const double angle;
|
|
 |
bdb1e2 |
const double radius;
|
|
 |
bdb1e2 |
const double speed;
|
|
 |
bdb1e2 |
inline Interpolator(TTrack &track, double angle, double radius, double speed):
|
|
 |
bdb1e2 |
TTrackInterpolator(track), angle(angle), radius(radius), speed(speed) { }
|
|
 |
bdb1e2 |
TTrackPoint interpolateFromOriginal(double originalIndex);
|
|
 |
bdb1e2 |
TTrackPoint interpolate(double index) override;
|
|
 |
7e9eb1 |
};
|
|
 |
7e9eb1 |
|
|
 |
7e9eb1 |
public:
|
|
 |
bdb1e2 |
int count;
|
|
 |
bdb1e2 |
double radius;
|
|
 |
bdb1e2 |
double speed;
|
|
 |
7e9eb1 |
|
|
 |
bdb1e2 |
TModifierTest(int count = 3, double radius = 40, double speed = 0.25);
|
|
 |
7e9eb1 |
|
|
shun-iwasawa |
ec85ad |
void modifyTrack(const TTrack &track,
|
|
shun-iwasawa |
ec85ad |
TTrackList &outTracks) override;
|
|
 |
7e9eb1 |
};
|
|
 |
7e9eb1 |
|
|
shun-iwasawa |
ec85ad |
#endif
|
|
 |
7e9eb1 |
#endif
|