//
//  Collision.h
//  PixelKit
//
//  Copyright (c) 2014 César Parent. All rights reserved.
//
#ifndef _COLLISION_H
#define _COLLISION_H

#include "includes.h"
#include <vector>

namespace PixelKit
{
	class Node;
	/*!
	 * @class  PixelKit::Collision
	 * @brief  Collision defines a physics simulattion collision between two
	 * nodes with CollisionBodies. It provides access to both colliding bodies
	 * and the overlap between them
	 * @namespace PixelKit
	 */
	class Collision
	{
	public:
		
		static const Uint8 AaboveB = 0b0001;
		static const Uint8 BaboveA = 0b0000;
		static const Uint8 AleftOfB = 0b0010;
		static const Uint8 BleftOfA = 0b0000;
		
		/*!
		 * @brief  Collision constructor, stores two Nodes as the two parts of a
		 * collision.
		 * @param  A First colliding Node.
		 * @param  B Second colliding Node.
		 */
		Collision(Node* A, Node* B);
		
		/*!
		 * @brief  Collision's first Node.
		 */
		Node* bodyA;
		
		/*!
		 * @brief  Collision's second Node.
		 */
		Node* bodyB;
		
		/*!
		 * @brief  Rectangle representing the collision on screen.
		 */
		SDL_Rect overlap;
		
		/*!
		 *
		 */
		Uint8 relPos;
		
	};
}

#endif