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

using namespace v8;

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

VtkSphereRepresentationWrap::VtkSphereRepresentationWrap()
{ }

VtkSphereRepresentationWrap::VtkSphereRepresentationWrap(vtkSmartPointer<vtkSphereRepresentation> _native)
{ native = _native; }

VtkSphereRepresentationWrap::~VtkSphereRepresentationWrap()
{ }

void VtkSphereRepresentationWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkSphereRepresentation").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("SphereRepresentation").ToLocalChecked(), ConstructorGetter);
}

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

void VtkSphereRepresentationWrap::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("VtkSphereRepresentationWrap").ToLocalChecked());
	tpl->InstanceTemplate()->SetInternalFieldCount(1);

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

	Nan::SetPrototypeMethod(tpl, "CenterCursorOff", CenterCursorOff);
	Nan::SetPrototypeMethod(tpl, "centerCursorOff", CenterCursorOff);

	Nan::SetPrototypeMethod(tpl, "CenterCursorOn", CenterCursorOn);
	Nan::SetPrototypeMethod(tpl, "centerCursorOn", CenterCursorOn);

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

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

	Nan::SetPrototypeMethod(tpl, "GetCenterCursor", GetCenterCursor);
	Nan::SetPrototypeMethod(tpl, "getCenterCursor", GetCenterCursor);

	Nan::SetPrototypeMethod(tpl, "GetHandleDirection", GetHandleDirection);
	Nan::SetPrototypeMethod(tpl, "getHandleDirection", GetHandleDirection);

	Nan::SetPrototypeMethod(tpl, "GetHandlePosition", GetHandlePosition);
	Nan::SetPrototypeMethod(tpl, "getHandlePosition", GetHandlePosition);

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

	Nan::SetPrototypeMethod(tpl, "GetHandleText", GetHandleText);
	Nan::SetPrototypeMethod(tpl, "getHandleText", GetHandleText);

	Nan::SetPrototypeMethod(tpl, "GetHandleTextProperty", GetHandleTextProperty);
	Nan::SetPrototypeMethod(tpl, "getHandleTextProperty", GetHandleTextProperty);

	Nan::SetPrototypeMethod(tpl, "GetHandleVisibility", GetHandleVisibility);
	Nan::SetPrototypeMethod(tpl, "getHandleVisibility", GetHandleVisibility);

	Nan::SetPrototypeMethod(tpl, "GetPhiResolution", GetPhiResolution);
	Nan::SetPrototypeMethod(tpl, "getPhiResolution", GetPhiResolution);

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

	Nan::SetPrototypeMethod(tpl, "GetRadialLine", GetRadialLine);
	Nan::SetPrototypeMethod(tpl, "getRadialLine", GetRadialLine);

	Nan::SetPrototypeMethod(tpl, "GetRadialLineProperty", GetRadialLineProperty);
	Nan::SetPrototypeMethod(tpl, "getRadialLineProperty", GetRadialLineProperty);

	Nan::SetPrototypeMethod(tpl, "GetRadius", GetRadius);
	Nan::SetPrototypeMethod(tpl, "getRadius", GetRadius);

	Nan::SetPrototypeMethod(tpl, "GetRepresentation", GetRepresentation);
	Nan::SetPrototypeMethod(tpl, "getRepresentation", GetRepresentation);

	Nan::SetPrototypeMethod(tpl, "GetRepresentationMaxValue", GetRepresentationMaxValue);
	Nan::SetPrototypeMethod(tpl, "getRepresentationMaxValue", GetRepresentationMaxValue);

	Nan::SetPrototypeMethod(tpl, "GetRepresentationMinValue", GetRepresentationMinValue);
	Nan::SetPrototypeMethod(tpl, "getRepresentationMinValue", GetRepresentationMinValue);

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

	Nan::SetPrototypeMethod(tpl, "GetSelectedSphereProperty", GetSelectedSphereProperty);
	Nan::SetPrototypeMethod(tpl, "getSelectedSphereProperty", GetSelectedSphereProperty);

	Nan::SetPrototypeMethod(tpl, "GetSphere", GetSphere);
	Nan::SetPrototypeMethod(tpl, "getSphere", GetSphere);

	Nan::SetPrototypeMethod(tpl, "GetSphereProperty", GetSphereProperty);
	Nan::SetPrototypeMethod(tpl, "getSphereProperty", GetSphereProperty);

	Nan::SetPrototypeMethod(tpl, "GetThetaResolution", GetThetaResolution);
	Nan::SetPrototypeMethod(tpl, "getThetaResolution", GetThetaResolution);

	Nan::SetPrototypeMethod(tpl, "HandleTextOff", HandleTextOff);
	Nan::SetPrototypeMethod(tpl, "handleTextOff", HandleTextOff);

	Nan::SetPrototypeMethod(tpl, "HandleTextOn", HandleTextOn);
	Nan::SetPrototypeMethod(tpl, "handleTextOn", HandleTextOn);

	Nan::SetPrototypeMethod(tpl, "HandleVisibilityOff", HandleVisibilityOff);
	Nan::SetPrototypeMethod(tpl, "handleVisibilityOff", HandleVisibilityOff);

	Nan::SetPrototypeMethod(tpl, "HandleVisibilityOn", HandleVisibilityOn);
	Nan::SetPrototypeMethod(tpl, "handleVisibilityOn", HandleVisibilityOn);

	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, "RadialLineOff", RadialLineOff);
	Nan::SetPrototypeMethod(tpl, "radialLineOff", RadialLineOff);

	Nan::SetPrototypeMethod(tpl, "RadialLineOn", RadialLineOn);
	Nan::SetPrototypeMethod(tpl, "radialLineOn", RadialLineOn);

	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, "RenderTranslucentPolygonalGeometry", RenderTranslucentPolygonalGeometry);
	Nan::SetPrototypeMethod(tpl, "renderTranslucentPolygonalGeometry", RenderTranslucentPolygonalGeometry);

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

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

	Nan::SetPrototypeMethod(tpl, "SetCenterCursor", SetCenterCursor);
	Nan::SetPrototypeMethod(tpl, "setCenterCursor", SetCenterCursor);

	Nan::SetPrototypeMethod(tpl, "SetHandleDirection", SetHandleDirection);
	Nan::SetPrototypeMethod(tpl, "setHandleDirection", SetHandleDirection);

	Nan::SetPrototypeMethod(tpl, "SetHandlePosition", SetHandlePosition);
	Nan::SetPrototypeMethod(tpl, "setHandlePosition", SetHandlePosition);

	Nan::SetPrototypeMethod(tpl, "SetHandleText", SetHandleText);
	Nan::SetPrototypeMethod(tpl, "setHandleText", SetHandleText);

	Nan::SetPrototypeMethod(tpl, "SetHandleVisibility", SetHandleVisibility);
	Nan::SetPrototypeMethod(tpl, "setHandleVisibility", SetHandleVisibility);

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

	Nan::SetPrototypeMethod(tpl, "SetPhiResolution", SetPhiResolution);
	Nan::SetPrototypeMethod(tpl, "setPhiResolution", SetPhiResolution);

	Nan::SetPrototypeMethod(tpl, "SetRadialLine", SetRadialLine);
	Nan::SetPrototypeMethod(tpl, "setRadialLine", SetRadialLine);

	Nan::SetPrototypeMethod(tpl, "SetRadius", SetRadius);
	Nan::SetPrototypeMethod(tpl, "setRadius", SetRadius);

	Nan::SetPrototypeMethod(tpl, "SetRepresentation", SetRepresentation);
	Nan::SetPrototypeMethod(tpl, "setRepresentation", SetRepresentation);

	Nan::SetPrototypeMethod(tpl, "SetRepresentationToOff", SetRepresentationToOff);
	Nan::SetPrototypeMethod(tpl, "setRepresentationToOff", SetRepresentationToOff);

	Nan::SetPrototypeMethod(tpl, "SetRepresentationToSurface", SetRepresentationToSurface);
	Nan::SetPrototypeMethod(tpl, "setRepresentationToSurface", SetRepresentationToSurface);

	Nan::SetPrototypeMethod(tpl, "SetRepresentationToWireframe", SetRepresentationToWireframe);
	Nan::SetPrototypeMethod(tpl, "setRepresentationToWireframe", SetRepresentationToWireframe);

	Nan::SetPrototypeMethod(tpl, "SetThetaResolution", SetThetaResolution);
	Nan::SetPrototypeMethod(tpl, "setThetaResolution", SetThetaResolution);

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

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

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

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

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

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

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

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

