//------------------------------------------------------------------------------------
// irr::IAnimationEndCallBack wrappers
//------------------------------------------------------------------------------------

class BMXIAnimationEndCallBack : public IAnimationEndCallBack
{
public:

	BMXBinder binder;

	void (*BMXIAnimationEndCallBack_OnAnimationEnd)(s32 binding,IAnimatedMeshSceneNode* node);

	BMXBinder* getBinder()
	{
		return &binder;
	}

	BMXIAnimationEndCallBack() : IAnimationEndCallBack()
	{
		BMXIAnimationEndCallBack_OnAnimationEnd=0;
	}
	
	void bindOnAnimationEnd(void (*bind_OnAnimationEnd)(s32 binding,IAnimatedMeshSceneNode* node))
	{
		BMXIAnimationEndCallBack_OnAnimationEnd=bind_OnAnimationEnd;
	}

	virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node)
	{
		if (BMXIAnimationEndCallBack_OnAnimationEnd)
			BMXIAnimationEndCallBack_OnAnimationEnd(binder.binding,node);
	}	
};

extern "C" 
{

	BMXIAnimationEndCallBack* IrrScene_BMXIAnimationEndCallBack_new()
	{
		return new BMXIAnimationEndCallBack();
	}
	
	BMXBinder* IrrScene_BMXIAnimationEndCallBack_getBinder(BMXIAnimationEndCallBack* ani_cb)
	{
		if (ani_cb)
			return ani_cb->getBinder();
		else return 0;
	}
	
	void IrrScene_BMXIAnimationEndCallBack_bindOnAnimationEnd(BMXIAnimationEndCallBack* ani_cb,void (*bind_OnAnimationEnd)(s32 binding,IAnimatedMeshSceneNode* node))
	{
		if (ani_cb)
			ani_cb->bindOnAnimationEnd(bind_OnAnimationEnd);
	}
	
	void IrrScene_BMXIAnimationEndCallBack_del(BMXIAnimationEndCallBack* del)
	{
		if (del)
			delete del;
			
		del=0;
	}

	bool IrrScene_IAnimationEndCallBack_drop(IAnimationEndCallBack* unk)
	{
		if (unk)
			return unk->drop();
		else return 0;
	}
	
	const c8* IrrScene_IAnimationEndCallBack_getDebugName(IAnimationEndCallBack* unk)
	{
		if (unk)
			return unk->getDebugName();
		else return "";
	}
	
	void IrrScene_IAnimationEndCallBack_grab(IAnimationEndCallBack* unk)
	{
		if (unk)
			unk->grab();
	}
	
}
