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


C# Segment.StructurallyEquals方法代码示例

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


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

示例1: GetOtherSides

        public void GetOtherSides(Segment s, out Segment outSeg1, out Segment outSeg2)
        {
            outSeg1 = null;
            outSeg2 = null;

            if (s.StructurallyEquals(SegmentA))
            {
                outSeg1 = SegmentB;
                outSeg2 = SegmentC;
            }
            else if (s.StructurallyEquals(SegmentB))
            {
                outSeg1 = SegmentA;
                outSeg2 = SegmentC;
            }
            else if (s.StructurallyEquals(SegmentC))
            {
                outSeg1 = SegmentA;
                outSeg2 = SegmentB;
            }
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:21,代码来源:Triangle.cs

示例2: IsIncludedAngle

        //
        // Do these segments overlay this angle?
        //
        public bool IsIncludedAngle(Segment seg1, Segment seg2)
        {
            // Do not allow the same segment.
            if (seg1.StructurallyEquals(seg2)) return false;

            // Check direct inclusion
            if (seg1.Equals(ray1) && seg2.Equals(ray2) || seg1.Equals(ray2) && seg2.Equals(ray1)) return true;

            // Check overlaying angle
            Point shared = seg1.SharedVertex(seg2);

            if (shared == null) return false;

            Angle thatAngle = new Angle(seg1.OtherPoint(shared), shared, seg2.OtherPoint(shared));

            return this.Equates(thatAngle);
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:20,代码来源:Angle.cs

示例3: CalcSides

        private List<KeyValuePair<Segment, double>> CalcSides(RightTriangle tri, Angle rightAngle, Angle knownAngle, double knownAngleVal, Segment knownSeg, double knownSegVal)
        {
            //
            // Determine the nature of the known Segment w.r.t. to the known angle.
            //
            Segment hypotenuse = tri.GetHypotenuse();

            // Hypotenuse known
            if (knownSeg.StructurallyEquals(hypotenuse))
            {
                return CalcSidesHypotenuseKnown(tri, knownAngle, knownAngleVal, hypotenuse, knownSegVal);
            }
            else
            {
                return CalcSidesHypotenuseUnknown(tri, knownAngle, knownAngleVal, knownSeg, knownSegVal);
            }
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:17,代码来源:Triangle.cs

示例4: GetSegmentLength

        public double GetSegmentLength(Segment thatSeg)
        {
            if (thatSeg == null)
            {
                // throw new ArgumentException("Why is the angle null?");
                return -1;
            }

            foreach (KeyValuePair<Segment, double> segPair in segments)
            {
                if (thatSeg.StructurallyEquals(segPair.Key)) return segPair.Value;
            }

            return -1;
        }
开发者ID:wcatykid,项目名称:GeoShader,代码行数:15,代码来源:KnownMeasurementsAggregator.cs


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