geometry: Contains(SEG) method in SEG

This commit is contained in:
Tomasz Wlostowski 2020-02-19 18:10:45 +01:00
parent 6673554866
commit fa04174ecf
1 changed files with 14 additions and 0 deletions

View File

@ -290,6 +290,20 @@ public:
return false;
}
bool Contains( const SEG& aSeg ) const
{
if( aSeg.A == aSeg.B ) // single point corner case
return Contains( aSeg.A );
if( !Collinear( aSeg ) )
return false;
if( Contains( aSeg.A ) && Contains( aSeg.B ) )
return false;
}
/**
* Function Length()
*