Toshihiro Shimizu 890ddd
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
Toshihiro Shimizu 890ddd
namespace ToonzExt
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
class DVAPI
Toshihiro Shimizu 890ddd
	NotSimmetricBezierPotential
Toshihiro Shimizu 890ddd
	: public Potential
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	virtual ~NotSimmetricBezierPotential();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	// chiama compute_value ma effettua un controllo del parametro
Toshihiro Shimizu 890ddd
	virtual double
Toshihiro Shimizu 890ddd
	value_(double radiusToTest) const;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual void
Toshihiro Shimizu 890ddd
	setParameters_(const TStroke *ref,
Toshihiro Shimizu 890ddd
				   double w,
Toshihiro Shimizu 890ddd
				   double actionLength);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	Potential *
Toshihiro Shimizu 890ddd
	clone();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
private:
Toshihiro Shimizu 890ddd
	double compute_shape(double) const; // funzione ausiliaria per
Toshihiro Shimizu 890ddd
	// il calcolo del parametro
Toshihiro Shimizu 890ddd
	// da usare
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	double compute_value(double) const; // funzione ausiliaria per
Toshihiro Shimizu 890ddd
	// il calcolo del potenziale senza
Toshihiro Shimizu 890ddd
	// controllo del parametro
Toshihiro Shimizu 890ddd
	const TStroke *ref_;
Toshihiro Shimizu 890ddd
	double range_; // range of mapping
Toshihiro Shimizu 890ddd
	double par_;
Toshihiro Shimizu 890ddd
	double actionLength_;  // lunghezza dell'azione
Toshihiro Shimizu 890ddd
	double strokeLength_;  // lunghezza stroke
Toshihiro Shimizu 890ddd
	double lenghtAtParam_; // lunghezza nel pto di movimento
Toshihiro Shimizu 890ddd
	double leftFactor_;	// fattore di shape x la curva a sinistra
Toshihiro Shimizu 890ddd
	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
//-----------------------------------------------------------------------------