//
// Tools_InterZoneWaypointObject.h
//
// Created by Richard Rice - 25/04/2006
// 
// Copyright (C) 2006 Rebellion, All Rights Reserved.
//


#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __TOOLS_INTERZONEWAYPOINTOBJECT_H__
#define __TOOLS_INTERZONEWAYPOINTOBJECT_H__
#ifdef ASURA_USE_STREAMING


#include "Objects/Tools_Object.h"

class Tools_InterZoneWaypointObject : public Tools_Object
{
public :
	~Tools_InterZoneWaypointObject();

	//create objects for all of the waypoints in the navigation system
	static void CreateAll();
	//creates a new waypoint pair
	static void CreateNew();

	//delete all the tools objects
	static void DeleteAll();

	virtual const char* GetName(){return m_xName.GetString();}
	virtual const char* GetTypeDescription() {return "Interzone Waypoint";}
	virtual void Destroy();
	virtual void UpdatePositionInAsuraData(bool /*bUpdateLinkedObjects*/);
	virtual void OnDeselection();
	virtual void UpdateWhileSelected();
	virtual void Render();



private :
	Tools_InterZoneWaypointObject();
	void Initialise(u_int uIndex,Tools_InterZoneWaypointObject* pxOtherObject,bool bFirstWaypoint);

	//place waypoint using snap to vertex
	void StartPlacement();



	Tools_InterZoneWaypointObject* m_pxPairedObject;//other waypoint in pair
	bool m_bFirstWaypoint; //first waypoint in pair
	u_int m_uIndex; //index in navigation system
	bool m_bPlacing;//currently placing waypoint pair using snap to vertx

	Asura_String m_xName;

	static List<Tools_InterZoneWaypointObject*> s_xObjectList;

};


#endif // ASURA_USE_STREAMING
#endif // __TOOLS_INTERZONEWAYPOINTOBJECT_H__
