// define the BMX functions from the type
extern "C" {
	bool _irrlicht_core_ICollisionCallback_BoundOnCollision(s32 binding, const ISceneNodeAnimatorCollisionResponse* animator);
}

class BMXICollisionCallback : public ICollisionCallback
{
public:

	BMXBinder binder;

	BMXBinder* getBinder()
	{
		return &binder;
	}

	bool onCollision(const ISceneNodeAnimatorCollisionResponse& animator) 
	{
		return _irrlicht_core_ICollisionCallback_BoundOnCollision(binder.binding, &animator);
	}
};

extern "C"
{
	BMXICollisionCallback* IrrScene_BMXICollisionCallback_new()
	{
		return new BMXICollisionCallback();
	}

	BMXBinder* IrrScene_BMXICollisionCallback_getBinder(BMXICollisionCallback* sa)
	{
		if (sa)
			return sa->getBinder();
		else return 0;
	}

	bool IrrScene_BMXICollisionCallback_drop(IImageWriter* unk)
	{
		if (unk)
			return unk->drop();
		else return 0;
	}
	
	const c8* IrrScene_BMXICollisionCallback_getDebugName(IImageWriter* unk)
	{
		if (unk)
			return unk->getDebugName();
		else return "";
	}
	
	void IrrScene_BMXICollisionCallback_grab(IImageWriter* unk)
	{
		if (unk)
			unk->grab();
	}
}