void VtkSphereRepresentationWrap::ComputeInteractionState(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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 VtkSphereRepresentationWrap::GetCenter(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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->GetCenter(
			(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->GetCenter(
			b0
		);
		return;
	}
	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 VtkSphereRepresentationWrap::GetCenterCursor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	bool r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetCenterCursor();
	info.GetReturnValue().Set(Nan::New(r));
}

void VtkSphereRepresentationWrap::GetHandleDirection(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetHandleDirection();
	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 VtkSphereRepresentationWrap::GetHandlePosition(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	double const * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetHandlePosition();
	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 VtkSphereRepresentationWrap::GetHandleProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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 VtkSphereRepresentationWrap::GetHandleText(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	int r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetHandleText();
	info.GetReturnValue().Set(Nan::New(r));
}

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

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

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

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

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

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

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

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

void VtkSphereRepresentationWrap::GetSelectedHandleProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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 VtkSphereRepresentationWrap::GetSelectedSphereProperty(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	vtkProperty * r;
	if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	r = native->GetSelectedSphereProperty();
	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 VtkSphereRepresentationWrap::GetSphere(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkSphereWrap::ptpl))->HasInstance(info[0]))
	{
		VtkSphereWrap *a0 = ObjectWrap::Unwrap<VtkSphereWrap>(info[0]->ToObject());
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->GetSphere(
			(vtkSphere *) a0->native.GetPointer()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

void VtkSphereRepresentationWrap::PlaceWidget(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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 && info[1]->IsFloat64Array())
		{
			v8::Local<v8::Float64Array>a1(v8::Local<v8::Float64Array>::Cast(info[1]->ToObject()));
			if( a1->Length() < 3 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

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

			for( i = 0; i < 3; i++ )
			{
				if( !a1->Get(i)->IsNumber() )
				{
					Nan::ThrowError("Array contents invalid.");
					return;
				}
				b1[i] = a1->Get(i)->NumberValue();
			}
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->PlaceWidget(
				(double *)(a0->Buffer()->GetContents().Data()),
				b1
			);
			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 && info[1]->IsArray())
		{
			v8::Local<v8::Array>a1(v8::Local<v8::Array>::Cast(info[1]->ToObject()));
			double b1[3];
			if( a1->Length() < 3 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

			for( i = 0; i < 3; i++ )
			{
				if( !a1->Get(i)->IsNumber() )
				{
					Nan::ThrowError("Array contents invalid.");
					return;
				}
				b1[i] = a1->Get(i)->NumberValue();
			}
						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->PlaceWidget(
				b0,
				b1
			);
			return;
		}
		else if(info.Length() > 1 && info[1]->IsFloat64Array())
		{
			v8::Local<v8::Float64Array>a1(v8::Local<v8::Float64Array>::Cast(info[1]->ToObject()));
			if( a1->Length() < 3 )
			{
				Nan::ThrowError("Array too short.");
				return;
			}

						if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			native->PlaceWidget(
				b0,
				(double *)(a1->Buffer()->GetContents().Data())
			);
			return;
		}
	}
	else 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 VtkSphereRepresentationWrap::RadialLineOff(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
		if(info.Length() != 0)
	{
		Nan::ThrowError("Too many parameters.");
		return;
	}
	native->RadialLineOff();
}

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

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

void VtkSphereRepresentationWrap::SetCenter(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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 VtkSphereRepresentationWrap::SetCenterCursor(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsBoolean())
	{
				if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		native->SetCenterCursor(
			info[0]->BooleanValue()
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

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

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

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

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

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

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

void VtkSphereRepresentationWrap::StartWidgetInteraction(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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 VtkSphereRepresentationWrap::WidgetInteraction(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkSphereRepresentationWrap *wrapper = ObjectWrap::Unwrap<VtkSphereRepresentationWrap>(info.Holder());
	vtkSphereRepresentation *native = (vtkSphereRepresentation *)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");
}

