예제 #1
0
        public override IPnt GetPointAt(double fraction, bool as3D)
        {
            const bool asRatio = true;

            InnerSegment.QueryPoint(esriSegmentExtension.esriNoExtension,
                                    fraction, asRatio, QPoint);

            return(CreatePoint(QPoint, as3D));
        }
예제 #2
0
        public override void QueryOffset(Pnt point, out double offset, out double along)
        {
            along  = 0;
            offset = 0;
            bool rightSide = false;

            QPoint.PutCoords(point.X, point.Y);
            InnerSegment.QueryPointAndDistance(esriSegmentExtension.esriExtendTangents, QPoint,
                                               true, QPoint, ref along, ref offset, ref rightSide);
        }
예제 #3
0
        public override SegmentProxy GetSubCurve(double fromRatio, double toRatio)
        {
            ICurve     subCurve;
            const bool asRatio = true;

            InnerSegment.GetSubcurve(fromRatio, toRatio, asRatio, out subCurve);

            var segment = subCurve as ISegment;

            Assert.NotNull(segment, "segment expected from GetSubCurve() on segment");

            // TODO revise returning the same SegmentIndex. Correct?
            // maybe return something more narrow than SegmentProxy? Just what the caller needs?

            return(new AoSegmentProxy(segment, PartIndex, SegmentIndex));
        }
예제 #4
0
        public override double GetDirectionAt(double fraction)
        {
            InnerSegment.QueryTangent(esriSegmentExtension.esriExtendTangents, fraction, true, 1,
                                      QTangent);
            QTangent.QueryFromPoint(QPoint);
            double x0, y0;

            QPoint.QueryCoords(out x0, out y0);

            QTangent.QueryToPoint(QPoint);
            double x1, y1;

            QPoint.QueryCoords(out x1, out y1);

            double dir = Math.Atan2(y1 - y0, x1 - x0);

            return(dir);
        }
예제 #5
0
        public override WKSEnvelope GetSubCurveBox(double fromRatio, double toRatio)
        {
            WKSEnvelope box = new WKSEnvelope();

            if (fromRatio > 0 || toRatio < 1)
            {
                ICurve     subCurve;
                const bool asRatio = true;
                InnerSegment.GetSubcurve(fromRatio, toRatio, asRatio, out subCurve);
                var segment = subCurve as ISegment;
                Assert.NotNull(segment, "segment expected from GetSubCurve() on segment");
                segment.QueryWKSEnvelope(ref box);
            }
            else
            {
                InnerSegment.QueryWKSEnvelope(ref box);
            }

            return(box);
        }
예제 #6
0
 public override Pnt GetEnd(bool as3D)
 {
     InnerSegment.QueryToPoint(QPoint);
     return(CreatePoint(QPoint, as3D));
 }
예제 #7
0
 public override Pnt GetStart(bool as3D)
 {
     InnerSegment.QueryFromPoint(QPoint);
     return(CreatePoint(QPoint, as3D));
 }