当前位置: 首页>>代码示例>>C#>>正文


C# Segment.HasPoint方法代码示例

本文整理汇总了C#中GeometryTutorLib.ConcreteAST.Segment.HasPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Segment.HasPoint方法的具体用法?C# Segment.HasPoint怎么用?C# Segment.HasPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GeometryTutorLib.ConcreteAST.Segment的用法示例。


在下文中一共展示了Segment.HasPoint方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OtherPoint

        public Point OtherPoint(Segment cs)
        {
            if (!cs.HasPoint(Point1)) return Point1;
            if (!cs.HasPoint(Point2)) return Point2;
            if (!cs.HasPoint(Point3)) return Point3;

            return null;
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:8,代码来源:Triangle.cs

示例2: LooseCrosses

        public bool LooseCrosses(Segment that)
        {
            Point p = this.FindIntersection(that);

            if (p == null) return false;

            if (this.HasPoint(p) || that.HasPoint(p)) return false;

            return LooseBetween(p, this.Point1, this.Point2) && LooseBetween(p, that.Point1, that.Point2);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:10,代码来源:Segment.cs

示例3: IsRadius

        //
        // Is this a direct radius segment where one endpoint originates at the origin and extends outward?
        // Return the exact radius.
        private Segment IsRadius(Segment segment, List<Point> figPoints)
        {
            // The segment must originate from the circle center.
            if (!segment.HasPoint(this.center)) return null;

            // The segment must be at least as long as a radius.
            if (!Utilities.CompareValues(segment.Length, this.radius)) return null;

            Point nonCenterPt = segment.OtherPoint(this.center);

            // Check for a direct radius.
            if (this.PointLiesOn(nonCenterPt)) return segment;

            //
            // Check for an extended segment.
            //
            //                radius
            //      center    _____   circPt
            //
            // Find the exact coordinates of the 'circ' points.
            //
            Point inter1 = null;
            Point inter2 = null;
            this.FindIntersection(segment, out inter1, out inter2);

            Point figPoint = Utilities.GetStructurally<Point>(figPoints, inter1);
            if (figPoint == null) figPoint = Utilities.GetStructurally<Point>(figPoints, inter2);

            return new Segment(center, figPoint);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:33,代码来源:Circle.cs

示例4: OtherPoint

        public Point OtherPoint(Segment seg)
        {
            if (seg.HasPoint(A) && seg.HasPoint(B)) return C;
            if (seg.HasPoint(A) && seg.HasPoint(C)) return B;
            if (seg.HasPoint(B) && seg.HasPoint(C)) return A;

            if (seg.PointLiesOn(A) && seg.PointLiesOn(B)) return C;
            if (seg.PointLiesOn(A) && seg.PointLiesOn(C)) return B;
            if (seg.PointLiesOn(B) && seg.PointLiesOn(C)) return A;

            return null;
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:12,代码来源:Angle.cs


注:本文中的GeometryTutorLib.ConcreteAST.Segment.HasPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。