| #pragma once |
| |
| #ifndef SQUARE_POTENTIAL_H |
| #define SQUARE_POTENTIAL_H |
| |
| |
| |
| |
| |
| |
| #include "tstroke.h" |
| |
| #include "ext/Potential.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 |
| |
| namespace ToonzExt { |
| class DVAPI SquarePotential final : public Potential { |
| public: |
| virtual ~SquarePotential(); |
| |
| |
| double value_(double radiusToTest) const override; |
| |
| |
| void setParameters_(const TStroke *ref, double w, |
| double actionLength) override; |
| |
| private: |
| Potential *clone() override; |
| |
| double compute_shape(double) const; |
| |
| |
| |
| double compute_value(double) const; |
| |
| |
| const TStroke *ref_; |
| double range_; |
| double par_; |
| double actionLength_; |
| double strokeLength_; |
| double lengthAtParam_; |
| double leftFactor_; |
| double rightFactor_; |
| }; |
| } |
| #endif |
| |
| |
| |