void myMouse(int button, int state, int x, int y) { if(button == GLUT_LEFT_BUTTON && state == GLUT_UP) { IsIntersection(x, y); } }
void RuleContact::DoStep() { for (PairSelector::IteratorPtr it = m_Selector->Begin(); !it->IsEnd(); it->Next()) { const CircleObjectPtr& obj1 = it->GetFirst(); const CircleObjectPtr& obj2 = it->GetSecond(); if (!IsIntersection(obj1, obj2)) continue; ResolveContact(obj1, obj2); } }