| #pragma once |
| |
| #ifndef STROKE_PARAMETRIC_DEFORMER_H |
| #define STROKE_PARAMETRIC_DEFORMER_H |
| |
| |
| |
| |
| |
| #include "tcommon.h" |
| #include "tstrokedeformations.h" |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TNZEXT_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
| |
| #pragma warning(push) |
| #pragma warning(disable : 4290) |
| #endif |
| |
| class TStroke; |
| |
| namespace ToonzExt { |
| class Potential; |
| |
| |
| |
| |
| |
| class DVAPI StrokeParametricDeformer final : public TStrokeDeformation { |
| public: |
| StrokeParametricDeformer(double actionLength, double startParameter, |
| TStroke *s, Potential *); |
| |
| ~StrokeParametricDeformer(); |
| |
| |
| |
| |
| |
| |
| void setMouseMove(double vx, double vy); |
| |
| |
| |
| |
| |
| |
| |
| |
| TThickPoint getDisplacement(const TStroke &stroke, double w) const override; |
| |
| |
| |
| |
| |
| |
| |
| |
| TThickPoint getDisplacementForControlPoint(const TStroke &stroke, |
| UINT n) const override; |
| TThickPoint getDisplacementForControlPointLen(const TStroke &stroke, |
| double cpLen) const override; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| double getDelta(const TStroke &stroke, double w) const override; |
| |
| |
| |
| |
| |
| |
| double getMaxDiff() const override; |
| |
| |
| const Potential *getPotential() const { return pot_; } |
| |
| |
| |
| |
| void setDiff(double diff) { diff_ = diff; } |
| |
| |
| |
| |
| void getRange(double &from, double &to); |
| |
| private: |
| StrokeParametricDeformer(const StrokeParametricDeformer &); |
| StrokeParametricDeformer &operator=(const StrokeParametricDeformer &); |
| |
| |
| double vx_, vy_; |
| |
| |
| double startParameter_; |
| |
| |
| double startLength_; |
| |
| |
| double actionLength_; |
| |
| |
| Potential *pot_; |
| |
| |
| |
| |
| double diff_; |
| |
| TStroke *ref_copy_; |
| }; |
| } |
| |
| #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
| #pragma warning(pop) |
| #endif |
| |
| #endif |
| |
| |
| |