//------------------------------------------------------------------------------------
// irr::scene::ISceneNodeAnimatorCollisionResponse wrappers (based on ISceneNodeAnimator)
//------------------------------------------------------------------------------------
extern "C" 
{

	vector3df* IrrScene_ISceneNodeAnimatorCollisionResponse_getEllipsoidRadius(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return new vector3df(cr->getEllipsoidRadius());
		else return 0;
	}
	
	vector3df* IrrScene_ISceneNodeAnimatorCollisionResponse_getEllipsoidTranslation(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return new vector3df(cr->getEllipsoidTranslation());
		else return 0;
	}
	
	vector3df* IrrScene_ISceneNodeAnimatorCollisionResponse_getGravity(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return new vector3df(cr->getGravity());
		else return 0;
	}
	
	// do not delete this pointer
	ITriangleSelector* IrrScene_ISceneNodeAnimatorCollisionResponse_getWorld(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return cr->getWorld();
		else return 0;
	}
	
	bool IrrScene_ISceneNodeAnimatorCollisionResponse_isFalling(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return cr->isFalling();
		else return false;
	}
	
	void IrrScene_ISceneNodeAnimatorCollisionResponse_setEllipsoidRadius(ISceneNodeAnimatorCollisionResponse* cr,vector3df* radius)
	{
		if (cr)
			cr->setEllipsoidRadius(*radius);
	}
	
	void IrrScene_ISceneNodeAnimatorCollisionResponse_setEllipsoidTranslation(ISceneNodeAnimatorCollisionResponse* cr,const core::vector3df &translation)
	{
		if (cr)
			cr->setEllipsoidTranslation(translation);
	}
	
	void IrrScene_ISceneNodeAnimatorCollisionResponse_setGravity(ISceneNodeAnimatorCollisionResponse* cr,vector3df* gravity)
	{
		if (cr)
			cr->setGravity(*gravity);
	}
	
	void IrrScene_ISceneNodeAnimatorCollisionResponse_setWorld(ISceneNodeAnimatorCollisionResponse* cr,ITriangleSelector* newWorld)
	{
		if (cr)
			cr->setWorld(newWorld);
	}
	
	void IrrScene_ISceneNodeAnimatorCollisionResponse_animateNode(ISceneNodeAnimatorCollisionResponse* cr,ISceneNode* node,u32 timeMs)
	{
		if (cr)
			cr->animateNode(node,timeMs);
	}

	void IrrScene_ISceneNodeAnimatorCollisionResponse_jump(ISceneNodeAnimatorCollisionResponse* cr, f32 jumpSpeed) 
	{
		if (cr)
			cr->jump(jumpSpeed);		
	}

	void IrrScene_ISceneNodeAnimatorCollisionResponse_setAnimateTarget(ISceneNodeAnimatorCollisionResponse* cr, bool enable)
	{
		if (cr)
			cr->setAnimateTarget(enable);
	}
	
	bool IrrScene_ISceneNodeAnimatorCollisionResponse_getAnimateTarget(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return cr->getAnimateTarget();
		else return false;
	}

	void IrrScene_ISceneNodeAnimatorCollisionResponse_setTargetNode(ISceneNodeAnimatorCollisionResponse* cr, ISceneNode * node)
	{
		if (cr)
			cr->setTargetNode(node);
	}
	
	ISceneNode* IrrScene_ISceneNodeAnimatorCollisionResponse_getTargetNode(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return cr->getTargetNode();
		else return 0;
	}
	
	bool IrrScene_ISceneNodeAnimatorCollisionResponse_collisionOccurred(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return cr->collisionOccurred();
		else return false;
	}

	// must delete
	vector3df* IrrScene_ISceneNodeAnimatorCollisionResponse_getCollisionPoint(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return new vector3df(cr->getCollisionPoint());
		else return 0;
	}

	// must delete
	triangle3df* IrrScene_ISceneNodeAnimatorCollisionResponse_getCollisionTriangle(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return new triangle3df(cr->getCollisionTriangle());
		else return 0;
	}		

	// must delete
	vector3df* IrrScene_ISceneNodeAnimatorCollisionResponse_getCollisionResultPosition(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return new vector3df(cr->getCollisionResultPosition());
		else return 0;
	}

	const ISceneNode* IrrScene_ISceneNodeAnimatorCollisionResponse_getCollisionNode(ISceneNodeAnimatorCollisionResponse* cr)
	{
		if (cr)
			return cr->getCollisionNode();
		else return 0;
	}

	void IrrScene_ISceneNodeAnimatorCollisionResponse_setCollisionCallback(ISceneNodeAnimatorCollisionResponse* cr, ICollisionCallback* callback)
	{
		if (cr)
			cr->setCollisionCallback(callback);
	}
}
