Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "ext/SelfLoopDeformation.h"
Toshihiro Shimizu 890ddd
#include "DeformationSelector.h"
Toshihiro Shimizu 890ddd
#include <tstroke.h></tstroke.h>
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
using namespace ToonzExt;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// REGISTER(SelfLoopDeformation);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
SelfLoopDeformation::SelfLoopDeformation()
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
SelfLoopDeformation::~SelfLoopDeformation()
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void SelfLoopDeformation::activate_impl(Context *,
Toshihiro Shimizu 890ddd
										DraggerStatus *)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	assert(!"SelfLoopDeformation::activate not yet implemented!");
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
bool SelfLoopDeformation::check(Context *dragger,
Toshihiro Shimizu 890ddd
								DraggerStatus *status)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	assert(status && dragger && "Not dragger or status available");
Toshihiro Shimizu 890ddd
	assert(!"SelfLoopDeformation::check not yet implemented!");
Toshihiro Shimizu 890ddd
	//  lengthOfAction_ = status->lengthOfAction_;
Toshihiro Shimizu 890ddd
	//  deformerSensibility_ = status->deformerSensibility_;
Toshihiro Shimizu 890ddd
	//  stroke2move_ = status->stroke2change_;
Toshihiro Shimizu 890ddd
	TStroke *s = stroke2move_;
Toshihiro Shimizu 890ddd
	//  double &w = status->w_;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	if (s->isSelfLoop()) {
Toshihiro Shimizu 890ddd
		//    dragger->changeDeformation(SelfLoopDeformation::instance());
Toshihiro Shimizu 890ddd
		//    SelfLoopDeformation::instance()->activate(dragger,
Toshihiro Shimizu 890ddd
		//                                              status);
Toshihiro Shimizu 890ddd
		return true;
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
	return false;
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void SelfLoopDeformation::update_impl(Context *,
Toshihiro Shimizu 890ddd
									  const TPointD &delta)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void SelfLoopDeformation::deactivate_impl(Context *)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void SelfLoopDeformation::draw(Designer *dr)
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
SelfLoopDeformation *
Toshihiro Shimizu 890ddd
SelfLoopDeformation::instance()
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	static SelfLoopDeformation singleton;
Toshihiro Shimizu 890ddd
	return &singleton;
Toshihiro Shimizu 890ddd
}