private void ComputeLCPMatrix(Vector<Contact> contacts, Matrixd A) {
		
		for (int i = 0; i < contacts.size(); ++i)
		{
			Contact ci = contacts.get(i);
			
			Vector3d tmp = new Vector3d(ci.contactPoint);
			tmp.Substract(ci.body[0].position);
			Vector3d rANi = tmp.CrossProduct(ci.contactNormal);
			
			tmp = new Vector3d(ci.contactPoint);
			tmp.Substract(ci.body[1].position);
			Vector3d rBNi = tmp.CrossProduct(ci.contactNormal);
			
			for (int j = 0; j < contacts.size(); ++j)
			{
				Contact cj = contacts.get(j);
				
				tmp = new Vector3d(cj.contactPoint);
				tmp.Substract(cj.body[0].position);
				Vector3d rANj = tmp.CrossProduct(cj.contactNormal);
				
				tmp = new Vector3d(cj.contactPoint);
				tmp.Substract(cj.body[1].position);
				Vector3d rBNj = tmp.CrossProduct(cj.contactNormal);
				
				double a = 0.0d;
				
				if (ci.body[0] == cj.body[0])
				{
					a += ci.body[0].inverseMass*(ci.contactNormal.ScalarProduct(cj.contactNormal));
					a += rANi.ScalarProduct(ci.body[0].inverseInertiaTensor.Transform(rANj));
				}
				else if (ci.body[0] == cj.body[1])
				{
					a -= ci.body[0].inverseMass*(ci.contactNormal.ScalarProduct(cj.contactNormal));
					a -= rANi.ScalarProduct(ci.body[0].inverseInertiaTensor.Transform(rANj));
					
				}
				
				if (ci.body[1] == cj.body[0])
				{
					a -= ci.body[1].inverseMass*(ci.contactNormal.ScalarProduct(cj.contactNormal));
					a -= rBNi.ScalarProduct(ci.body[1].inverseInertiaTensor.Transform(rBNj));
					
				}
				else if (ci.body[1] == cj.body[1])
				{
					a += ci.body[1].inverseMass*(ci.contactNormal.ScalarProduct(cj.contactNormal));
					a += rBNi.ScalarProduct(ci.body[1].inverseInertiaTensor.Transform(rBNj));
					
				}
				
				A.entry[i][j] = a;
				
			}
			
		}
		
		
	}