/* 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 "vtkParallelopipedRepresentationWrap.h"
#include "vtkObjectWrap.h"
#include "vtkPropCollectionWrap.h"
#include "vtkPlaneCollectionWrap.h"
#include "vtkPolyDataWrap.h"
#include "vtkPropertyWrap.h"
#include "vtkHandleRepresentationWrap.h"
#include "vtkWindowWrap.h"
#include "vtkViewportWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkParallelopipedRepresentationWrap::VtkParallelopipedRepresentationWrap()
{ }

VtkParallelopipedRepresentationWrap::VtkParallelopipedRepresentationWrap(vtkSmartPointer<vtkParallelopipedRepresentation> _native)
{ native = _native; }

VtkParallelopipedRepresentationWrap::~VtkParallelopipedRepresentationWrap()
{ }

void VtkParallelopipedRepresentationWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkParallelopipedRepresentation").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("ParallelopipedRepresentation").ToLocalChecked(), ConstructorGetter);
}

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

void VtkParallelopipedRepresentationWrap::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("VtkParallelopipedRepresentationWrap").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, "GetActors", GetActors);
	Nan::SetPrototypeMethod(tpl, "getActors", GetActors);

	Nan::SetPrototypeMethod(tpl, "GetBoundingPlanes", GetBoundingPlanes);
	Nan::SetPrototypeMethod(tpl, "getBoundingPlanes", GetBoundingPlanes);

	Nan::SetPrototypeMethod(tpl, "GetBounds", GetBounds);
	Nan::SetPrototypeMethod(tpl, "getBounds", GetBounds);

	Nan::SetPrototypeMethod(tpl, "GetClassName", GetClassName);
	Nan::SetPrototypeMethod(tpl, "getClassName", GetClassName);

	Nan::SetPrototypeMethod(tpl, "GetFaceProperty", GetFaceProperty);
	Nan::SetPrototypeMethod(tpl, "getFaceProperty", GetFaceProperty);

	Nan::SetPrototypeMethod(tpl, "GetHandleProperty", GetHandleProperty);
	Nan::SetPrototypeMethod(tpl, "getHandleProperty", GetHandleProperty);

	Nan::SetPrototypeMethod(tpl, "GetHandleRepresentation", GetHandleRepresentation);
	Nan::SetPrototypeMethod(tpl, "getHandleRepresentation", GetHandleRepresentation);

	Nan::SetPrototypeMethod(tpl, "GetHoveredHandleProperty", GetHoveredHandleProperty);
	Nan::SetPrototypeMethod(tpl, "getHoveredHandleProperty", GetHoveredHandleProperty);

	Nan::SetPrototypeMethod(tpl, "GetMinimumThickness", GetMinimumThickness);
	Nan::SetPrototypeMethod(tpl, "getMinimumThickness", GetMinimumThickness);

	Nan::SetPrototypeMethod(tpl, "GetOutlineProperty", GetOutlineProperty);
	Nan::SetPrototypeMethod(tpl, "getOutlineProperty", GetOutlineProperty);

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

	Nan::SetPrototypeMethod(tpl, "GetSelectedFaceProperty", GetSelectedFaceProperty);
	Nan::SetPrototypeMethod(tpl, "getSelectedFaceProperty", GetSelectedFaceProperty);

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

	Nan::SetPrototypeMethod(tpl, "GetSelectedOutlineProperty", GetSelectedOutlineProperty);
	Nan::SetPrototypeMethod(tpl, "getSelectedOutlineProperty", GetSelectedOutlineProperty);

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

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

	Nan::SetPrototypeMethod(tpl, "IsA", IsA);
	Nan::SetPrototypeMethod(tpl, "isA", IsA);

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

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

	Nan::SetPrototypeMethod(tpl, "PositionHandles", PositionHandles);
	Nan::SetPrototypeMethod(tpl, "positionHandles", PositionHandles);

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

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

	Nan::SetPrototypeMethod(tpl, "RenderOverlay", RenderOverlay);
	Nan::SetPrototypeMethod(tpl, "renderOverlay", RenderOverlay);

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

	Nan::SetPrototypeMethod(tpl, "Scale", Scale);
	Nan::SetPrototypeMethod(tpl, "scale", Scale);

	Nan::SetPrototypeMethod(tpl, "SetHandleProperty", SetHandleProperty);
	Nan::SetPrototypeMethod(tpl, "setHandleProperty", SetHandleProperty);

	Nan::SetPrototypeMethod(tpl, "SetHandleRepresentation", SetHandleRepresentation);
	Nan::SetPrototypeMethod(tpl, "setHandleRepresentation", SetHandleRepresentation);

	Nan::SetPrototypeMethod(tpl, "SetHoveredHandleProperty", SetHoveredHandleProperty);
	Nan::SetPrototypeMethod(tpl, "setHoveredHandleProperty", SetHoveredHandleProperty);

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

	Nan::SetPrototypeMethod(tpl, "SetMinimumThickness", SetMinimumThickness);
	Nan::SetPrototypeMethod(tpl, "setMinimumThickness", SetMinimumThickness);

	Nan::SetPrototypeMethod(tpl, "SetSelectedHandleProperty", SetSelectedHandleProperty);
	Nan::SetPrototypeMethod(tpl, "setSelectedHandleProperty", SetSelectedHandleProperty);

	Nan::SetPrototypeMethod(tpl, "Translate", Translate);
	Nan::SetPrototypeMethod(tpl, "translate", Translate);

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

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

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

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

void VtkParallelopipedRepresentationWrap::ComputeInteractionState(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::GetActors(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkPropCollectionWrap::ptpl))->HasInstance(info[0]))
	{
		VtkPropCollectionWrap *a0 = ObjectWrap::Unwrap<VtkPropCollectionWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetActors(
			(vtkPropCollection *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

void VtkParallelopipedRepresentationWrap::GetHoveredHandleProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	vtkProperty * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetHoveredHandleProperty();
	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 VtkParallelopipedRepresentationWrap::GetMinimumThickness(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	double r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetMinimumThickness();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkParallelopipedRepresentationWrap::GetOutlineProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	vtkProperty * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetOutlineProperty();
	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 VtkParallelopipedRepresentationWrap::GetPolyData(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::GetSelectedFaceProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	vtkProperty * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetSelectedFaceProperty();
	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 VtkParallelopipedRepresentationWrap::GetSelectedHandleProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::GetSelectedOutlineProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	vtkProperty * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetSelectedOutlineProperty();
	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 VtkParallelopipedRepresentationWrap::HandlesOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->HandlesOff();
}

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

void VtkParallelopipedRepresentationWrap::IsA(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsString())
	{
		Nan::Utf8String a0(info[0]);
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->IsA(
			*a0
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

void VtkParallelopipedRepresentationWrap::PlaceWidget(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::PositionHandles(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->PositionHandles();
}

void VtkParallelopipedRepresentationWrap::ReleaseGraphicsResources(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::RenderOpaqueGeometry(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::RenderOverlay(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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->RenderOverlay(
			(vtkViewport *) a0->native.GetPointer()
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

void VtkParallelopipedRepresentationWrap::SetInteractionState(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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 VtkParallelopipedRepresentationWrap::SetMinimumThickness(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsNumber())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetMinimumThickness(
			info[0]->NumberValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

void VtkParallelopipedRepresentationWrap::Translate(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkParallelopipedRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkParallelopipedRepresentationWrap>(info.Holder());
	vtkParallelopipedRepresentation *native = (vtkParallelopipedRepresentation *)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->Translate(
			(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->Translate(
			b0
		);
		return;
	}
	else if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsInt32())
		{
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->Translate(
				info[0]->Int32Value(),
				info[1]->Int32Value()
			);
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

