| #pragma once |
| |
| #ifndef POTENTIAL_H |
| #define POTENTIAL_H |
| |
| |
| |
| |
| |
| #include "tcommon.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 |
| |
| #include <assert.h> |
| #include <stdexcept> |
| #include <string> |
| |
| class TStroke; |
| |
| #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
| |
| #pragma warning(push) |
| #pragma warning(disable : 4290) |
| #endif |
| |
| namespace ToonzExt { |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI Potential { |
| bool isValid_; |
| |
| protected: |
| |
| |
| |
| |
| |
| virtual double value_(double w) const = 0; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| virtual void setParameters_(const TStroke *theStroke, double w, |
| double actionLength) = 0; |
| |
| public: |
| Potential(); |
| |
| |
| |
| |
| |
| void setParameters(const TStroke *ref, double w, double actionLength); |
| |
| |
| |
| |
| |
| double value(double at) const; |
| |
| |
| |
| |
| virtual Potential *clone() = 0; |
| |
| virtual ~Potential() {} |
| }; |
| } |
| |
| #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
| #pragma warning(pop) |
| #endif |
| |
| #endif |
| |
| |
| |