#ifndef CONTACT_H
#define CONTACT_H

/*
** Contact is a specific intersection point between two physical objects. Note that two objects have
** one collision but may have many contacts.
*/

#include "EdgePair.h"

namespace Salamander
{

class Contact
{
public:
	Contact();
	~Contact();

	// find the smallest separation, returning true if this was the smallest so far and
	// we updated our separation
	bool updateSeparation(Vec2 overlap1, Vec2 overlap2, double& separation);

public:
	Vec2 translation_;
	Vec2 normal_;
	Vec2 tangent_;
	Vec2 radius1_;
	Vec2 radius2_;
	
	double separation_;
	double accImpulseNormal_;
	double accImpulseTangent_;
	double accImpulseTranslationBias_;
	double massNormal_;
	double massTangent_;
	double bias_;
	double friction_;
	EdgePair edgePair_;
};

}

#endif // CONTACT_H