///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Animation_IK_Chain_Tail.h
// Author : Will Plano
// Date   : 04/09/2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __AVP_ANIMATION_IK_CHAIN_TAIL_H__
#define __AVP_ANIMATION_IK_CHAIN_TAIL_H__

#include "Animation/IK/Asura_Animation_IK_Chain.h"

////////////////////////////////////////////////////////////////////////////////
// Class  : Asura_Animation_IK_Chain_Tail
// Author : Will Plano
// Date   : 04/09/2007
//
// Description  : Tail implementation of IK chain
////////////////////////////////////////////////////////////////////////////////

class AVP_Animation_IK_Chain_Tail : public Asura_Animation_IK_Chain
{
public:
	AVP_Animation_IK_Chain_Tail( const u_int uNumBones = 0 );
	AVP_Animation_IK_Chain_Tail( const int* piBoneIDs, const int* piTwistBoneIDs = NULL );
	~AVP_Animation_IK_Chain_Tail();

	void SetAttractive( const float fAttractive ) { m_fAttractive = fAttractive; }
	void SetDrag( const float fDrag ) { m_fDrag = fDrag; }

protected:
	virtual bool CalculateTarget();

//	virtual bool SolveInitFunction();
	virtual bool SolveLoopFunction();
	virtual bool SolveEndFunction();

	virtual bool SolveChain() { return false; }

private:
	typedef Asura_Animation_IK_Chain PARENT;

	float m_fAttractive;
	float m_fDrag;

#if defined(ASURA_SUPPORT_COMMAND_CONSOLE)
	static u_int s_uConsoleVarReferenceCount;
#endif


}; // end class AVP_Animation_IK_Chain_Tail

#endif   // ifndef __AVP_ANIMATION_IK_CHAIN_TAIL_H__

/// End of file. ///
