//
// Tools_PFX_SourceVolume_Object.h
//
// Created by Richard Rice - 13/09/2004
// 
// Copyright (C) 2004 Rebellion, All Rights Reserved.
//


#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef _TOOLS_PFX_SOURCEVOLUME_OBJECT_H_
#define _TOOLS_PFX_SOURCEVOLUME_OBJECT_H_

#include "Objects/Tools_VolumeEdit_Object.h"
#include "SpecialFX/PFX/Asura_PFX_Volume.h"

//For editing the position,orientation and volume of a PFX source


class Tools_PFX_SourceVolume_Object : public Tools_VolumeEdit_Object
{
	public :
		Tools_PFX_SourceVolume_Object(const Asura_PFX_Volume& xVolume);

		void SetPositionAndOrient(const Asura_Vector_3& xPos,const Asura_Matrix_3x3& xOrient);

protected :

		// Virtual Tools_Object methods
		void UpdateWhileSelected();
		void UpdatePositionInAsuraData(bool);
		void OnSelection();
		void OnDeselection();
		void Render();
		const char* GetTypeDescription() { return "PFX Source Volume";}
		const char* GetName() { return "PFX Source Volume";}
		virtual bool CanBeDestroyed(){return false;}//deleted when deselected instead
		virtual bool IsTemporaryEditObject() const {return true;}


		void CreateOverlay();
		void DeleteOverlay();
		void UpdateOverlayControls();

		static void _FinishEditing(int iThis)
		{((Tools_PFX_SourceVolume_Object*)iThis)->Done();}

		virtual void Done();

		bool PreferPositionAtBaseOfVolume(){return false;}
	
public :
		// Members
		Asura_PFX_Volume m_xVolume;

		bool m_bGameEntitiesNeedUpdating;
		bool m_bReadyToDelete;
		bool m_bVolumeTypeChanged;

		Asura_Vector_2 m_xExtentDialogsOffset;
		//List of dialogs that need to be replaced if the volume type changes
		List<class Asura_Dialog*> m_xExtentDialogs;

		
};



#endif //_TOOLS_PFX_SOURCEVOLUME_OBJECT_H_
