/* 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 "vtkCellWrap.h"
#include "vtkGenericCellWrap.h"
#include "vtkObjectWrap.h"
#include "vtkPointsWrap.h"
#include "vtkIdListWrap.h"
#include "../../plus/plus.h"

using namespace v8;

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

VtkGenericCellWrap::VtkGenericCellWrap()
{ }

VtkGenericCellWrap::VtkGenericCellWrap(vtkSmartPointer<vtkGenericCell> _native)
{ native = _native; }

VtkGenericCellWrap::~VtkGenericCellWrap()
{ }

void VtkGenericCellWrap::Init(v8::Local<v8::Object> exports)
{
	Nan::SetAccessor(exports, Nan::New("vtkGenericCell").ToLocalChecked(), ConstructorGetter);
	Nan::SetAccessor(exports, Nan::New("GenericCell").ToLocalChecked(), ConstructorGetter);
}

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

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

	Nan::SetPrototypeMethod(tpl, "CellBoundary", CellBoundary);
	Nan::SetPrototypeMethod(tpl, "cellBoundary", CellBoundary);

	Nan::SetPrototypeMethod(tpl, "DeepCopy", DeepCopy);
	Nan::SetPrototypeMethod(tpl, "deepCopy", DeepCopy);

	Nan::SetPrototypeMethod(tpl, "GetCellDimension", GetCellDimension);
	Nan::SetPrototypeMethod(tpl, "getCellDimension", GetCellDimension);

	Nan::SetPrototypeMethod(tpl, "GetCellType", GetCellType);
	Nan::SetPrototypeMethod(tpl, "getCellType", GetCellType);

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

	Nan::SetPrototypeMethod(tpl, "GetEdge", GetEdge);
	Nan::SetPrototypeMethod(tpl, "getEdge", GetEdge);

	Nan::SetPrototypeMethod(tpl, "GetFace", GetFace);
	Nan::SetPrototypeMethod(tpl, "getFace", GetFace);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfEdges", GetNumberOfEdges);
	Nan::SetPrototypeMethod(tpl, "getNumberOfEdges", GetNumberOfEdges);

	Nan::SetPrototypeMethod(tpl, "GetNumberOfFaces", GetNumberOfFaces);
	Nan::SetPrototypeMethod(tpl, "getNumberOfFaces", GetNumberOfFaces);

	Nan::SetPrototypeMethod(tpl, "GetParametricCenter", GetParametricCenter);
	Nan::SetPrototypeMethod(tpl, "getParametricCenter", GetParametricCenter);

	Nan::SetPrototypeMethod(tpl, "Initialize", Initialize);
	Nan::SetPrototypeMethod(tpl, "initialize", Initialize);

	Nan::SetPrototypeMethod(tpl, "InstantiateCell", InstantiateCell);
	Nan::SetPrototypeMethod(tpl, "instantiateCell", InstantiateCell);

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

	Nan::SetPrototypeMethod(tpl, "IsLinear", IsLinear);
	Nan::SetPrototypeMethod(tpl, "isLinear", IsLinear);

	Nan::SetPrototypeMethod(tpl, "IsPrimaryCell", IsPrimaryCell);
	Nan::SetPrototypeMethod(tpl, "isPrimaryCell", IsPrimaryCell);

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

	Nan::SetPrototypeMethod(tpl, "RequiresExplicitFaceRepresentation", RequiresExplicitFaceRepresentation);
	Nan::SetPrototypeMethod(tpl, "requiresExplicitFaceRepresentation", RequiresExplicitFaceRepresentation);

	Nan::SetPrototypeMethod(tpl, "RequiresInitialization", RequiresInitialization);
	Nan::SetPrototypeMethod(tpl, "requiresInitialization", RequiresInitialization);

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

	Nan::SetPrototypeMethod(tpl, "SetCellType", SetCellType);
	Nan::SetPrototypeMethod(tpl, "setCellType", SetCellType);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToBiQuadraticQuad", SetCellTypeToBiQuadraticQuad);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToBiQuadraticQuad", SetCellTypeToBiQuadraticQuad);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToBiQuadraticQuadraticHexahedron", SetCellTypeToBiQuadraticQuadraticHexahedron);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToBiQuadraticQuadraticHexahedron", SetCellTypeToBiQuadraticQuadraticHexahedron);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToBiQuadraticQuadraticWedge", SetCellTypeToBiQuadraticQuadraticWedge);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToBiQuadraticQuadraticWedge", SetCellTypeToBiQuadraticQuadraticWedge);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToBiQuadraticTriangle", SetCellTypeToBiQuadraticTriangle);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToBiQuadraticTriangle", SetCellTypeToBiQuadraticTriangle);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToConvexPointSet", SetCellTypeToConvexPointSet);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToConvexPointSet", SetCellTypeToConvexPointSet);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToCubicLine", SetCellTypeToCubicLine);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToCubicLine", SetCellTypeToCubicLine);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToEmptyCell", SetCellTypeToEmptyCell);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToEmptyCell", SetCellTypeToEmptyCell);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToHexagonalPrism", SetCellTypeToHexagonalPrism);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToHexagonalPrism", SetCellTypeToHexagonalPrism);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToHexahedron", SetCellTypeToHexahedron);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToHexahedron", SetCellTypeToHexahedron);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToLine", SetCellTypeToLine);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToLine", SetCellTypeToLine);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPentagonalPrism", SetCellTypeToPentagonalPrism);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPentagonalPrism", SetCellTypeToPentagonalPrism);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPixel", SetCellTypeToPixel);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPixel", SetCellTypeToPixel);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPolyLine", SetCellTypeToPolyLine);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPolyLine", SetCellTypeToPolyLine);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPolyVertex", SetCellTypeToPolyVertex);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPolyVertex", SetCellTypeToPolyVertex);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPolygon", SetCellTypeToPolygon);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPolygon", SetCellTypeToPolygon);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPolyhedron", SetCellTypeToPolyhedron);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPolyhedron", SetCellTypeToPolyhedron);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToPyramid", SetCellTypeToPyramid);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToPyramid", SetCellTypeToPyramid);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuad", SetCellTypeToQuad);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuad", SetCellTypeToQuad);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticEdge", SetCellTypeToQuadraticEdge);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticEdge", SetCellTypeToQuadraticEdge);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticHexahedron", SetCellTypeToQuadraticHexahedron);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticHexahedron", SetCellTypeToQuadraticHexahedron);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticLinearQuad", SetCellTypeToQuadraticLinearQuad);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticLinearQuad", SetCellTypeToQuadraticLinearQuad);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticLinearWedge", SetCellTypeToQuadraticLinearWedge);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticLinearWedge", SetCellTypeToQuadraticLinearWedge);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticPolygon", SetCellTypeToQuadraticPolygon);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticPolygon", SetCellTypeToQuadraticPolygon);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticPyramid", SetCellTypeToQuadraticPyramid);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticPyramid", SetCellTypeToQuadraticPyramid);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticQuad", SetCellTypeToQuadraticQuad);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticQuad", SetCellTypeToQuadraticQuad);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticTetra", SetCellTypeToQuadraticTetra);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticTetra", SetCellTypeToQuadraticTetra);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticTriangle", SetCellTypeToQuadraticTriangle);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticTriangle", SetCellTypeToQuadraticTriangle);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToQuadraticWedge", SetCellTypeToQuadraticWedge);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToQuadraticWedge", SetCellTypeToQuadraticWedge);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToTetra", SetCellTypeToTetra);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToTetra", SetCellTypeToTetra);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToTriQuadraticHexahedron", SetCellTypeToTriQuadraticHexahedron);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToTriQuadraticHexahedron", SetCellTypeToTriQuadraticHexahedron);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToTriangle", SetCellTypeToTriangle);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToTriangle", SetCellTypeToTriangle);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToTriangleStrip", SetCellTypeToTriangleStrip);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToTriangleStrip", SetCellTypeToTriangleStrip);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToVertex", SetCellTypeToVertex);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToVertex", SetCellTypeToVertex);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToVoxel", SetCellTypeToVoxel);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToVoxel", SetCellTypeToVoxel);

	Nan::SetPrototypeMethod(tpl, "SetCellTypeToWedge", SetCellTypeToWedge);
	Nan::SetPrototypeMethod(tpl, "setCellTypeToWedge", SetCellTypeToWedge);

	Nan::SetPrototypeMethod(tpl, "SetPointIds", SetPointIds);
	Nan::SetPrototypeMethod(tpl, "setPointIds", SetPointIds);

	Nan::SetPrototypeMethod(tpl, "SetPoints", SetPoints);
	Nan::SetPrototypeMethod(tpl, "setPoints", SetPoints);

	Nan::SetPrototypeMethod(tpl, "ShallowCopy", ShallowCopy);
	Nan::SetPrototypeMethod(tpl, "shallowCopy", ShallowCopy);

	Nan::SetPrototypeMethod(tpl, "Triangulate", Triangulate);
	Nan::SetPrototypeMethod(tpl, "triangulate", Triangulate);

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

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

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

void VtkGenericCellWrap::CellBoundary(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkGenericCellWrap *wrapper = ObjectWrap::Unwrap<VtkGenericCellWrap>(info.Holder());
	vtkGenericCell *native = (vtkGenericCell *)wrapper->native.GetPointer();
	size_t i;
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		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 && info[2]->IsObject() && (Nan::New(VtkIdListWrap::ptpl))->HasInstance(info[2]))
			{
				VtkIdListWrap *a2 = ObjectWrap::Unwrap<VtkIdListWrap>(info[2]->ToObject());
				int r;
				if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				r = native->CellBoundary(
					info[0]->Int32Value(),
					(double *)(a1->Buffer()->GetContents().Data()),
					(vtkIdList *) a2->native.GetPointer()
				);
				info.GetReturnValue().Set(Nan::New(r));
				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 && info[2]->IsObject() && (Nan::New(VtkIdListWrap::ptpl))->HasInstance(info[2]))
			{
				VtkIdListWrap *a2 = ObjectWrap::Unwrap<VtkIdListWrap>(info[2]->ToObject());
				int r;
				if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				r = native->CellBoundary(
					info[0]->Int32Value(),
					b1,
					(vtkIdList *) a2->native.GetPointer()
				);
				info.GetReturnValue().Set(Nan::New(r));
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

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

void VtkGenericCellWrap::GetParametricCenter(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkGenericCellWrap *wrapper = ObjectWrap::Unwrap<VtkGenericCellWrap>(info.Holder());
	vtkGenericCell *native = (vtkGenericCell *)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;
		}

		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetParametricCenter(
			(double *)(a0->Buffer()->GetContents().Data())
		);
		info.GetReturnValue().Set(Nan::New(r));
		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();
		}
		int r;
		if(info.Length() != 1)
		{
			Nan::ThrowError("Too many parameters.");
			return;
		}
		r = native->GetParametricCenter(
			b0
		);
		info.GetReturnValue().Set(Nan::New(r));
		return;
	}
	Nan::ThrowError("Parameter mismatch");
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

void VtkGenericCellWrap::Triangulate(const Nan::FunctionCallbackInfo<v8::Value>& info)
{
	VtkGenericCellWrap *wrapper = ObjectWrap::Unwrap<VtkGenericCellWrap>(info.Holder());
	vtkGenericCell *native = (vtkGenericCell *)wrapper->native.GetPointer();
	if(info.Length() > 0 && info[0]->IsInt32())
	{
		if(info.Length() > 1 && info[1]->IsObject() && (Nan::New(VtkIdListWrap::ptpl))->HasInstance(info[1]))
		{
			VtkIdListWrap *a1 = ObjectWrap::Unwrap<VtkIdListWrap>(info[1]->ToObject());
			if(info.Length() > 2 && info[2]->IsObject() && (Nan::New(VtkPointsWrap::ptpl))->HasInstance(info[2]))
			{
				VtkPointsWrap *a2 = ObjectWrap::Unwrap<VtkPointsWrap>(info[2]->ToObject());
				int r;
				if(info.Length() != 3)
				{
					Nan::ThrowError("Too many parameters.");
					return;
				}
				r = native->Triangulate(
					info[0]->Int32Value(),
					(vtkIdList *) a1->native.GetPointer(),
					(vtkPoints *) a2->native.GetPointer()
				);
				info.GetReturnValue().Set(Nan::New(r));
				return;
			}
		}
	}
	Nan::ThrowError("Parameter mismatch");
}

