
///////////////////////////////////////////////////////////////////////////////
//
// File   : AVP_Messages_InteractObject.h
// Author : Will Plano
// Date   : 10/06/2008
//
// Copyright (C) 2008 Rebellion, All Rights Reserved.
//
///////////////////////////////////////////////////////////////////////////////

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

#ifndef __AVP_MESSAGES_INTERACTOBJECT_H__
#define __AVP_MESSAGES_INTERACTOBJECT_H__

////////////////////////////////////////////////////////////////////////////////
// Include files...
////////////////////////////////////////////////////////////////////////////////

#include "Core/Asura_Maths.h"
#include "Core/Asura_OrientedVolume.h"

#include "Entity/PhysicalObject/AVP_PhysicalObject_Messages.h"

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

class Asura_NetMsg;
class AVP_ServerEntity_InteractObject;

class AVP_Message_InteractObject_ClientCreate : public AVP_Message_PhysicalObject_ClientCreate
{
public:
	// Public functions...
	void FillInteractionObject( const AVP_ServerEntity_InteractObject* pxObject );
	const Asura_Vector_3&	GetActorVolumeMinBound() const			{ return m_xActorVolumeMinBound; }
	const Asura_Vector_3&	GetActorVolumeMaxBound() const			{ return m_xActorVolumeMaxBound; }
	const Asura_Quat&		GetActorVolumeOrient() const			{ return m_xActorVolumeOrient; }
	const Asura_Vector_3&	GetOnTargetVolumeHalfExtents() const	{ return m_xOnTargetVolumeHalfExtents; }
	const Asura_Vector_3&	GetOnTargetVolumeCenter() const			{ return m_xOnTargetVolumeCenter; }
	const Asura_Quat&		GetOnTargetVolumeOrient() const			{ return m_xOnTargetVolumeOrient; }
	const Asura_Vector_3&	GetOffTargetVolumeHalfExtents() const	{ return m_xOffTargetVolumeHalfExtents; }
	const Asura_Vector_3&	GetOffTargetVolumeCenter() const		{ return m_xOffTargetVolumeCenter; }
	const Asura_Quat&		GetOffTargetVolumeOrient() const		{ return m_xOffTargetVolumeOrient; }
	bool					IsUseActorVolume() const				{ return m_bUseActorVolume; }
	bool					IsUseOnTargetVolume() const				{ return m_bUseOnTargetVolume; }
	bool					IsUseOffTargetVolume() const			{ return m_bUseOffTargetVolume; }
	bool					IsOn() const							{ return m_bOn; }
	bool					IsEnabled() const						{ return m_bEnabled; }
	bool					IsUseByAlien() const					{ return m_bUseByAlien; }
	bool					IsUseByHuman() const					{ return m_bUseByHuman; }
	bool					IsUseByPredator() const					{ return m_bUseByPredator; }

protected:

private:
	Asura_Vector_3	m_xActorVolumeMinBound;
	Asura_Vector_3	m_xActorVolumeMaxBound;
	Asura_Quat		m_xActorVolumeOrient;

	Asura_Vector_3	m_xOnTargetVolumeHalfExtents;
	Asura_Vector_3	m_xOnTargetVolumeCenter;
	Asura_Quat		m_xOnTargetVolumeOrient;

	Asura_Vector_3	m_xOffTargetVolumeHalfExtents;
	Asura_Vector_3	m_xOffTargetVolumeCenter;
	Asura_Quat		m_xOffTargetVolumeOrient;

	union
	{
		u_int		m_uFlags;
		struct  
		{
			u_int	m_bUseActorVolume			: 1,
					m_bUseOnTargetVolume		: 1,
					m_bUseOffTargetVolume		: 1,
					m_bOn						: 1,
					m_bEnabled					: 1,
					m_bUseByAlien				: 1,
					m_bUseByHuman				: 1,
					m_bUseByPredator			: 1,
												: 0;
		};
	};
};

#endif   // ifndef __AVP_MESSAGES_INTERACTOBJECT_H__

/// End of file. ///
