From: <yx...@us...> - 2010-03-30 13:50:50
|
Revision: 191 http://simspark.svn.sourceforge.net/simspark/?rev=191&view=rev Author: yxu Date: 2010-03-30 13:50:44 +0000 (Tue, 30 Mar 2010) Log Message: ----------- convenient function name Modified Paths: -------------- trunk/spark/lib/salt/linesegment2.h Modified: trunk/spark/lib/salt/linesegment2.h =================================================================== --- trunk/spark/lib/salt/linesegment2.h 2010-03-30 11:33:03 UTC (rev 190) +++ trunk/spark/lib/salt/linesegment2.h 2010-03-30 13:50:44 UTC (rev 191) @@ -81,7 +81,7 @@ * * @return if the segment and line have intersection */ - bool IntersectionWithLine(const TLine2<DATATYPE>& line, + bool Intersection(const TLine2<DATATYPE>& line, P_T & intersection)const { if ( TLine2<DATATYPE>::Intersection(line, intersection) ) @@ -102,8 +102,8 @@ bool Intersection(const TLineSegment2& seg2, P_T & intersection)const { - if (IntersectionWithLine(seg2, intersection)) { - return seg2.IsBetween(intersection); + if (TLine2<DATATYPE>::Intersection(seg2, intersection)) { + return IsBetween(intersection) && seg2.IsBetween(intersection); } return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |