/* 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 "vtkWidgetRepresentationWrap.h"
#include "vtkFinitePlaneRepresentationWrap.h"
#include "vtkObjectBaseWrap.h"
#include "vtkPolyDataWrap.h"
#include "vtkPropertyWrap.h"
#include "vtkWindowWrap.h"
#include "vtkViewportWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkFinitePlaneRepresentationWrap::VtkFinitePlaneRepresentationWrap()
{ }

VtkFinitePlaneRepresentationWrap::VtkFinitePlaneRepresentationWrap(vtkSmartPointer<vtkFinitePlaneRepresentation> _native)
{ native = _native; }

VtkFinitePlaneRepresentationWrap::~VtkFinitePlaneRepresentationWrap()
{ }

void VtkFinitePlaneRepresentationWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkFinitePlaneRepresentation").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("FinitePlaneRepresentation").ToLocalChecked(), ConstructorGetter);
}

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

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

	Nan::SetPrototypeMethod(tpl, "BuildRepresentation", BuildRepresentation);
	Nan::SetPrototypeMethod(tpl, "buildRepresentation", BuildRepresentation);

	Nan::SetPrototypeMethod(tpl, "ComputeInteractionState", ComputeInteractionState);
	Nan::SetPrototypeMethod(tpl, "computeInteractionState", ComputeInteractionState);

	Nan::SetPrototypeMethod(tpl, "DrawPlaneOff", DrawPlaneOff);
	Nan::SetPrototypeMethod(tpl, "drawPlaneOff", DrawPlaneOff);

	Nan::SetPrototypeMethod(tpl, "DrawPlaneOn", DrawPlaneOn);
	Nan::SetPrototypeMethod(tpl, "drawPlaneOn", DrawPlaneOn);

	Nan::SetPrototypeMethod(tpl, "GetDrawPlane", GetDrawPlane);
	Nan::SetPrototypeMethod(tpl, "getDrawPlane", GetDrawPlane);

	Nan::SetPrototypeMethod(tpl, "GetInteractionStateMaxValue", GetInteractionStateMaxValue);
	Nan::SetPrototypeMethod(tpl, "getInteractionStateMaxValue", GetInteractionStateMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetInteractionStateMinValue", GetInteractionStateMinValue);
	Nan::SetPrototypeMethod(tpl, "getInteractionStateMinValue", GetInteractionStateMinValue);

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

	Nan::SetPrototypeMethod(tpl, "GetNormalProperty", GetNormalProperty);
	Nan::SetPrototypeMethod(tpl, "getNormalProperty", GetNormalProperty);

	Nan::SetPrototypeMethod(tpl, "GetOrigin", GetOrigin);
	Nan::SetPrototypeMethod(tpl, "getOrigin", GetOrigin);

	Nan::SetPrototypeMethod(tpl, "GetPlaneProperty", GetPlaneProperty);
	Nan::SetPrototypeMethod(tpl, "getPlaneProperty", GetPlaneProperty);

	Nan::SetPrototypeMethod(tpl, "GetPolyData", GetPolyData);
	Nan::SetPrototypeMethod(tpl, "getPolyData", GetPolyData);

	Nan::SetPrototypeMethod(tpl, "GetRepresentationState", GetRepresentationState);
	Nan::SetPrototypeMethod(tpl, "getRepresentationState", GetRepresentationState);

	Nan::SetPrototypeMethod(tpl, "GetSelectedHandleProperty", GetSelectedHandleProperty);
	Nan::SetPrototypeMethod(tpl, "getSelectedHandleProperty", GetSelectedHandleProperty);

	Nan::SetPrototypeMethod(tpl, "GetSelectedNormalProperty", GetSelectedNormalProperty);
	Nan::SetPrototypeMethod(tpl, "getSelectedNormalProperty", GetSelectedNormalProperty);

	Nan::SetPrototypeMethod(tpl, "GetSelectedPlaneProperty", GetSelectedPlaneProperty);
	Nan::SetPrototypeMethod(tpl, "getSelectedPlaneProperty", GetSelectedPlaneProperty);

	Nan::SetPrototypeMethod(tpl, "GetTubing", GetTubing);
	Nan::SetPrototypeMethod(tpl, "getTubing", GetTubing);

	Nan::SetPrototypeMethod(tpl, "GetV1", GetV1);
	Nan::SetPrototypeMethod(tpl, "getV1", GetV1);

	Nan::SetPrototypeMethod(tpl, "GetV1HandleProperty", GetV1HandleProperty);
	Nan::SetPrototypeMethod(tpl, "getV1HandleProperty", GetV1HandleProperty);

	Nan::SetPrototypeMethod(tpl, "GetV2", GetV2);
	Nan::SetPrototypeMethod(tpl, "getV2", GetV2);

	Nan::SetPrototypeMethod(tpl, "GetV2HandleProperty", GetV2HandleProperty);
	Nan::SetPrototypeMethod(tpl, "getV2HandleProperty", GetV2HandleProperty);

	Nan::SetPrototypeMethod(tpl, "HandlesOff", HandlesOff);
	Nan::SetPrototypeMethod(tpl, "handlesOff", HandlesOff);

	Nan::SetPrototypeMethod(tpl, "HandlesOn", HandlesOn);
	Nan::SetPrototypeMethod(tpl, "handlesOn", HandlesOn);

	Nan::SetPrototypeMethod(tpl, "HasTranslucentPolygonalGeometry", HasTranslucentPolygonalGeometry);
	Nan::SetPrototypeMethod(tpl, "hasTranslucentPolygonalGeometry", HasTranslucentPolygonalGeometry);

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

	Nan::SetPrototypeMethod(tpl, "PlaceWidget", PlaceWidget);
	Nan::SetPrototypeMethod(tpl, "placeWidget", PlaceWidget);

	Nan::SetPrototypeMethod(tpl, "ReleaseGraphicsResources", ReleaseGraphicsResources);
	Nan::SetPrototypeMethod(tpl, "releaseGraphicsResources", ReleaseGraphicsResources);

	Nan::SetPrototypeMethod(tpl, "RenderOpaqueGeometry", RenderOpaqueGeometry);
	Nan::SetPrototypeMethod(tpl, "renderOpaqueGeometry", RenderOpaqueGeometry);

	Nan::SetPrototypeMethod(tpl, "RenderTranslucentPolygonalGeometry", RenderTranslucentPolygonalGeometry);
	Nan::SetPrototypeMethod(tpl, "renderTranslucentPolygonalGeometry", RenderTranslucentPolygonalGeometry);

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

	Nan::SetPrototypeMethod(tpl, "SetDrawPlane", SetDrawPlane);
	Nan::SetPrototypeMethod(tpl, "setDrawPlane", SetDrawPlane);

	Nan::SetPrototypeMethod(tpl, "SetHandles", SetHandles);
	Nan::SetPrototypeMethod(tpl, "setHandles", SetHandles);

	Nan::SetPrototypeMethod(tpl, "SetInteractionState", SetInteractionState);
	Nan::SetPrototypeMethod(tpl, "setInteractionState", SetInteractionState);

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

	Nan::SetPrototypeMethod(tpl, "SetOrigin", SetOrigin);
	Nan::SetPrototypeMethod(tpl, "setOrigin", SetOrigin);

	Nan::SetPrototypeMethod(tpl, "SetRepresentationState", SetRepresentationState);
	Nan::SetPrototypeMethod(tpl, "setRepresentationState", SetRepresentationState);

	Nan::SetPrototypeMethod(tpl, "SetTubing", SetTubing);
	Nan::SetPrototypeMethod(tpl, "setTubing", SetTubing);

	Nan::SetPrototypeMethod(tpl, "SetV1", SetV1);
	Nan::SetPrototypeMethod(tpl, "setV1", SetV1);

	Nan::SetPrototypeMethod(tpl, "SetV2", SetV2);
	Nan::SetPrototypeMethod(tpl, "setV2", SetV2);

	Nan::SetPrototypeMethod(tpl, "StartWidgetInteraction", StartWidgetInteraction);
	Nan::SetPrototypeMethod(tpl, "startWidgetInteraction", StartWidgetInteraction);

	Nan::SetPrototypeMethod(tpl, "TubingOff", TubingOff);
	Nan::SetPrototypeMethod(tpl, "tubingOff", TubingOff);

	Nan::SetPrototypeMethod(tpl, "TubingOn", TubingOn);
	Nan::SetPrototypeMethod(tpl, "tubingOn", TubingOn);

	Nan::SetPrototypeMethod(tpl, "WidgetInteraction", WidgetInteraction);
	Nan::SetPrototypeMethod(tpl, "widgetInteraction", WidgetInteraction);

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

void VtkFinitePlaneRepresentationWrap::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<vtkFinitePlaneRepresentation> native = vtkSmartPointer<vtkFinitePlaneRepresentation>::New();
		VtkFinitePlaneRepresentationWrap* obj = new VtkFinitePlaneRepresentationWrap(native);
		obj->Wrap(info.This());
	}
	else
	{
		if(info[0]->ToObject() != vtkNodeJsNoWrap )
		{
			Nan::ThrowError("Parameter Error");
			return;
		}
	}

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

void VtkFinitePlaneRepresentationWrap::BuildRepresentation(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->BuildRepresentation();
}

void VtkFinitePlaneRepresentationWrap::ComputeInteractionState(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsInt32())
		{
			if(info.Length() > 2 && info[2]->IsInt32())
			{
				int r;
				if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				r = native->ComputeInteractionState(
					info[0]->Int32Value(),
					info[1]->Int32Value(),
					info[2]->Int32Value()
				);
				info.GetReturnValue().Set(Nan::New(r));
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::DrawPlaneOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->DrawPlaneOff();
}

void VtkFinitePlaneRepresentationWrap::DrawPlaneOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->DrawPlaneOn();
}

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

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

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

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

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

void VtkFinitePlaneRepresentationWrap::GetPolyData(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkPolyDataWrap::ptpl))->HasInstance(info[0]))
	{
		VtkPolyDataWrap *a0 = ObjectWrap::Unwrap<VtkPolyDataWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetPolyData(
			(vtkPolyData *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

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

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

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

void VtkFinitePlaneRepresentationWrap::HandlesOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->HandlesOff();
}

void VtkFinitePlaneRepresentationWrap::HandlesOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->HandlesOn();
}

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

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

void VtkFinitePlaneRepresentationWrap::PlaceWidget(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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() < 6 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->PlaceWidget(
			(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[6];
		if( a0->Length() < 6 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 6; 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->PlaceWidget(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::ReleaseGraphicsResources(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkWindowWrap::ptpl))->HasInstance(info[0]))
	{
		VtkWindowWrap *a0 = ObjectWrap::Unwrap<VtkWindowWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->ReleaseGraphicsResources(
			(vtkWindow *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::RenderOpaqueGeometry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkViewportWrap::ptpl))->HasInstance(info[0]))
	{
		VtkViewportWrap *a0 = ObjectWrap::Unwrap<VtkViewportWrap>(info[0]->ToObject());
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->RenderOpaqueGeometry(
			(vtkViewport *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::RenderTranslucentPolygonalGeometry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkViewportWrap::ptpl))->HasInstance(info[0]))
	{
		VtkViewportWrap *a0 = ObjectWrap::Unwrap<VtkViewportWrap>(info[0]->ToObject());
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->RenderTranslucentPolygonalGeometry(
			(vtkViewport *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

void VtkFinitePlaneRepresentationWrap::SetNormal(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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 VtkFinitePlaneRepresentationWrap::SetOrigin(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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->SetOrigin(
			(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->SetOrigin(
			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->SetOrigin(
					info[0]->NumberValue(),
					info[1]->NumberValue(),
					info[2]->NumberValue()
				);
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

void VtkFinitePlaneRepresentationWrap::SetV1(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetV1(
			(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[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 2; 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->SetV1(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetV1(
				info[0]->NumberValue(),
				info[1]->NumberValue()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::SetV2(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetV2(
			(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[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 2; 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->SetV2(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsNumber())
	{
		if(info.Length() > 1 && info[1]->IsNumber())
		{
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->SetV2(
				info[0]->NumberValue(),
				info[1]->NumberValue()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::StartWidgetInteraction(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->StartWidgetInteraction(
			(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[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 2; 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->StartWidgetInteraction(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkFinitePlaneRepresentationWrap::TubingOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->TubingOff();
}

void VtkFinitePlaneRepresentationWrap::TubingOn(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->TubingOn();
}

void VtkFinitePlaneRepresentationWrap::WidgetInteraction(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkFinitePlaneRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkFinitePlaneRepresentationWrap>(info.Holder());
	vtkFinitePlaneRepresentation *native = (vtkFinitePlaneRepresentation *)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() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->WidgetInteraction(
			(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[2];
		if( a0->Length() < 2 )
		{
			Nan::ThrowError("Array too short.");
			return;
		}

		for( i = 0; i < 2; 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->WidgetInteraction(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

