434 Chapter 8 Collision Detection
Segment E0 = C0.GetESegment(info0.index[1]) +
tfirst * V0;
I.InsertFeature(IntersectSegmentSegment(E1,E0));
}
else
{
Polygon F0 = C0.GetFPolygon(info0.index[1]) +
tfirst * V0;
I.InsertFeature(IntersectSegmentPolygon(E1,F0));
}
}
else // info0.type[1], info1.type[0] both ProjInfo::F
{
// face-face intersection
Polygon F0 = C0.GetFPolygon(info0.index[1]) +
tfirst * V0;
Polygon F1 = C1.GetFPolygon(info1.index[0]) +
tfirst * V1;
I.InsertFeature(IntersectPolygonPolygon(F0,F1));
}
}
else if (side == -1) // C1-max meets C0-min.
{
if (info1.type[1] == ProjInfo::V)
{
// vertex-{vertex/edge/face} intersection
I.InsertFeature(C1.GetVertex(info1.index[1]) +
tfirst * V1);
}
else if (info0.type[0] == ProjInfo::V)
{
// {vertex/edge/face}-vertex intersection ...