// define the BMX functions from the type
extern "C" {
	void _irrlicht_core_IVertexManipulator_BoundOnManipulate(s32 binding, S3DVertex* vertex);
}

class BMXIVertexManipulator : public IVertexManipulator
{
public:

	BMXBinder binder;

	BMXBinder* getBinder()
	{
		return &binder;
	}

	void operator()(video::S3DVertex& vertex) const
	{
		_irrlicht_core_IVertexManipulator_BoundOnManipulate(binder.binding, &vertex);
	}	
};

extern "C"
{
	BMXIVertexManipulator* IrrScene_BMXIVertexManipulator_new()
	{
		return new BMXIVertexManipulator();
	}

	void IrrScene_BMXIVertexManipulator_del(BMXIVertexManipulator* to_delete)
	{
		if (to_delete) delete to_delete;
	}

	BMXBinder* IrrScene_BMXIVertexManipulator_getBinder(BMXIVertexManipulator* sa)
	{
		if (sa)
			return sa->getBinder();
		else return 0;
	}
}

