#ifdef ASURA_USE_ANIMATION_IK_SOLVER

///////////////////////////////////////////////////////////////////////////////
//
// File   : Asura_Animation_IK_Chain_MarkerPoint.h
// Author : Will Plano
// Date   : 24/08/2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_ANIMATION_IK_CHAIN_MARKERPOINT_H__
#define __ASURA_ANIMATION_IK_CHAIN_MARKERPOINT_H__

#include "Animation/IK/Asura_Animation_IK_Chain.h"

class Asura_Animation;

////////////////////////////////////////////////////////////////////////////////
// Class  : Asura_Animation_IK_Chain_MarkerPoint
// Author : Will Plano
// Date   : 24/08/2007
//
// Description  : MarkerPoint implementation of IK chain
////////////////////////////////////////////////////////////////////////////////

class Asura_Animation_IK_Chain_MarkerPoint : public Asura_Animation_IK_Chain
{
public:
	Asura_Animation_IK_Chain_MarkerPoint( const u_int uNumBones = 0, const u_int uMarkerPointHash = 0, const Asura_Animation* pxAnim = NULL, bool bUseOri = false );
	Asura_Animation_IK_Chain_MarkerPoint( const int* piBoneIDs, const int* piTwistBoneIDs = NULL, const u_int uMarkerPointHash = 0, const Asura_Animation* pxAnim = NULL, bool bUseOri = false  );
	~Asura_Animation_IK_Chain_MarkerPoint();

	void SetMarkerPointHash( const u_int uMarkerPointHash ) { m_uMarkerPointHash = uMarkerPointHash; }
	void SetAnim( const Asura_Animation* pxAnim ) { m_pxAnim = pxAnim; }
	void SetUseOri( bool bUseOri ) { m_bUseOri = bUseOri; }
	void SetMatrixOffset( Asura_Matrix_3x3& xOriOffset );

#if defined(ASURA_SUPPORT_COMMAND_CONSOLE) && defined(ASURA_DEBUG_VARIABLE_SYSTEM)
	static void AddConsoleVars();
#endif

protected:
	virtual bool CalculateTarget();

	u_int m_uMarkerPointHash;
	const Asura_Animation* m_pxAnim;
	bool m_bUseOri;

	bool m_bAddOriOffset;
	Asura_Matrix_3x3 m_xOriOffset;

private:
	typedef Asura_Animation_IK_Chain PARENT;

}; // end class Asura_Animation_IK_Chain_MarkerPoint

#endif   // ifndef __ASURA_ANIMATION_IK_CHAIN_MARKERPOINT_H__

#endif // ASURA_USE_ANIMATION_IK_SOLVER

/// End of file. ///
