I can't do the following, compiler says no matching operator in std::vector and I don't think I can overload it. So what are my options, apart from only using the 1 vector to store collision results. I'm trying to be extremely cache friendly and I don't want the same bool reset back to false after its been set to true, hence the or.
void CollisionDetection(const vector<Vector2D>& position1,
const vector<Vector2D>& position2,
dimension dim1, dimension dim2,
vector<bool>& result1, vector<bool>& result2)
{
assert(position1.size()==result1.size());
assert(position2.size()==result2.size());
for(int i=0;i<position1.size();i++)
{
for(int j=0;j<position2.size();j++)
{
result1[i] |= result2[i] |=
rectOverlap(position1[1], position2[i], dim1, dim2);
}
}
}