
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Human_Focus.h
// Author : Chris Wallace
// Date   : 08/08/08
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
	#pragma once
#endif   // ifdef ASURA_USE_PRAGMA_ONCE

#ifndef __AVP_HUMAN_FOCUS_H__
#define __AVP_HUMAN_FOCUS_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////
#include "Core/Asura_Maths.h"
#include "Actor/Vertebrates/AVP_Vertebrate_Focus.h"

////////////////////////////////////////////////////////////////////////////////
// Forward class declarations...
////////////////////////////////////////////////////////////////////////////////

class Asura_Attractor_Compiled;
class AVP_ClientActor_Human;
class AVP_ClientEntity_Actor;

////////////////////////////////////////////////////////////////////////////////
// Class declaration...
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
// Class        : AVP_Human_Focus
// Author       : Chris Wallace
// Date         : 08/08/08
////////////////////////////////////////////////////////////////////////////////

class AVP_Human_Focus : public AVP_Vertebrate_Focus
{
public:
	// Public functions...
	AVP_Human_Focus(AVP_ClientActor_Human& xOwner);
	virtual ~AVP_Human_Focus();

	// Virtual manipulation functions...
	virtual void Update();
	//virtual void Render();
	
	// Accessor functions...
	virtual void PostCreateInitialise();

protected:
	// Protected functions...
	void UpdateTargets();

	// Protected variables...

// 	union
// 	{
// 		u_int		m_uFlags;
// 		struct
// 		{
// 			u_int	m_bDestinationPositionValid	: 1,	// Set if we've got a destination position, but not at a valid jump target (i.e. out of range).
// 					m_bJumpAvailable			: 1,	// Whether the jump position is currently valid. May need replacing with types, similar to the alien handler, if just trying to land on something isn't enough.
// 												: 0;
// 		};
// 	};

private:
	// Private functions...
	bool TestEntityAgainstScreenArea(const AVP_ClientEntity_Actor& xEntity, float& fLockRange, const Asura_Vector_3& xCameraPosition, const Asura_Vector_2& xPreviousBestScreenPos, Asura_Vector_2& xEntityScreenPos) const; // The final parameter is output only.

	// Private variables...
	float m_fMaxLOSRange; // The maximum range for LOS tests.

	// Private helper class
	class CallbackData
	{
	public:
		CallbackData(AVP_Human_Focus& xFocus, const Asura_Vector_3& xOrigin, const Asura_Vector_3& xDirection)
			: m_xFocus(xFocus)
			, m_xOrigin(xOrigin)
			, m_xDirection(xDirection)
		{
		}

		AVP_Human_Focus& m_xFocus;
		const Asura_Vector_3& m_xOrigin;
		const Asura_Vector_3& m_xDirection;
	};

	// Private typedefs..
	typedef AVP_Vertebrate_Focus PARENT;
};   // End of class 'AVP_Human_Focus'.


#endif   // ifndef __AVP_HUMAN_FOCUS_H__


/// End of file. ///
