#ifndef COLLISIONDETECTOR_H_INCLUDED
#define COLLISIONDETECTOR_H_INCLUDED

#include "entity.h"
#include "terrain.h"
#include "llist.h"
#include "messages.h"

class CollisionDetector : public Entity
{
public:
	CollisionDetector() {TerrainObject = NULL;}

	//The collisiondetector is a special object that won't be draw; it
	// just listens for all of the move messages and processes them.
	// Because of this, it won't ever be drawn on the screen, so it
	// should return 0 for the number of meshes it draws.
	void GetMeshes(Mesh** MeshArray) {return;}
	int GetMeshCount() {return 0;}

	//as far as I can think of right now, this object shouldn't ever have any
	// actions it does on its own... it should only have to respond to a 
	// move message sent by another object.
	unsigned int GetAction(float TimeStep, Msg** SentMsgs) {return 0;}

	//This function is where all of the work will be done
	unsigned int SendMsg(Msg* RecievedMsg, Msg** SentMsgs);

	//The terrain object is treated special for collision detection
	// purposes, so we store it separately
	void SetTerrainObject(Terrain* NewTerrain);
	void AddObject(Entity* NewObject);

private:
	LList<Entity*> ObjectList;
	Terrain* TerrainObject;

};

#endif