/* this file has been autogenerated by vtkNodeJsWrap */
/* editing this might proof futile */

#define VTK_WRAPPING_CXX
#define VTK_STREAMS_FWD_ONLY
#include <nan.h>

#include "vtkPolyDataAlgorithmWrap.h"
#include "vtkEllipseArcSourceWrap.h"
#include "vtkObjectBaseWrap.h"
#include "../../plus/plus.h"

using namespace v8;

extern Nan::Persistent<v8::Object> vtkNodeJsNoWrap;
Nan::Persistent<v8::FunctionTemplate> VtkEllipseArcSourceWrap::ptpl;

VtkEllipseArcSourceWrap::VtkEllipseArcSourceWrap()
{ }

VtkEllipseArcSourceWrap::VtkEllipseArcSourceWrap(vtkSmartPointer<vtkEllipseArcSource> _native)
{ native = _native; }

VtkEllipseArcSourceWrap::~VtkEllipseArcSourceWrap()
{ }

void VtkEllipseArcSourceWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkEllipseArcSource").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("EllipseArcSource").ToLocalChecked(), ConstructorGetter);
}

void VtkEllipseArcSourceWrap::ConstructorGetter(
	v8::Local<v8::String> property,
	const Nan::PropertyCallbackInfo<v8::Value>& info)
{
	InitPtpl();
	info.GetReturnValue().Set(Nan::New(ptpl)->GetFunction());
}

