return;
// a few values to simplify the equations
- const Vector2& normal = cInfo.normal;
- const Vector2& point = cInfo.point;
+ const Vector2& normal = cInfo.m_vecNormal;
+ const Vector2& point = cInfo.m_vecPoint;
float m1 = b1->mass;
float m2 = b2->mass;
return;
float fCoR = pBall->CoR;
- Vector2 vecNorm = cInfo.normal;
+ Vector2 vecNorm = cInfo.m_vecNormal;
Vector2 vecVelo = pBall->velocityRaw();
// from center to point
Vector2 vecCollP = vecNorm / vecNorm.length() * pBall->radius;
- pBall->applyNudge(cInfo.point + vecCollP - pBall->positionRaw());
+ pBall->applyNudge(cInfo.m_vecPoint + vecCollP - pBall->positionRaw());
}
bool getInfo(const Ball* b1, const Ball* b2, CollisionInfo* pcInfo)
if ((v1 - v2).dot(p1 - p2) >= 0)
return false;
- pcInfo->point = p1 - (p1 - p2) * r1 / (r1 + r2);
- pcInfo->normal = p1 - p2;
+ pcInfo->m_vecPoint = p1 - (p1 - p2) * r1 / (r1 + r2);
+ pcInfo->m_vecNormal = p1 - p2;
return true;
}
return false;
- pcInfo->point = vecTotVec / iTot + vecPos;
- pcInfo->normal = vecPos - pcInfo->point;
+ pcInfo->m_vecPoint = vecTotVec / iTot + vecPos;
+ pcInfo->m_vecNormal = vecPos - pcInfo->m_vecPoint;
return true;
}