/* 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 "vtkObjectWrap.h"
#include "vtkOctreePointLocatorNodeWrap.h"
#include "vtkPlanesIntersectionWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkOctreePointLocatorNodeWrap::VtkOctreePointLocatorNodeWrap()
{ }

VtkOctreePointLocatorNodeWrap::VtkOctreePointLocatorNodeWrap(vtkSmartPointer<vtkOctreePointLocatorNode> _native)
{ native = _native; }

VtkOctreePointLocatorNodeWrap::~VtkOctreePointLocatorNodeWrap()
{ }

void VtkOctreePointLocatorNodeWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkOctreePointLocatorNode").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("OctreePointLocatorNode").ToLocalChecked(), ConstructorGetter);
}

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

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

	Nan::SetPrototypeMethod(tpl, "ContainsPoint", ContainsPoint);
	Nan::SetPrototypeMethod(tpl, "containsPoint", ContainsPoint);

	Nan::SetPrototypeMethod(tpl, "CreateChildNodes", CreateChildNodes);
	Nan::SetPrototypeMethod(tpl, "createChildNodes", CreateChildNodes);

	Nan::SetPrototypeMethod(tpl, "DeleteChildNodes", DeleteChildNodes);
	Nan::SetPrototypeMethod(tpl, "deleteChildNodes", DeleteChildNodes);

	Nan::SetPrototypeMethod(tpl, "GetChild", GetChild);
	Nan::SetPrototypeMethod(tpl, "getChild", GetChild);

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

	Nan::SetPrototypeMethod(tpl, "GetDistance2ToBoundary", GetDistance2ToBoundary);
	Nan::SetPrototypeMethod(tpl, "getDistance2ToBoundary", GetDistance2ToBoundary);

	Nan::SetPrototypeMethod(tpl, "GetDistance2ToInnerBoundary", GetDistance2ToInnerBoundary);
	Nan::SetPrototypeMethod(tpl, "getDistance2ToInnerBoundary", GetDistance2ToInnerBoundary);

	Nan::SetPrototypeMethod(tpl, "GetID", GetID);
	Nan::SetPrototypeMethod(tpl, "getID", GetID);

	Nan::SetPrototypeMethod(tpl, "GetMinID", GetMinID);
	Nan::SetPrototypeMethod(tpl, "getMinID", GetMinID);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfPoints", GetNumberOfPoints);
	Nan::SetPrototypeMethod(tpl, "getNumberOfPoints", GetNumberOfPoints);

	Nan::SetPrototypeMethod(tpl, "IntersectsRegion", IntersectsRegion);
	Nan::SetPrototypeMethod(tpl, "intersectsRegion", IntersectsRegion);

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

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

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

	Nan::SetPrototypeMethod(tpl, "SetBounds", SetBounds);
	Nan::SetPrototypeMethod(tpl, "setBounds", SetBounds);

	Nan::SetPrototypeMethod(tpl, "SetDataBounds", SetDataBounds);
	Nan::SetPrototypeMethod(tpl, "setDataBounds", SetDataBounds);

	Nan::SetPrototypeMethod(tpl, "SetMaxBounds", SetMaxBounds);
	Nan::SetPrototypeMethod(tpl, "setMaxBounds", SetMaxBounds);

	Nan::SetPrototypeMethod(tpl, "SetMaxDataBounds", SetMaxDataBounds);
	Nan::SetPrototypeMethod(tpl, "setMaxDataBounds", SetMaxDataBounds);

	Nan::SetPrototypeMethod(tpl, "SetMinBounds", SetMinBounds);
	Nan::SetPrototypeMethod(tpl, "setMinBounds", SetMinBounds);

	Nan::SetPrototypeMethod(tpl, "SetMinDataBounds", SetMinDataBounds);
	Nan::SetPrototypeMethod(tpl, "setMinDataBounds", SetMinDataBounds);

	Nan::SetPrototypeMethod(tpl, "SetNumberOfPoints", SetNumberOfPoints);
	Nan::SetPrototypeMethod(tpl, "setNumberOfPoints", SetNumberOfPoints);

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

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

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

void VtkOctreePointLocatorNodeWrap::ContainsPoint(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)wrapper->native.GetPointer();
	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 && info[3]->IsInt32())
				{
					int r;
					if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					r = native->ContainsPoint(
						info[0]->NumberValue(),
						info[1]->NumberValue(),
						info[2]->NumberValue(),
						info[3]->Int32Value()
					);
					info.GetReturnValue().Set(Nan::New(r));
					return;
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

void VtkOctreePointLocatorNodeWrap::GetClassName(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)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 VtkOctreePointLocatorNodeWrap::GetDistance2ToBoundary(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)wrapper->native.GetPointer();
	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 && info[3]->IsObject() && (Nan::New(VtkOctreePointLocatorNodeWrap::ptpl))->HasInstance(info[3]))
				{
					VtkOctreePointLocatorNodeWrap *a3 = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info[3]->ToObject());
					if(info.Length() > 4 && info[4]->IsInt32())
					{
						double r;
						if(info.Length() != 5)
						{
							Nan::ThrowError("Too many parameters.");
							return;
						}
						r = native->GetDistance2ToBoundary(
							info[0]->NumberValue(),
							info[1]->NumberValue(),
							info[2]->NumberValue(),
							(vtkOctreePointLocatorNode *) a3->native.GetPointer(),
							info[4]->Int32Value()
						);
						info.GetReturnValue().Set(Nan::New(r));
						return;
					}
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkOctreePointLocatorNodeWrap::GetDistance2ToInnerBoundary(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)wrapper->native.GetPointer();
	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 && info[3]->IsObject() && (Nan::New(VtkOctreePointLocatorNodeWrap::ptpl))->HasInstance(info[3]))
				{
					VtkOctreePointLocatorNodeWrap *a3 = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info[3]->ToObject());
					double r;
					if(info.Length() != 4)
					{
						Nan::ThrowError("Too many parameters.");
						return;
					}
					r = native->GetDistance2ToInnerBoundary(
						info[0]->NumberValue(),
						info[1]->NumberValue(),
						info[2]->NumberValue(),
						(vtkOctreePointLocatorNode *) a3->native.GetPointer()
					);
					info.GetReturnValue().Set(Nan::New(r));
					return;
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

void VtkOctreePointLocatorNodeWrap::IntersectsRegion(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsObject() && (Nan::New(VtkPlanesIntersectionWrap::ptpl))->HasInstance(info[0]))
	{
		VtkPlanesIntersectionWrap *a0 = ObjectWrap::Unwrap<VtkPlanesIntersectionWrap>(info[0]->ToObject());
		if(info.Length() > 1 && info[1]->IsInt32())
		{
			int r;
			if(info.Length() != 2)
			{
				Nan::ThrowError("Too many parameters.");
				return;
			}
			r = native->IntersectsRegion(
				(vtkPlanesIntersection *) a0->native.GetPointer(),
				info[1]->Int32Value()
			);
			info.GetReturnValue().Set(Nan::New(r));
			return;
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

void VtkOctreePointLocatorNodeWrap::SetBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)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->SetBounds(
			(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->SetBounds(
			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 && info[3]->IsNumber())
				{
					if(info.Length() > 4 && info[4]->IsNumber())
					{
						if(info.Length() > 5 && info[5]->IsNumber())
						{
														if(info.Length() != 6)
							{
								Nan::ThrowError("Too many parameters.");
								return;
							}
							native->SetBounds(
								info[0]->NumberValue(),
								info[1]->NumberValue(),
								info[2]->NumberValue(),
								info[3]->NumberValue(),
								info[4]->NumberValue(),
								info[5]->NumberValue()
							);
							return;
						}
					}
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkOctreePointLocatorNodeWrap::SetDataBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)wrapper->native.GetPointer();
	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 && info[3]->IsNumber())
				{
					if(info.Length() > 4 && info[4]->IsNumber())
					{
						if(info.Length() > 5 && info[5]->IsNumber())
						{
														if(info.Length() != 6)
							{
								Nan::ThrowError("Too many parameters.");
								return;
							}
							native->SetDataBounds(
								info[0]->NumberValue(),
								info[1]->NumberValue(),
								info[2]->NumberValue(),
								info[3]->NumberValue(),
								info[4]->NumberValue(),
								info[5]->NumberValue()
							);
							return;
						}
					}
				}
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkOctreePointLocatorNodeWrap::SetMaxBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)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->SetMaxBounds(
			(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->SetMaxBounds(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkOctreePointLocatorNodeWrap::SetMaxDataBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)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->SetMaxDataBounds(
			(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->SetMaxDataBounds(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkOctreePointLocatorNodeWrap::SetMinBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)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->SetMinBounds(
			(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->SetMinBounds(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

void VtkOctreePointLocatorNodeWrap::SetMinDataBounds(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkOctreePointLocatorNodeWrap *wrapper = ObjectWrap::Unwrap<VtkOctreePointLocatorNodeWrap>(info.Holder());
	vtkOctreePointLocatorNode *native = (vtkOctreePointLocatorNode *)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->SetMinDataBounds(
			(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->SetMinDataBounds(
			b0
		);
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

