rectSeg[2].point1= Point(rightBottomX,leftTopY);
rectSeg[2].point2= Point(rightBottomX,rightBottomY);
rectSeg[3].point1= Point(rightBottomX,rightBottomY);
rectSeg[3].point2= Point(leftTopX,rightBottomY);
HaveInteraction=false;
for(int i=0;i<4;i++)
{
if(LineInteractSegment(seg,rectSeg[i]))//the line interact with the rectangle, see if the segment interact the rectangle too.
{
if(SegmentInRect(seg, Point(leftTopX,leftTopY), Point(rightBottomX,rightBottomY)))
{
//cout<<"T"<
}
break;
}
}
if(HaveInteraction==false)
{
//cout<<"F"<
}
}
return 0;
}