void VtkEllipseArcSourceWrap::InitPtpl()
{
	if (!ptpl.IsEmpty()) return;
	v8::Local<v8::FunctionTemplate> tpl = Nan::New<v8::FunctionTemplate>(New);
	VtkPolyDataAlgorithmWrap::InitPtpl( );
	tpl->Inherit(Nan::New<FunctionTemplate>(VtkPolyDataAlgorithmWrap::ptpl));
	tpl->SetClassName(Nan::New("VtkEllipseArcSourceWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

	Nan::SetPrototypeMethod(tpl, "GetCenter", GetCenter);
	Nan::SetPrototypeMethod(tpl, "getCenter", GetCenter);

	Nan::SetPrototypeMethod(tpl, "GetMajorRadiusVector", GetMajorRadiusVector);
	Nan::SetPrototypeMethod(tpl, "getMajorRadiusVector", GetMajorRadiusVector);

	Nan::SetPrototypeMethod(tpl, "GetNormal", GetNormal);
	Nan::SetPrototypeMethod(tpl, "getNormal", GetNormal);

	Nan::SetPrototypeMethod(tpl, "GetOutputPointsPrecision", GetOutputPointsPrecision);
	Nan::SetPrototypeMethod(tpl, "getOutputPointsPrecision", GetOutputPointsPrecision);

	Nan::SetPrototypeMethod(tpl, "GetRatio", GetRatio);
	Nan::SetPrototypeMethod(tpl, "getRatio", GetRatio);

	Nan::SetPrototypeMethod(tpl, "GetRatioMaxValue", GetRatioMaxValue);
	Nan::SetPrototypeMethod(tpl, "getRatioMaxValue", GetRatioMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetRatioMinValue", GetRatioMinValue);
	Nan::SetPrototypeMethod(tpl, "getRatioMinValue", GetRatioMinValue);

	Nan::SetPrototypeMethod(tpl, "GetResolution", GetResolution);
	Nan::SetPrototypeMethod(tpl, "getResolution", GetResolution);

	Nan::SetPrototypeMethod(tpl, "GetResolutionMaxValue", GetResolutionMaxValue);
	Nan::SetPrototypeMethod(tpl, "getResolutionMaxValue", GetResolutionMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetResolutionMinValue", GetResolutionMinValue);
	Nan::SetPrototypeMethod(tpl, "getResolutionMinValue", GetResolutionMinValue);

	Nan::SetPrototypeMethod(tpl, "GetSegmentAngle", GetSegmentAngle);
	Nan::SetPrototypeMethod(tpl, "getSegmentAngle", GetSegmentAngle);

	Nan::SetPrototypeMethod(tpl, "GetSegmentAngleMaxValue", GetSegmentAngleMaxValue);
	Nan::SetPrototypeMethod(tpl, "getSegmentAngleMaxValue", GetSegmentAngleMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetSegmentAngleMinValue", GetSegmentAngleMinValue);
	Nan::SetPrototypeMethod(tpl, "getSegmentAngleMinValue", GetSegmentAngleMinValue);

	Nan::SetPrototypeMethod(tpl, "GetStartAngle", GetStartAngle);
	Nan::SetPrototypeMethod(tpl, "getStartAngle", GetStartAngle);

	Nan::SetPrototypeMethod(tpl, "GetStartAngleMaxValue", GetStartAngleMaxValue);
	Nan::SetPrototypeMethod(tpl, "getStartAngleMaxValue", GetStartAngleMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetStartAngleMinValue", GetStartAngleMinValue);
	Nan::SetPrototypeMethod(tpl, "getStartAngleMinValue", GetStartAngleMinValue);

	Nan::SetPrototypeMethod(tpl, "NewInstance", NewInstance);
	Nan::SetPrototypeMethod(tpl, "newInstance", NewInstance);

	Nan::SetPrototypeMethod(tpl, "SafeDownCast", SafeDownCast);
	Nan::SetPrototypeMethod(tpl, "safeDownCast", SafeDownCast);

	Nan::SetPrototypeMethod(tpl, "SetCenter", SetCenter);
	Nan::SetPrototypeMethod(tpl, "setCenter", SetCenter);

	Nan::SetPrototypeMethod(tpl, "SetMajorRadiusVector", SetMajorRadiusVector);
	Nan::SetPrototypeMethod(tpl, "setMajorRadiusVector", SetMajorRadiusVector);

	Nan::SetPrototypeMethod(tpl, "SetNormal", SetNormal);
	Nan::SetPrototypeMethod(tpl, "setNormal", SetNormal);

	Nan::SetPrototypeMethod(tpl, "SetOutputPointsPrecision", SetOutputPointsPrecision);
	Nan::SetPrototypeMethod(tpl, "setOutputPointsPrecision", SetOutputPointsPrecision);

	Nan::SetPrototypeMethod(tpl, "SetRatio", SetRatio);
	Nan::SetPrototypeMethod(tpl, "setRatio", SetRatio);

	Nan::SetPrototypeMethod(tpl, "SetResolution", SetResolution);
	Nan::SetPrototypeMethod(tpl, "setResolution", SetResolution);

	Nan::SetPrototypeMethod(tpl, "SetSegmentAngle", SetSegmentAngle);
	Nan::SetPrototypeMethod(tpl, "setSegmentAngle", SetSegmentAngle);

	Nan::SetPrototypeMethod(tpl, "SetStartAngle", SetStartAngle);
	Nan::SetPrototypeMethod(tpl, "setStartAngle", SetStartAngle);

#ifdef VTK_NODE_PLUS_VTKELLIPSEARCSOURCEWRAP_INITPTPL
	VTK_NODE_PLUS_VTKELLIPSEARCSOURCEWRAP_INITPTPL
#endif
	ptpl.Reset( tpl );
}

void VtkEllipseArcSourceWrap::New(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	if(!info.IsConstructCall())
	{
		Nan::ThrowError("Constructor not called in a construct call.");
		return;
	}

	if(info.Length() == 0)
	{
		vtkSmartPointer<vtkEllipseArcSource> native = vtkSmartPointer<vtkEllipseArcSource>::New();
		VtkEllipseArcSourceWrap* obj = new VtkEllipseArcSourceWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

	info.GetReturnValue().Set(info.This());
}

void VtkEllipseArcSourceWrap::GetCenter(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetCenter();
	Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 3 * sizeof(double));
	Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 3);
	memcpy(ab->GetContents().Data(), r, 3 * sizeof(double));
	info.GetReturnValue().Set(at);
}

void VtkEllipseArcSourceWrap::GetMajorRadiusVector(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetMajorRadiusVector();
	Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 3 * sizeof(double));
	Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 3);
	memcpy(ab->GetContents().Data(), r, 3 * sizeof(double));
	info.GetReturnValue().Set(at);
}

void VtkEllipseArcSourceWrap::GetNormal(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetNormal();
	Local<v8::ArrayBuffer> ab = v8::ArrayBuffer::New(v8::Isolate::GetCurrent(), 3 * sizeof(double));
	Local<v8::Float64Array> at = v8::Float64Array::New(ab, 0, 3);
	memcpy(ab->GetContents().Data(), r, 3 * sizeof(double));
	info.GetReturnValue().Set(at);
}

void VtkEllipseArcSourceWrap::GetOutputPointsPrecision(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetOutputPointsPrecision();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetRatio(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRatio();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetRatioMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRatioMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetRatioMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetRatioMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetResolution(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetResolution();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetResolutionMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetResolutionMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetResolutionMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetResolutionMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetSegmentAngle(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetSegmentAngle();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetSegmentAngleMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetSegmentAngleMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetSegmentAngleMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetSegmentAngleMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetStartAngle(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetStartAngle();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetStartAngleMaxValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetStartAngleMaxValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::GetStartAngleMinValue(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetStartAngleMinValue();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkEllipseArcSourceWrap::NewInstance(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	vtkEllipseArcSource * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->NewInstance();
	VtkEllipseArcSourceWrap::InitPtpl();
	v8::Local<v8::Value> argv[1] =
		{ Nan::New(vtkNodeJsNoWrap) };
	v8::Local<v8::Function> cons =
		Nan::New<v8::FunctionTemplate>(VtkEllipseArcSourceWrap::ptpl)->GetFunction();
	v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
	VtkEllipseArcSourceWrap *w = new VtkEllipseArcSourceWrap();
	w->native = r;
	w->Wrap(wo);
	info.GetReturnValue().Set(wo);
}

void VtkEllipseArcSourceWrap::SafeDownCast(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkObjectBaseWrap::ptpl))->HasInstance(info[0]))
	{
		VtkObjectBaseWrap *a0 = ObjectWrap::Unwrap<VtkObjectBaseWrap>(info[0]->ToObject());
		vtkEllipseArcSource * r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->SafeDownCast(
			(vtkObjectBase *) a0->native.GetPointer()
		);
		VtkEllipseArcSourceWrap::InitPtpl();
		v8::Local<v8::Value> argv[1] =
			{ Nan::New(vtkNodeJsNoWrap) };
		v8::Local<v8::Function> cons =
			Nan::New<v8::FunctionTemplate>(VtkEllipseArcSourceWrap::ptpl)->GetFunction();
		v8::Local<v8::Object> wo = cons->NewInstance(1, argv);
		VtkEllipseArcSourceWrap *w = new VtkEllipseArcSourceWrap();
		w->native = r;
		w->Wrap(wo);
		info.GetReturnValue().Set(wo);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetCenter(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetCenter(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[3];
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 3; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetCenter(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
			if(info.Length() > 2 && info[2]->IsNumber())
			{
								if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				native->SetCenter(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetMajorRadiusVector(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetMajorRadiusVector(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[3];
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 3; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetMajorRadiusVector(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
			if(info.Length() > 2 && info[2]->IsNumber())
			{
								if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				native->SetMajorRadiusVector(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetNormal(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsFloat64Array())
	{
		v8::Local<v8::Float64Array>a0(v8::Local<v8::Float64Array>::Cast(info[0]->ToObject()));
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetNormal(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsArray())
	{
		v8::Local<v8::Array>a0(v8::Local<v8::Array>::Cast(info[0]->ToObject()));
		double b0[3];
		if( a0->Length() < 3 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 3; i++ )
		{
			if( !a0->Get(i)->IsNumber() )
			{
				Nan::ThrowError("Array contents invalid.");
				return;
			}
			b0[i] = a0->Get(i)->NumberValue();
		}
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetNormal(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
			if(info.Length() > 2 && info[2]->IsNumber())
			{
								if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				native->SetNormal(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetOutputPointsPrecision(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetOutputPointsPrecision(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetRatio(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetRatio(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetResolution(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetResolution(
			info[0]->Int32Value()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetSegmentAngle(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetSegmentAngle(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkEllipseArcSourceWrap::SetStartAngle(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkEllipseArcSourceWrap *wrapper = ObjectWrap::Unwrap<VtkEllipseArcSourceWrap>(info.Holder());
	vtkEllipseArcSource *native = (vtkEllipseArcSource *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetStartAngle(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

