Beispiel #1
0
        // line segment can have 0 or 1 intersection interval with clipEnv2D.
        // The function return 0 or 2 segParams (e.g. 0.0, 0.4; or 0.1, 0.9; or 0.6,
        // 1.0; or 0.0, 1.0)
        // segParams will be sorted in ascending order; the order of the
        // envelopeDistances will correspond (i.e. the envelopeDistances may not be
        // in ascending order);
        // an envelopeDistance can be -1.0 if the corresponding endpoint is properly
        // inside clipEnv2D.
        internal int IntersectionWithEnvelope2D(com.epl.geometry.Envelope2D clipEnv2D, bool includeEnvBoundary, double[] segParams, double[] envelopeDistances)
        {
            com.epl.geometry.Point2D p1 = GetStartXY();
            com.epl.geometry.Point2D p2 = GetEndXY();
            // includeEnvBoundary xxx ???
            int modified = clipEnv2D.ClipLine(p1, p2, 0, segParams, envelopeDistances);

            return(modified != 0 ? 2 : 0);
        }