/// <summary> /// This method tells whether the contour of a given stroke node /// intersects with the contour of this node. The contours of both nodes /// include their connecting quadrangles. /// </summary> /// <param name="hitNode"></param> /// <returns></returns> internal bool HitTest(StrokeNode hitNode) { if (!IsValid || !hitNode.IsValid) { return(false); } IEnumerable <ContourSegment> hittingContour = hitNode.GetContourSegments(); return(_operations.HitTest(_lastNode, _thisNode, ConnectingQuad, hittingContour)); }
/// <summary> /// Finds out if a given node intersects with this one, /// and returns findices of the intersection. /// </summary> /// <param name="hitNode"></param> /// <returns></returns> internal StrokeFIndices CutTest(StrokeNode hitNode) { if ((IsValid == false) || (hitNode.IsValid == false)) { return(StrokeFIndices.Empty); } IEnumerable <ContourSegment> hittingContour = hitNode.GetContourSegments(); // If the node contours intersect, the result is a pair of findices // this segment should be cut at to let the hitNode's contour through it. StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, hittingContour); return((_index == 0) ? cutAt : BindFIndices(cutAt)); }
/// <summary> /// Finds out if a given node intersects with this one, /// and returns findices of the intersection. /// </summary> /// <param name="hitNode"></param> /// <returns></returns> internal StrokeFIndices CutTest(StrokeNode hitNode) { if ((IsValid == false) || (hitNode.IsValid == false)) { return StrokeFIndices.Empty; } IEnumerable<ContourSegment> hittingContour = hitNode.GetContourSegments(); // If the node contours intersect, the result is a pair of findices // this segment should be cut at to let the hitNode's contour through it. StrokeFIndices cutAt = _operations.CutTest(_lastNode, _thisNode, ConnectingQuad, hittingContour); return (_index == 0) ? cutAt : BindFIndices(cutAt); }
/// <summary> /// This method tells whether the contour of a given stroke node /// intersects with the contour of this node. The contours of both nodes /// include their connecting quadrangles. /// </summary> /// <param name="hitNode"></param> /// <returns></returns> internal bool HitTest(StrokeNode hitNode) { if (!IsValid || !hitNode.IsValid) { return false; } IEnumerable<ContourSegment> hittingContour = hitNode.GetContourSegments(); return _operations.HitTest(_lastNode, _thisNode, ConnectingQuad, hittingContour); }