Beispiel #1
0
 public List <WaterShoreSegment> GetAllWaterShoreSegment()
 {
     if (null != mSingleShore)
     {
         return(mSingleShore.GetAllWaterShoreSegment());
     }
     else if (null != mInsideShore && null != mOutsideShore)
     {
         var ret = mInsideShore.GetAllWaterShoreSegment();
         ret.AddRange(mOutsideShore.GetAllWaterShoreSegment());
         return(ret);
     }
     return(null);
 }
Beispiel #2
0
    /// <summary>
    /// 传入的水岸线是否完全在当前的内部
    /// </summary>
    /// <returns><c>true</c> if this instance is water shore inside the specified other; otherwise, <c>false</c>.</returns>
    /// <param name="other">Other.</param>
    public bool IsWaterShoreInside(WaterShore other)
    {
        List <WaterShoreSegment> otherSegments = other.GetAllWaterShoreSegment();

        for (int i = 0; i < otherSegments.Count; ++i)
        {
            WaterShoreSegment waterSegment = otherSegments [i];
            if (!IsPointInSide(waterSegment.posOne))
            {
                return(false);
            }
            if (!IsPointInSide(waterSegment.posTwo))
            {
                return(false);
            }
        }
        return(true);
    }