|
Shinya Kitaoka |
810553 |
#pragma once
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#ifndef NOT_SIMMETRIC_BEZIER_POTENTIAL_H
|
|
Toshihiro Shimizu |
890ddd |
#define NOT_SIMMETRIC_BEZIER_POTENTIAL_H
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
/**
|
|
Toshihiro Shimizu |
890ddd |
* @author Fabrizio Morciano <fabrizio.morciano@gmail.com></fabrizio.morciano@gmail.com>
|
|
Toshihiro Shimizu |
890ddd |
*/
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//#include "tcommon.h"
|
|
Toshihiro Shimizu |
890ddd |
//#include "tstroke.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#include "ext/Potential.h"
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
#undef DVAPI
|
|
Toshihiro Shimizu |
890ddd |
#undef DVVAR
|
|
Toshihiro Shimizu |
890ddd |
#ifdef TNZEXT_EXPORTS
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_EXPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_EXPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#else
|
|
Toshihiro Shimizu |
890ddd |
#define DVAPI DV_IMPORT_API
|
|
Toshihiro Shimizu |
890ddd |
#define DVVAR DV_IMPORT_VAR
|
|
Toshihiro Shimizu |
890ddd |
#endif
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
namespace ToonzExt {
|
|
Shinya Kitaoka |
d1f6c4 |
class DVAPI NotSimmetricBezierPotential final : public Potential {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
virtual ~NotSimmetricBezierPotential();
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
// chiama compute_value ma effettua un controllo del parametro
|
|
Shinya Kitaoka |
473e70 |
double value_(double radiusToTest) const override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
void setParameters_(const TStroke *ref, double w,
|
|
Shinya Kitaoka |
38fd86 |
double actionLength) override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
473e70 |
Potential *clone() override;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
private:
|
|
Shinya Kitaoka |
120a6e |
double compute_shape(double) const; // funzione ausiliaria per
|
|
Shinya Kitaoka |
120a6e |
// il calcolo del parametro
|
|
Shinya Kitaoka |
120a6e |
// da usare
|
|
Shinya Kitaoka |
120a6e |
|
|
Shinya Kitaoka |
120a6e |
double compute_value(double) const; // funzione ausiliaria per
|
|
Shinya Kitaoka |
120a6e |
// il calcolo del potenziale senza
|
|
Shinya Kitaoka |
120a6e |
// controllo del parametro
|
|
Shinya Kitaoka |
120a6e |
const TStroke *ref_;
|
|
Shinya Kitaoka |
120a6e |
double range_; // range of mapping
|
|
Shinya Kitaoka |
120a6e |
double par_;
|
|
Shinya Kitaoka |
120a6e |
double actionLength_; // lunghezza dell'azione
|
|
Shinya Kitaoka |
120a6e |
double strokeLength_; // lunghezza stroke
|
|
Shinya Kitaoka |
120a6e |
double lenghtAtParam_; // lunghezza nel pto di movimento
|
|
Shinya Kitaoka |
120a6e |
double leftFactor_; // fattore di shape x la curva a sinistra
|
|
Shinya Kitaoka |
120a6e |
double rightFactor_; // fattore di shape x la curva a dx
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
}
|
|
Toshihiro Shimizu |
890ddd |
#endif /* NOT_SIMMETRIC_BEZIER_POTENTIAL_H */
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
// End Of File
|
|
Toshihiro Shimizu |
890ddd |
//-----------------------------------------------------------------------------
|